commit 47a49f9b7a32a87f9a3a5abdb9695dbb41776edb Author: peterjia Date: Tue May 27 13:18:59 2025 +0800 首次发布 diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..9db0339 Binary files /dev/null and b/.DS_Store differ diff --git a/.wrangler/state/v3/d1/miniflare-D1DatabaseObject/cb062a95954ee4d0775823caa6c3d7c38211bf6f794b39043d4ef0e613f979f9.sqlite b/.wrangler/state/v3/d1/miniflare-D1DatabaseObject/cb062a95954ee4d0775823caa6c3d7c38211bf6f794b39043d4ef0e613f979f9.sqlite new file mode 100644 index 0000000..0b58f0d Binary files /dev/null and b/.wrangler/state/v3/d1/miniflare-D1DatabaseObject/cb062a95954ee4d0775823caa6c3d7c38211bf6f794b39043d4ef0e613f979f9.sqlite differ diff --git a/.wrangler/state/v3/d1/miniflare-D1DatabaseObject/cb062a95954ee4d0775823caa6c3d7c38211bf6f794b39043d4ef0e613f979f9.sqlite-shm b/.wrangler/state/v3/d1/miniflare-D1DatabaseObject/cb062a95954ee4d0775823caa6c3d7c38211bf6f794b39043d4ef0e613f979f9.sqlite-shm new file mode 100644 index 0000000..93e1106 Binary files /dev/null and b/.wrangler/state/v3/d1/miniflare-D1DatabaseObject/cb062a95954ee4d0775823caa6c3d7c38211bf6f794b39043d4ef0e613f979f9.sqlite-shm differ diff --git a/.wrangler/state/v3/d1/miniflare-D1DatabaseObject/cb062a95954ee4d0775823caa6c3d7c38211bf6f794b39043d4ef0e613f979f9.sqlite-wal b/.wrangler/state/v3/d1/miniflare-D1DatabaseObject/cb062a95954ee4d0775823caa6c3d7c38211bf6f794b39043d4ef0e613f979f9.sqlite-wal new file mode 100644 index 0000000..31cf1e7 Binary files /dev/null and b/.wrangler/state/v3/d1/miniflare-D1DatabaseObject/cb062a95954ee4d0775823caa6c3d7c38211bf6f794b39043d4ef0e613f979f9.sqlite-wal differ diff --git a/file-share-frontend/.DS_Store b/file-share-frontend/.DS_Store new file mode 100644 index 0000000..5c37cb6 Binary files /dev/null and b/file-share-frontend/.DS_Store differ diff --git a/file-share-frontend/file-share-frontend.zip b/file-share-frontend/file-share-frontend.zip new file mode 100644 index 0000000..b6de93a Binary files /dev/null and b/file-share-frontend/file-share-frontend.zip differ diff --git a/file-share-frontend/index.html b/file-share-frontend/index.html new file mode 100755 index 0000000..6223195 --- /dev/null +++ b/file-share-frontend/index.html @@ -0,0 +1,93 @@ + + + + + + 文件存储与分享系统 + + + +
+
+

文件存储与分享系统

+
+ +
+
+

上传文件

+
+
+ + +
+
+ + +
+
+ + +
+ +
+ +
+ +
+

下载文件

+
+
+ + +
+
+ + +
+ +
+
+
+ +
+

API 使用说明

+
+

文件上传

+

端点: POST https://share.ssplus.cn/upload

+

参数:

+
    +
  • file: 要上传的文件(必需)
  • +
  • password: 文件密码(可选)
  • +
  • expires: 过期时间,ISO格式(可选)
  • +
+

响应:

+
{
+  "success": true,
+  "fileId": "文件唯一ID",
+  "url": "文件访问链接"
+}
+
+ +
+

文件下载

+

端点: GET https://share.ssplus.cn/file/{fileId}

+

参数:

+
    +
  • password: 文件密码(如需)
  • +
+

响应: 文件内容或错误信息

+
+
+ +
+

© 2025-Now 文件存储与分享系统 By SuperJia

+
+
+ + + + \ No newline at end of file diff --git a/file-share-frontend/script.js b/file-share-frontend/script.js new file mode 100755 index 0000000..ebe2824 --- /dev/null +++ b/file-share-frontend/script.js @@ -0,0 +1,88 @@ +document.addEventListener('DOMContentLoaded', function() { + const uploadForm = document.getElementById('uploadForm'); + const downloadForm = document.getElementById('downloadForm'); + const uploadResult = document.getElementById('uploadResult'); + const fileLink = document.getElementById('fileLink'); + const copyLinkBtn = document.getElementById('copyLinkBtn'); + + // 设置最小过期时间为当前时间 + const expiresInput = document.getElementById('expiresInput'); + const now = new Date(); + const localDatetime = new Date(now.getTime() - now.getTimezoneOffset() * 60000) + .toISOString() + .slice(0, 16); + expiresInput.min = localDatetime; + + // 文件上传处理 + uploadForm.addEventListener('submit', async function(e) { + e.preventDefault(); + + const formData = new FormData(uploadForm); + const fileInput = document.getElementById('fileInput'); + + if (!fileInput.files[0]) { + alert('请选择要上传的文件'); + return; + } + + try { + const response = await fetch('https://share.ssplus.cn/upload', { + method: 'POST', + body: formData + }); + + const result = await response.json(); + + if (result.success) { + // 显示上传结果 + fileLink.href = result.url; + fileLink.textContent = result.url; + uploadResult.classList.remove('hidden'); + + // 清空表单 + uploadForm.reset(); + } else { + alert(`上传失败: ${result.error || '未知错误'}`); + } + } catch (error) { + alert(`上传出错: ${error.message}`); + } + }); + + // 复制链接功能 + copyLinkBtn.addEventListener('click', function() { + navigator.clipboard.writeText(fileLink.href) + .then(() => { + const originalText = copyLinkBtn.textContent; + copyLinkBtn.textContent = '已复制!'; + setTimeout(() => { + copyLinkBtn.textContent = originalText; + }, 2000); + }) + .catch(err => { + alert('复制失败: ' + err); + }); + }); + + // 文件下载处理 + downloadForm.addEventListener('submit', function(e) { + e.preventDefault(); + + const fileId = document.getElementById('fileIdInput').value.trim(); + const password = document.getElementById('downloadPasswordInput').value; + + if (!fileId) { + alert('请输入文件ID'); + return; + } + + // 构建下载URL + let downloadUrl = `https://share.ssplus.cn/file/${fileId}`; + if (password) { + downloadUrl += `?password=${encodeURIComponent(password)}`; + } + + // 打开下载链接 + window.open(downloadUrl, '_blank'); + }); +}); \ No newline at end of file diff --git a/file-share-frontend/styles.css b/file-share-frontend/styles.css new file mode 100755 index 0000000..e5e6a71 --- /dev/null +++ b/file-share-frontend/styles.css @@ -0,0 +1,137 @@ +* { + box-sizing: border-box; + margin: 0; + padding: 0; +} + +body { + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; + line-height: 1.6; + color: #333; + background-color: #f5f5f5; +} + +.container { + max-width: 1000px; + margin: 0 auto; + padding: 20px; +} + +header { + text-align: center; + margin-bottom: 30px; + padding: 20px 0; + background-color: #2c3e50; + color: white; + border-radius: 5px; +} + +main { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 30px; + margin-bottom: 40px; +} + +section { + background-color: white; + padding: 25px; + border-radius: 5px; + box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); +} + +h2 { + margin-bottom: 20px; + color: #2c3e50; + border-bottom: 2px solid #ecf0f1; + padding-bottom: 10px; +} + +.form-group { + margin-bottom: 15px; +} + +label { + display: block; + margin-bottom: 5px; + font-weight: 600; +} + +input[type="file"], +input[type="password"], +input[type="text"], +input[type="datetime-local"] { + width: 100%; + padding: 10px; + border: 1px solid #ddd; + border-radius: 4px; + font-size: 16px; +} + +.btn { + background-color: #3498db; + color: white; + border: none; + padding: 12px 20px; + border-radius: 4px; + cursor: pointer; + font-size: 16px; + transition: background-color 0.3s; +} + +.btn:hover { + background-color: #2980b9; +} + +.result-box { + margin-top: 20px; + padding: 15px; + background-color: #e8f4fc; + border-radius: 4px; + border-left: 4px solid #3498db; +} + +.hidden { + display: none; +} + +.api-docs { + margin-top: 40px; + background-color: white; + padding: 25px; + border-radius: 5px; + box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); +} + +.api-endpoint { + margin-bottom: 30px; +} + +.api-endpoint h3 { + color: #2c3e50; + margin-bottom: 10px; +} + +pre { + background-color: #f8f8f8; + padding: 15px; + border-radius: 4px; + overflow-x: auto; +} + +code { + font-family: 'Courier New', Courier, monospace; +} + +footer { + text-align: center; + margin-top: 40px; + padding: 20px 0; + color: #7f8c8d; +} + +@media (max-width: 768px) { + main { + grid-template-columns: 1fr; + } +} \ No newline at end of file diff --git a/main.js b/main.js new file mode 100755 index 0000000..b87b032 --- /dev/null +++ b/main.js @@ -0,0 +1,181 @@ +export default { + async fetch(request, env) { + const url = new URL(request.url); + const path = url.pathname.split('/'); + + // 处理CORS + if (request.method === 'OPTIONS') { + return new Response(null, { + headers: { + 'Access-Control-Allow-Origin': '*', + 'Access-Control-Allow-Methods': 'GET, POST, DELETE, OPTIONS', + 'Access-Control-Allow-Headers': 'Content-Type, Authorization' + } + }); + } + + // 文件上传 + if (path[1] === 'upload' && request.method === 'POST') { + try { + const formData = await request.formData(); + const file = formData.get('file'); + const password = formData.get('password') || null; + const expiresAt = formData.get('expires') ? new Date(formData.get('expires')) : null; + + if (!file) { + return new Response(JSON.stringify({ error: 'No file provided' }), { + status: 400, + headers: { + 'Content-Type': 'application/json', + 'Access-Control-Allow-Origin': '*' + } + }); + } + + // 生成唯一文件ID + const fileId = crypto.randomUUID(); + + // 上传文件到R2,将 FILES_BUCKET 改为 file_share_bucket + await env.file_share_bucket.put(fileId, file); + + // 存储文件元数据到D1 + await env.DB.prepare( + 'INSERT INTO files (id, name, type, size, password, created_at, expires_at) VALUES (?, ?, ?, ?, ?, ?, ?)' + ).bind( + fileId, + file.name, + file.type, + file.size, + password, + new Date().toISOString(), + expiresAt ? expiresAt.toISOString() : null + ).run(); + + return new Response(JSON.stringify({ + success: true, + fileId: fileId, + url: `${url.origin}/file/${fileId}` + }), { + headers: { + 'Content-Type': 'application/json', + 'Access-Control-Allow-Origin': '*' + } + }); + } catch (error) { + return new Response(JSON.stringify({ error: error.message }), { + status: 500, + headers: { + 'Content-Type': 'application/json', + 'Access-Control-Allow-Origin': '*' + } + }); + } + } + + // 文件下载 + if (path[1] === 'file' && path[2]) { + const fileId = path[2]; + const password = url.searchParams.get('password') || null; + + try { + // 获取文件元数据 + const fileInfo = await env.DB.prepare( + 'SELECT * FROM files WHERE id = ?' + ).bind(fileId).first(); + + if (!fileInfo) { + return new Response(JSON.stringify({ error: 'File not found' }), { + status: 404, + headers: { + 'Content-Type': 'application/json', + 'Access-Control-Allow-Origin': '*' + } + }); + } + + // 检查文件是否过期 + if (fileInfo.expires_at && new Date(fileInfo.expires_at) < new Date()) { + return new Response(JSON.stringify({ error: 'File has expired' }), { + status: 410, + headers: { + 'Content-Type': 'application/json', + 'Access-Control-Allow-Origin': '*' + } + }); + } + + // 检查密码 + if (fileInfo.password && fileInfo.password !== password) { + return new Response(JSON.stringify({ error: 'Invalid password' }), { + status: 401, + headers: { + 'Content-Type': 'application/json', + 'Access-Control-Allow-Origin': '*' + } + }); + } + + // 从R2获取文件,将 FILES_BUCKET 改为 file_share_bucket + const file = await env.file_share_bucket.get(fileId); + + if (!file) { + return new Response(JSON.stringify({ error: 'File not found in storage' }), { + status: 404, + headers: { + 'Content-Type': 'application/json', + 'Access-Control-Allow-Origin': '*' + } + }); + } + + // 更新下载计数 + await env.DB.prepare( + 'UPDATE files SET downloads = downloads + 1 WHERE id = ?' + ).bind(fileId).run(); + + // 返回文件 + return new Response(file.body, { + headers: { + 'Content-Type': file.httpMetadata.contentType || 'application/octet-stream', + 'Content-Disposition': `attachment; filename="${fileInfo.name}"`, + 'Access-Control-Allow-Origin': '*' + } + }); + } catch (error) { + return new Response(JSON.stringify({ error: error.message }), { + status: 500, + headers: { + 'Content-Type': 'application/json', + 'Access-Control-Allow-Origin': '*' + } + }); + } + } + + // 修改默认响应 + const apiDoc = { + message: "\u26a0\ufe0f \u8fd9\u662fAPI\u4e13\u7528\u7aef\u53e3\uff0c\u7981\u6b62\u76f4\u63a5\u8bbf\u95ee", + description: "\u8fd9\u662f\u4e00\u4e2a\u6587\u4ef6\u5b58\u50a8\u548c\u5206\u4eab\u7cfb\u7edf\u7684API\u670d\u52a1", + frontend: "https://fileshare.ssplus.cn", + api_endpoints: { + upload: { + method: "POST", + path: "/upload", + description: "\u4e0a\u4f20\u6587\u4ef6" + }, + download: { + method: "GET", + path: "/file/:fileId", + description: "\u4e0b\u8f7d\u6587\u4ef6" + } + } + }; + + return new Response(JSON.stringify(apiDoc, null, 2), { + headers: { + 'Content-Type': 'application/json; charset=utf-8', + 'Access-Control-Allow-Origin': '*' + } + }); + } +}; \ No newline at end of file diff --git a/node_modules/.bin/acorn b/node_modules/.bin/acorn new file mode 120000 index 0000000..cf76760 --- /dev/null +++ b/node_modules/.bin/acorn @@ -0,0 +1 @@ +../acorn/bin/acorn \ No newline at end of file diff --git a/node_modules/.bin/esbuild b/node_modules/.bin/esbuild new file mode 120000 index 0000000..c83ac07 --- /dev/null +++ b/node_modules/.bin/esbuild @@ -0,0 +1 @@ +../esbuild/bin/esbuild \ No newline at end of file diff --git a/node_modules/.bin/mime b/node_modules/.bin/mime new file mode 120000 index 0000000..fbb7ee0 --- /dev/null +++ b/node_modules/.bin/mime @@ -0,0 +1 @@ +../mime/cli.js \ No newline at end of file diff --git a/node_modules/.bin/miniflare b/node_modules/.bin/miniflare new file mode 120000 index 0000000..69b1982 --- /dev/null +++ b/node_modules/.bin/miniflare @@ -0,0 +1 @@ +../miniflare/bootstrap.js \ No newline at end of file diff --git a/node_modules/.bin/mustache b/node_modules/.bin/mustache new file mode 120000 index 0000000..f8b7197 --- /dev/null +++ b/node_modules/.bin/mustache @@ -0,0 +1 @@ +../mustache/bin/mustache \ No newline at end of file diff --git a/node_modules/.bin/semver b/node_modules/.bin/semver new file mode 120000 index 0000000..5aaadf4 --- /dev/null +++ b/node_modules/.bin/semver @@ -0,0 +1 @@ +../semver/bin/semver.js \ No newline at end of file diff --git a/node_modules/.bin/workerd b/node_modules/.bin/workerd new file mode 120000 index 0000000..1b2e13a --- /dev/null +++ b/node_modules/.bin/workerd @@ -0,0 +1 @@ +../workerd/bin/workerd \ No newline at end of file diff --git a/node_modules/.bin/wrangler b/node_modules/.bin/wrangler new file mode 120000 index 0000000..dc4c14f --- /dev/null +++ b/node_modules/.bin/wrangler @@ -0,0 +1 @@ +../wrangler/bin/wrangler.js \ No newline at end of file diff --git a/node_modules/.bin/wrangler2 b/node_modules/.bin/wrangler2 new file mode 120000 index 0000000..dc4c14f --- /dev/null +++ b/node_modules/.bin/wrangler2 @@ -0,0 +1 @@ +../wrangler/bin/wrangler.js \ No newline at end of file diff --git a/node_modules/.cache/wrangler/wrangler-account.json b/node_modules/.cache/wrangler/wrangler-account.json new file mode 100644 index 0000000..0dcc650 --- /dev/null +++ b/node_modules/.cache/wrangler/wrangler-account.json @@ -0,0 +1,6 @@ +{ + "account": { + "id": "d5a01bf1d8c04e3d9a0ebc95e004d750", + "name": "Zhujiawei2014827@hotmail.com's Account" + } +} \ No newline at end of file diff --git a/node_modules/.mf/cf.json b/node_modules/.mf/cf.json new file mode 100644 index 0000000..624e3a9 --- /dev/null +++ b/node_modules/.mf/cf.json @@ -0,0 +1 @@ +{"clientTcpRtt":217,"requestHeaderNames":{},"httpProtocol":"HTTP/1.1","tlsCipher":"AEAD-AES256-GCM-SHA384","continent":"AS","asn":56041,"clientAcceptEncoding":"br, gzip, deflate","verifiedBotCategory":"","country":"CN","region":"Zhejiang","tlsClientCiphersSha1":"JZtiTn8H/ntxORk+XXvU2EvNoz8=","tlsClientAuth":{"certIssuerDNLegacy":"","certIssuerSKI":"","certSubjectDNRFC2253":"","certSubjectDNLegacy":"","certFingerprintSHA256":"","certNotBefore":"","certSKI":"","certSerial":"","certIssuerDN":"","certVerified":"NONE","certNotAfter":"","certSubjectDN":"","certPresented":"0","certRevoked":"0","certIssuerSerial":"","certIssuerDNRFC2253":"","certFingerprintSHA1":""},"tlsClientRandom":"uEunmUuE/IOYS32CsnvJAwTB8R0QjlGrawEp+bbfmBI=","tlsExportedAuthenticator":{"clientFinished":"ab4e78d693d74f64ed82d6e2196dda025900770a5c2aa417ee644e7a338f632ba5e4e141b0f45d76c5e26ec5dff72118","clientHandshake":"f505df5b997fcd68066c25649733a7305f20194f6106fd1970ffb4488ae1c5caabf225c6be2683127ccb7f07734dacd8","serverHandshake":"21f8f680d19be89c183b809c2edf6181bf3fbb8be856ffb45ead28c960c4752310b784bf9d9bcaa27463814562d0c6fa","serverFinished":"4649048cef5e00b364c5c3704f31554f955dbf7a32bb7d98c667b98a0eb394b543fdcf5388ec12694a1894f69b5b461b"},"tlsClientHelloLength":"386","colo":"LAX","timezone":"Asia/Shanghai","longitude":"120.56760","latitude":"30.00340","edgeRequestKeepAliveStatus":1,"requestPriority":"","city":"Shaoxing","tlsVersion":"TLSv1.3","regionCode":"ZJ","asOrganization":"China Mobile","tlsClientExtensionsSha1Le":"6e+q3vPm88rSgMTN/h7WTTxQ2wQ=","tlsClientExtensionsSha1":"Y7DIC8A6G0/aXviZ8ie/xDbJb7g=","botManagement":{"corporateProxy":false,"verifiedBot":false,"jsDetection":{"passed":false},"staticResource":false,"detectionIds":{},"score":99}} \ No newline at end of file diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json new file mode 100644 index 0000000..b6d5200 --- /dev/null +++ b/node_modules/.package-lock.json @@ -0,0 +1,638 @@ +{ + "name": "fileshare", + "lockfileVersion": 3, + "requires": true, + "packages": { + "node_modules/@cloudflare/kv-asset-handler": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@cloudflare/kv-asset-handler/-/kv-asset-handler-0.4.0.tgz", + "integrity": "sha512-+tv3z+SPp+gqTIcImN9o0hqE9xyfQjI1XD9pL6NuKjua9B1y7mNYv0S9cP+QEbA4ppVgGZEmKOvHX5G5Ei1CVA==", + "license": "MIT OR Apache-2.0", + "dependencies": { + "mime": "^3.0.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@cloudflare/unenv-preset": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@cloudflare/unenv-preset/-/unenv-preset-2.3.2.tgz", + "integrity": "sha512-MtUgNl+QkQyhQvv5bbWP+BpBC1N0me4CHHuP2H4ktmOMKdB/6kkz/lo+zqiA4mEazb4y+1cwyNjVrQ2DWeE4mg==", + "license": "MIT OR Apache-2.0", + "peerDependencies": { + "unenv": "2.0.0-rc.17", + "workerd": "^1.20250508.0" + }, + "peerDependenciesMeta": { + "workerd": { + "optional": true + } + } + }, + "node_modules/@cloudflare/workerd-darwin-64": { + "version": "1.20250508.0", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20250508.0.tgz", + "integrity": "sha512-9x09MrA9Y5RQs3zqWvWns8xHgM2pVNXWpeJ+3hQYu4PrwPFZXtTD6b/iMmOnlYKzINlREq1RGeEybMFyWEUlUg==", + "cpu": [ + "x64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16" + } + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.4.tgz", + "integrity": "sha512-CJsry8ZGM5VFVeyUYB3cdKpd/H69PYez4eJh1W/t38vzutdjEjtP7hB6eLKBoOdxcAlCtEYHzQ/PJ/oU9I4u0A==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@fastify/busboy": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", + "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==", + "license": "MIT", + "engines": { + "node": ">=14" + } + }, + "node_modules/@img/sharp-darwin-x64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.33.5.tgz", + "integrity": "sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q==", + "cpu": [ + "x64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-x64": "1.0.4" + } + }, + "node_modules/@img/sharp-libvips-darwin-x64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.0.4.tgz", + "integrity": "sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ==", + "cpu": [ + "x64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "darwin" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/acorn": { + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz", + "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/as-table": { + "version": "1.0.55", + "resolved": "https://registry.npmjs.org/as-table/-/as-table-1.0.55.tgz", + "integrity": "sha512-xvsWESUJn0JN421Xb9MQw6AsMHRCUknCe0Wjlxvjud80mU4E6hQf1A6NzQKcYNmYw62MfzEtXc+badstZP3JpQ==", + "license": "MIT", + "dependencies": { + "printable-characters": "^1.0.42" + } + }, + "node_modules/blake3-wasm": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/blake3-wasm/-/blake3-wasm-2.1.5.tgz", + "integrity": "sha512-F1+K8EbfOZE49dtoPtmxUQrpXaBIl3ICvasLh+nJta0xkz+9kF/7uet9fLnwKqhDrmj6g+6K3Tw9yQPUg2ka5g==", + "license": "MIT" + }, + "node_modules/color": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", + "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1", + "color-string": "^1.9.0" + }, + "engines": { + "node": ">=12.5.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT" + }, + "node_modules/color-string": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", + "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", + "license": "MIT", + "dependencies": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "node_modules/cookie": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/data-uri-to-buffer": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-2.0.2.tgz", + "integrity": "sha512-ND9qDTLc6diwj+Xe5cdAgVTbLVdXbtxTJRXRhli8Mowuaan+0EJOtdqJ0QCHNSSPyoXGx9HX2/VMnKeC34AChA==", + "license": "MIT" + }, + "node_modules/defu": { + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.4.tgz", + "integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==", + "license": "MIT" + }, + "node_modules/detect-libc": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.4.tgz", + "integrity": "sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==", + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/esbuild": { + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.4.tgz", + "integrity": "sha512-8pgjLUcUjcgDg+2Q4NYXnPbo/vncAY4UmyaCm0jZevERqCHZIaWwdJHkf8XQtu4AxSKCdvrUbT0XUr1IdZzI8Q==", + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.4", + "@esbuild/android-arm": "0.25.4", + "@esbuild/android-arm64": "0.25.4", + "@esbuild/android-x64": "0.25.4", + "@esbuild/darwin-arm64": "0.25.4", + "@esbuild/darwin-x64": "0.25.4", + "@esbuild/freebsd-arm64": "0.25.4", + "@esbuild/freebsd-x64": "0.25.4", + "@esbuild/linux-arm": "0.25.4", + "@esbuild/linux-arm64": "0.25.4", + "@esbuild/linux-ia32": "0.25.4", + "@esbuild/linux-loong64": "0.25.4", + "@esbuild/linux-mips64el": "0.25.4", + "@esbuild/linux-ppc64": "0.25.4", + "@esbuild/linux-riscv64": "0.25.4", + "@esbuild/linux-s390x": "0.25.4", + "@esbuild/linux-x64": "0.25.4", + "@esbuild/netbsd-arm64": "0.25.4", + "@esbuild/netbsd-x64": "0.25.4", + "@esbuild/openbsd-arm64": "0.25.4", + "@esbuild/openbsd-x64": "0.25.4", + "@esbuild/sunos-x64": "0.25.4", + "@esbuild/win32-arm64": "0.25.4", + "@esbuild/win32-ia32": "0.25.4", + "@esbuild/win32-x64": "0.25.4" + } + }, + "node_modules/exit-hook": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-2.2.1.tgz", + "integrity": "sha512-eNTPlAD67BmP31LDINZ3U7HSF8l57TxOY2PmBJ1shpCvpnxBF93mWCE8YHBnXs8qiUZJc9WDcWIeC3a2HIAMfw==", + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/exsolve": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/exsolve/-/exsolve-1.0.5.tgz", + "integrity": "sha512-pz5dvkYYKQ1AHVrgOzBKWeP4u4FRb3a6DNK2ucr0OoNwYIU4QWsJ+NM36LLzORT+z845MzKHHhpXiUF5nvQoJg==", + "license": "MIT" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/get-source": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/get-source/-/get-source-2.0.12.tgz", + "integrity": "sha512-X5+4+iD+HoSeEED+uwrQ07BOQr0kEDFMVqqpBuI+RaZBpBpHCuXxo70bjar6f0b0u/DQJsJ7ssurpP0V60Az+w==", + "license": "Unlicense", + "dependencies": { + "data-uri-to-buffer": "^2.0.0", + "source-map": "^0.6.1" + } + }, + "node_modules/glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "license": "BSD-2-Clause" + }, + "node_modules/is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", + "license": "MIT" + }, + "node_modules/mime": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz", + "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/miniflare": { + "version": "4.20250508.3", + "resolved": "https://registry.npmjs.org/miniflare/-/miniflare-4.20250508.3.tgz", + "integrity": "sha512-43oTmZ0CCmUcieetI5YDDyX0IiwhOcVIWzdBBCqWXK3F1XgQwg4d3fTqRyJnCmHIoaYx9CE1kTEKZC1UahPQhA==", + "license": "MIT", + "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", + "sharp": "^0.33.5", + "stoppable": "1.1.0", + "undici": "^5.28.5", + "workerd": "1.20250508.0", + "ws": "8.18.0", + "youch": "3.3.4", + "zod": "3.22.3" + }, + "bin": { + "miniflare": "bootstrap.js" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/mustache": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz", + "integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==", + "license": "MIT", + "bin": { + "mustache": "bin/mustache" + } + }, + "node_modules/ohash": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/ohash/-/ohash-2.0.11.tgz", + "integrity": "sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ==", + "license": "MIT" + }, + "node_modules/path-to-regexp": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.3.0.tgz", + "integrity": "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==", + "license": "MIT" + }, + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "license": "MIT" + }, + "node_modules/printable-characters": { + "version": "1.0.42", + "resolved": "https://registry.npmjs.org/printable-characters/-/printable-characters-1.0.42.tgz", + "integrity": "sha512-dKp+C4iXWK4vVYZmYSd0KBH5F/h1HoZRsbJ82AVKRO3PEo8L4lBS/vLwhVtpwwuYcoIsVY+1JYKR268yn480uQ==", + "license": "Unlicense" + }, + "node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/sharp": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.33.5.tgz", + "integrity": "sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==", + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "color": "^4.2.3", + "detect-libc": "^2.0.3", + "semver": "^7.6.3" + }, + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "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" + } + }, + "node_modules/simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.3.1" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stacktracey": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/stacktracey/-/stacktracey-2.1.8.tgz", + "integrity": "sha512-Kpij9riA+UNg7TnphqjH7/CzctQ/owJGNbFkfEeve4Z4uxT5+JapVLFXcsurIfN34gnTWZNJ/f7NMG0E8JDzTw==", + "license": "Unlicense", + "dependencies": { + "as-table": "^1.0.36", + "get-source": "^2.0.12" + } + }, + "node_modules/stoppable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/stoppable/-/stoppable-1.1.0.tgz", + "integrity": "sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==", + "license": "MIT", + "engines": { + "node": ">=4", + "npm": ">=6" + } + }, + "node_modules/ufo": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.1.tgz", + "integrity": "sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==", + "license": "MIT" + }, + "node_modules/undici": { + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz", + "integrity": "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==", + "license": "MIT", + "dependencies": { + "@fastify/busboy": "^2.0.0" + }, + "engines": { + "node": ">=14.0" + } + }, + "node_modules/unenv": { + "version": "2.0.0-rc.17", + "resolved": "https://registry.npmjs.org/unenv/-/unenv-2.0.0-rc.17.tgz", + "integrity": "sha512-B06u0wXkEd+o5gOCMl/ZHl5cfpYbDZKAT+HWTL+Hws6jWu7dCiqBBXXXzMFcFVJb8D4ytAnYmxJA83uwOQRSsg==", + "license": "MIT", + "dependencies": { + "defu": "^6.1.4", + "exsolve": "^1.0.4", + "ohash": "^2.0.11", + "pathe": "^2.0.3", + "ufo": "^1.6.1" + } + }, + "node_modules/workerd": { + "version": "1.20250508.0", + "resolved": "https://registry.npmjs.org/workerd/-/workerd-1.20250508.0.tgz", + "integrity": "sha512-ffLxe7dXSuGoA6jb3Qx2SClIV1aLHfJQ6RhGhzYHjQgv7dL6fdUOSIIGgzmu2mRKs+WFSujp6c8WgKquco6w3w==", + "hasInstallScript": true, + "license": "Apache-2.0", + "bin": { + "workerd": "bin/workerd" + }, + "engines": { + "node": ">=16" + }, + "optionalDependencies": { + "@cloudflare/workerd-darwin-64": "1.20250508.0", + "@cloudflare/workerd-darwin-arm64": "1.20250508.0", + "@cloudflare/workerd-linux-64": "1.20250508.0", + "@cloudflare/workerd-linux-arm64": "1.20250508.0", + "@cloudflare/workerd-windows-64": "1.20250508.0" + } + }, + "node_modules/wrangler": { + "version": "4.16.1", + "resolved": "https://registry.npmjs.org/wrangler/-/wrangler-4.16.1.tgz", + "integrity": "sha512-YiLdWXcaQva2K/bqokpsZbySPmoT8TJFyJPsQPZumnkgimM9+/g/yoXArByA+pf+xU8jhw7ybQ8X1yBGXv731g==", + "license": "MIT OR Apache-2.0", + "dependencies": { + "@cloudflare/kv-asset-handler": "0.4.0", + "@cloudflare/unenv-preset": "2.3.2", + "blake3-wasm": "2.1.5", + "esbuild": "0.25.4", + "miniflare": "4.20250508.3", + "path-to-regexp": "6.3.0", + "unenv": "2.0.0-rc.17", + "workerd": "1.20250508.0" + }, + "bin": { + "wrangler": "bin/wrangler.js", + "wrangler2": "bin/wrangler.js" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2", + "sharp": "^0.33.5" + }, + "peerDependencies": { + "@cloudflare/workers-types": "^4.20250508.0" + }, + "peerDependenciesMeta": { + "@cloudflare/workers-types": { + "optional": true + } + } + }, + "node_modules/ws": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/youch": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/youch/-/youch-3.3.4.tgz", + "integrity": "sha512-UeVBXie8cA35DS6+nBkls68xaBBXCye0CNznrhszZjTbRVnJKQuNsyLKBTTL4ln1o1rh2PKtv35twV7irj5SEg==", + "license": "MIT", + "dependencies": { + "cookie": "^0.7.1", + "mustache": "^4.2.0", + "stacktracey": "^2.1.8" + } + }, + "node_modules/zod": { + "version": "3.22.3", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.3.tgz", + "integrity": "sha512-EjIevzuJRiRPbVH4mGc8nApb/lVLKVpmUhAaR5R5doKGfAnGJ6Gr3CViAVjP+4FWSxCsybeWQdcgCtbX+7oZug==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + } + } +} diff --git a/node_modules/@cloudflare/kv-asset-handler/README.md b/node_modules/@cloudflare/kv-asset-handler/README.md new file mode 100644 index 0000000..467b4e4 --- /dev/null +++ b/node_modules/@cloudflare/kv-asset-handler/README.md @@ -0,0 +1,346 @@ +# @cloudflare/kv-asset-handler + +[![npm](https://img.shields.io/npm/v/@cloudflare/kv-asset-handler.svg)](https://www.npmjs.com/package/@cloudflare/kv-asset-handler)   +[![Run npm tests](https://github.com/cloudflare/kv-asset-handler/actions/workflows/test.yml/badge.svg)](https://github.com/cloudflare/kv-asset-handler/actions/workflows/test.yml)   +[![Lint Markdown](https://github.com/cloudflare/kv-asset-handler/actions/workflows/lint.yml/badge.svg)](https://github.com/cloudflare/kv-asset-handler/actions/workflows/lint.yml)   + +`kv-asset-handler` is an open-source library for managing the retrieval of static assets from [Workers KV](https://developers.cloudflare.com/workers/runtime-apis/kv) inside of a [Cloudflare Workers](https://workers.dev) function. `kv-asset-handler` is designed for use with [Workers Sites](https://developers.cloudflare.com/workers/platform/sites), a feature included in [Wrangler](https://github.com/cloudflare/wrangler), our command-line tool for deploying Workers projects. + +`kv-asset-handler` runs as part of a Cloudflare Workers function, so it allows you to customize _how_ and _when_ your static assets are loaded, as well as customize how those assets behave before they're sent to the client. + +Most users and sites will not need these customizations, and just want to serve their statically built applications. For that simple use-case, you can check out [Cloudflare Pages](https://pages.cloudflare.com), our batteries-included approach to deploying static sites on Cloudflare's edge network. Workers Sites was designed as a precursor to Cloudflare Pages, so check out Pages if you just want to deploy your static site without any special customizations! + +For users who _do_ want to customize their assets, and want to build complex experiences on top of their static assets, `kv-asset-handler` (and the default [Workers Sites template](https://github.com/cloudflare/worker-sites-template), which is provided for use with Wrangler + Workers Sites) allows you to customize caching behavior, headers, and anything else about how your Workers function loads the static assets for your site stored in Workers KV. + +The Cloudflare Workers Discord server is an active place where Workers users get help, share feedback, and collaborate on making our platform better. The `#workers` channel in particular is a great place to chat about `kv-asset-handler`, and building cool experiences for your users using these tools! If you have questions, want to share what you're working on, or give feedback, [join us in Discord and say hello](https://discord.cloudflare.com)! + +- [Installation](#installation) +- [Usage](#usage) +- [`getAssetFromKV`](#getassetfromkv) + - [Example](#example) + * [Return](#return) + * [Optional Arguments](#optional-arguments) + - [`mapRequestToAsset`](#maprequesttoasset) + - [Example](#example-1) + - [`cacheControl`](#cachecontrol) + - [`browserTTL`](#browserttl) + - [`edgeTTL`](#edgettl) + - [`bypassCache`](#bypasscache) + - [`ASSET_NAMESPACE` (required for ES Modules)](#asset_namespace-required-for-es-modules) + - [`ASSET_MANIFEST` (required for ES Modules)](#asset_manifest-required-for-es-modules) + - [`defaultETag`](#defaultetag-optional) + +* [Helper functions](#helper-functions) + - [`mapRequestToAsset`](#maprequesttoasset-1) + - [`serveSinglePageApp`](#servesinglepageapp) +* [Cache revalidation and etags](#cache-revalidation-and-etags) + +## Installation + +Add this package to your `package.json` by running this in the root of your +project's directory: + +``` +npm i @cloudflare/kv-asset-handler +``` + +## Usage + +This package was designed to work with [Worker Sites](https://workers.cloudflare.com/sites). + +## `getAssetFromKV` + +getAssetFromKV(Evt) => Promise + +`getAssetFromKV` is an async function that takes an `Evt` object (containing a `Request` and a [`waitUntil`](https://developers.cloudflare.com/workers/runtime-apis/fetch-event#waituntil)) and returns a `Response` object if the request matches an asset in KV, otherwise it will throw a `KVError`. + +#### Example + +This example checks for the existence of a value in KV, and returns it if it's there, and returns a 404 if it is not. It also serves index.html from `/`. + +### Return + +`getAssetFromKV` returns a `Promise` with `Response` being the body of the asset requested. + +Known errors to be thrown are: + +- MethodNotAllowedError +- NotFoundError +- InternalError + +#### ES Modules + +```js +import manifestJSON from "__STATIC_CONTENT_MANIFEST"; +import { + getAssetFromKV, + MethodNotAllowedError, + NotFoundError, +} from "@cloudflare/kv-asset-handler"; + +const assetManifest = JSON.parse(manifestJSON); + +export default { + async fetch(request, env, ctx) { + if (request.url.includes("/docs")) { + try { + return await getAssetFromKV( + { + request, + waitUntil(promise) { + return ctx.waitUntil(promise); + }, + }, + { + ASSET_NAMESPACE: env.__STATIC_CONTENT, + ASSET_MANIFEST: assetManifest, + } + ); + } catch (e) { + if (e instanceof NotFoundError) { + // ... + } else if (e instanceof MethodNotAllowedError) { + // ... + } else { + return new Response("An unexpected error occurred", { status: 500 }); + } + } + } else return fetch(request); + }, +}; +``` + +#### Service Worker + +```js +import { + getAssetFromKV, + MethodNotAllowedError, + NotFoundError, +} from "@cloudflare/kv-asset-handler"; + +addEventListener("fetch", (event) => { + event.respondWith(handleEvent(event)); +}); + +async function handleEvent(event) { + if (event.request.url.includes("/docs")) { + try { + return await getAssetFromKV(event); + } catch (e) { + if (e instanceof NotFoundError) { + // ... + } else if (e instanceof MethodNotAllowedError) { + // ... + } else { + return new Response("An unexpected error occurred", { status: 500 }); + } + } + } else return fetch(event.request); +} +``` + +### Optional Arguments + +You can customize the behavior of `getAssetFromKV` by passing the following properties as an object into the second argument. + +``` +getAssetFromKV(event, { mapRequestToAsset: ... }) +``` + +#### `mapRequestToAsset` + +mapRequestToAsset(Request) => Request + +Maps the incoming request to the value that will be looked up in Cloudflare's KV + +By default, mapRequestToAsset is set to the exported function [`mapRequestToAsset`](#maprequesttoasset-1). This works for most static site generators, but you can customize this behavior by passing your own function as `mapRequestToAsset`. The function should take a `Request` object as its only argument, and return a new `Request` object with an updated path to be looked up in the asset manifest/KV. + +For SPA mapping pass in the [`serveSinglePageApp`](#servesinglepageapp) function + +#### Example + +Strip `/docs` from any incoming request before looking up an asset in Cloudflare's KV. + +```js +import { getAssetFromKV, mapRequestToAsset } from '@cloudflare/kv-asset-handler' +... +const customKeyModifier = request => { + let url = request.url + //custom key mapping optional + url = url.replace('/docs', '').replace(/^\/+/, '') + return mapRequestToAsset(new Request(url, request)) +} +let asset = await getAssetFromKV(event, { mapRequestToAsset: customKeyModifier }) +``` + +#### `cacheControl` + +type: object + +`cacheControl` allows you to configure options for both the Cloudflare Cache accessed by your Worker, and the browser cache headers sent along with your Workers' responses. The default values are as follows: + +```javascript +let cacheControl = { + browserTTL: null, // do not set cache control ttl on responses + edgeTTL: 2 * 60 * 60 * 24, // 2 days + bypassCache: false, // do not bypass Cloudflare's cache +}; +``` + +##### `browserTTL` + +type: number | null +nullable: true + +Sets the `Cache-Control: max-age` header on the response returned from the Worker. By default set to `null` which will not add the header at all. + +##### `edgeTTL` + +type: number | null +nullable: true + +Sets the `Cache-Control: max-age` header on the response used as the edge cache key. By default set to 2 days (`2 * 60 * 60 * 24`). When null will not cache on the edge at all. + +##### `bypassCache` + +type: boolean + +Determines whether to cache requests on Cloudflare's edge cache. By default set to `false` (recommended for production builds). Useful for development when you need to eliminate the cache's effect on testing. + +#### `ASSET_NAMESPACE` (required for ES Modules) + +type: KV Namespace Binding + +The binding name to the KV Namespace populated with key/value entries of files for the Worker to serve. By default, Workers Sites uses a [binding to a Workers KV Namespace](https://developers.cloudflare.com/workers/reference/storage/api/#namespaces) named `__STATIC_CONTENT`. + +It is further assumed that this namespace consists of static assets such as HTML, CSS, JavaScript, or image files, keyed off of a relative path that roughly matches the assumed URL pathname of the incoming request. + +In ES Modules format, this argument is required, and can be gotten from `env`. + +##### ES Module + +```js +return getAssetFromKV( + { + request, + waitUntil(promise) { + return ctx.waitUntil(promise) + }, + }, + { + ASSET_NAMESPACE: env.__STATIC_CONTENT, + }, +) +``` + +##### Service Worker + +``` +return getAssetFromKV(event, { ASSET_NAMESPACE: MY_NAMESPACE }) +``` + +#### `ASSET_MANIFEST` (required for ES Modules) + +type: text blob (JSON formatted) or object + +The mapping of requested file path to the key stored on Cloudflare. + +Workers Sites with Wrangler bundles up a text blob that maps request paths to content-hashed keys that are generated by Wrangler as a cache-busting measure. If this option/binding is not present, the function will fallback to using the raw pathname to look up your asset in KV. If, for whatever reason, you have rolled your own implementation of this, you can include your own by passing a stringified JSON object where the keys are expected paths, and the values are the expected keys in your KV namespace. + +In ES Modules format, this argument is required, and can be imported. + +##### ES Module + +```js +import manifestJSON from '__STATIC_CONTENT_MANIFEST' +let manifest = JSON.parse(manifestJSON) +manifest['index.html'] = 'index.special.html' + +return getAssetFromKV( + { + request, + waitUntil(promise) { + return ctx.waitUntil(promise) + }, + }, + { + ASSET_MANIFEST: manifest, + // ... + }, +) +``` + +##### Service Worker + +``` +let assetManifest = { "index.html": "index.special.html" } +return getAssetFromKV(event, { ASSET_MANIFEST: assetManifest }) +``` + +#### `defaultMimeType` (optional) + +type: string + +This is the mime type that will be used for files with unrecognized or missing extensions. The default value is `'text/plain'`. + +If you are serving a static site and would like to use extensionless HTML files instead of index.html files, set this to `'text/html'`. + +#### `defaultDocument` (optional) + +type: string + +This is the default document that will be concatenated for requests ends in `'/'` or without a valid mime type like `'/about'` or `'/about.me'`. The default value is `'index.html'`. + +#### `defaultETag` (optional) + +type: `'strong' | 'weak'` + +This determines the format of the response [ETag header](https://developer.mozilla.org/docs/Web/HTTP/Headers/ETag). If the resource is in the cache, the ETag will always be weakened before being returned. +The default value is `'strong'`. + +# Helper functions + +## `mapRequestToAsset` + +mapRequestToAsset(Request) => Request + +The default function for mapping incoming requests to keys in Cloudflare's KV. + +Takes any path that ends in `/` or evaluates to an HTML file and appends `index.html` or `/index.html` for lookup in your Workers KV namespace. + +## `serveSinglePageApp` + +serveSinglePageApp(Request) => Request + +A custom handler for mapping requests to a single root: `index.html`. The most common use case is single-page applications - frameworks with in-app routing - such as React Router, VueJS, etc. It takes zero arguments. + +```js +import { getAssetFromKV, serveSinglePageApp } from '@cloudflare/kv-asset-handler' +... +let asset = await getAssetFromKV(event, { mapRequestToAsset: serveSinglePageApp }) +``` + +# Cache revalidation and etags + +All responses served from cache (including those with `cf-cache-status: MISS`) include an `etag` response header that identifies the version of the resource. The `etag` value is identical to the path key used in the `ASSET_MANIFEST`. It is updated each time an asset changes and looks like this: `etag: ..` (ex. `etag: index.54321.html`). + +Resources served with an `etag` allow browsers to use the `if-none-match` request header to make conditional requests for that resource in the future. This has two major benefits: + +- When a request's `if-none-match` value matches the `etag` of the resource in Cloudflare cache, Cloudflare will send a `304 Not Modified` response without a body, saving bandwidth. +- Changes to a file on the server are immediately reflected in the browser - even when the cache control directive `max-age` is unexpired. + +#### Disable the `etag` + +To turn `etags` **off**, you must bypass cache: + +```js +/* Turn etags off */ +let cacheControl = { + bypassCache: true, +}; +``` + +#### Syntax and comparison context + +`kv-asset-handler` sets and evaluates etags as [strong validators](https://developer.mozilla.org/en-US/docs/Web/HTTP/Conditional_requests#Strong_validation). To preserve `etag` integrity, the format of the value deviates from the [RFC2616 recommendation to enclose the `etag` with quotation marks](https://tools.ietf.org/html/rfc2616#section-3.11). This is intentional. Cloudflare cache applies the `W/` prefix to all `etags` that use quoted-strings -- a process that converts the `etag` to a "weak validator" when served to a client. diff --git a/node_modules/@cloudflare/kv-asset-handler/dist/index.d.ts b/node_modules/@cloudflare/kv-asset-handler/dist/index.d.ts new file mode 100644 index 0000000..7ba16cb --- /dev/null +++ b/node_modules/@cloudflare/kv-asset-handler/dist/index.d.ts @@ -0,0 +1,36 @@ +import { CacheControl, InternalError, MethodNotAllowedError, NotFoundError, Options } from "./types"; +declare global { + const __STATIC_CONTENT: KVNamespace | undefined, __STATIC_CONTENT_MANIFEST: string; +} +/** + * maps the path of incoming request to the request pathKey to look up + * in bucket and in cache + * e.g. for a path '/' returns '/index.html' which serves + * the content of bucket/index.html + * @param {Request} request incoming request + */ +declare const mapRequestToAsset: (request: Request, options?: Partial) => Request>; +/** + * maps the path of incoming request to /index.html if it evaluates to + * any HTML file. + * @param {Request} request incoming request + */ +declare function serveSinglePageApp(request: Request, options?: Partial): Request; +/** + * takes the path of the incoming request, gathers the appropriate content from KV, and returns + * the response + * + * @param {FetchEvent} event the fetch event of the triggered request + * @param {{mapRequestToAsset: (string: Request) => Request, cacheControl: {bypassCache:boolean, edgeTTL: number, browserTTL:number}, ASSET_NAMESPACE: any, ASSET_MANIFEST:any}} [options] configurable options + * @param {CacheControl} [options.cacheControl] determine how to cache on Cloudflare and the browser + * @param {typeof(options.mapRequestToAsset)} [options.mapRequestToAsset] maps the path of incoming request to the request pathKey to look up + * @param {Object | string} [options.ASSET_NAMESPACE] the binding to the namespace that script references + * @param {any} [options.ASSET_MANIFEST] the map of the key to cache and store in KV + * */ +type Evt = { + request: Request; + waitUntil: (promise: Promise) => void; +}; +declare const getAssetFromKV: (event: Evt, options?: Partial) => Promise; +export { getAssetFromKV, mapRequestToAsset, serveSinglePageApp }; +export { Options, CacheControl, MethodNotAllowedError, NotFoundError, InternalError, }; diff --git a/node_modules/@cloudflare/kv-asset-handler/dist/index.js b/node_modules/@cloudflare/kv-asset-handler/dist/index.js new file mode 100644 index 0000000..b056153 --- /dev/null +++ b/node_modules/@cloudflare/kv-asset-handler/dist/index.js @@ -0,0 +1,308 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + 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; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.InternalError = exports.NotFoundError = exports.MethodNotAllowedError = exports.mapRequestToAsset = exports.getAssetFromKV = void 0; +exports.serveSinglePageApp = serveSinglePageApp; +const mime = __importStar(require("mime")); +const types_1 = require("./types"); +Object.defineProperty(exports, "InternalError", { enumerable: true, get: function () { return types_1.InternalError; } }); +Object.defineProperty(exports, "MethodNotAllowedError", { enumerable: true, get: function () { return types_1.MethodNotAllowedError; } }); +Object.defineProperty(exports, "NotFoundError", { enumerable: true, get: function () { return types_1.NotFoundError; } }); +const defaultCacheControl = { + browserTTL: null, + edgeTTL: 2 * 60 * 60 * 24, // 2 days + bypassCache: false, // do not bypass Cloudflare's cache +}; +const parseStringAsObject = (maybeString) => typeof maybeString === "string" + ? JSON.parse(maybeString) + : maybeString; +const getAssetFromKVDefaultOptions = { + ASSET_NAMESPACE: typeof __STATIC_CONTENT !== "undefined" ? __STATIC_CONTENT : undefined, + ASSET_MANIFEST: typeof __STATIC_CONTENT_MANIFEST !== "undefined" + ? parseStringAsObject(__STATIC_CONTENT_MANIFEST) + : {}, + cacheControl: defaultCacheControl, + defaultMimeType: "text/plain", + defaultDocument: "index.html", + pathIsEncoded: false, + defaultETag: "strong", +}; +function assignOptions(options) { + // Assign any missing options passed in to the default + // options.mapRequestToAsset is handled manually later + return Object.assign({}, getAssetFromKVDefaultOptions, options); +} +/** + * maps the path of incoming request to the request pathKey to look up + * in bucket and in cache + * e.g. for a path '/' returns '/index.html' which serves + * the content of bucket/index.html + * @param {Request} request incoming request + */ +const mapRequestToAsset = (request, options) => { + options = assignOptions(options); + const parsedUrl = new URL(request.url); + let pathname = parsedUrl.pathname; + if (pathname.endsWith("/")) { + // If path looks like a directory append options.defaultDocument + // e.g. If path is /about/ -> /about/index.html + pathname = pathname.concat(options.defaultDocument); + } + else if (!mime.getType(pathname)) { + // If path doesn't look like valid content + // e.g. /about.me -> /about.me/index.html + pathname = pathname.concat("/" + options.defaultDocument); + } + parsedUrl.pathname = pathname; + return new Request(parsedUrl.toString(), request); +}; +exports.mapRequestToAsset = mapRequestToAsset; +/** + * maps the path of incoming request to /index.html if it evaluates to + * any HTML file. + * @param {Request} request incoming request + */ +function serveSinglePageApp(request, options) { + options = assignOptions(options); + // First apply the default handler, which already has logic to detect + // paths that should map to HTML files. + request = mapRequestToAsset(request, options); + const parsedUrl = new URL(request.url); + // Detect if the default handler decided to map to + // a HTML file in some specific directory. + if (parsedUrl.pathname.endsWith(".html")) { + // If expected HTML file was missing, just return the root index.html (or options.defaultDocument) + return new Request(`${parsedUrl.origin}/${options.defaultDocument}`, request); + } + else { + // The default handler decided this is not an HTML page. It's probably + // an image, CSS, or JS file. Leave it as-is. + return request; + } +} +const getAssetFromKV = async (event, options) => { + options = assignOptions(options); + const request = event.request; + const ASSET_NAMESPACE = options.ASSET_NAMESPACE; + const ASSET_MANIFEST = parseStringAsObject(options.ASSET_MANIFEST); + if (typeof ASSET_NAMESPACE === "undefined") { + throw new types_1.InternalError(`there is no KV namespace bound to the script`); + } + const rawPathKey = new URL(request.url).pathname.replace(/^\/+/, ""); // strip any preceding /'s + let pathIsEncoded = options.pathIsEncoded; + let requestKey; + // if options.mapRequestToAsset is explicitly passed in, always use it and assume user has own intentions + // otherwise handle request as normal, with default mapRequestToAsset below + if (options.mapRequestToAsset) { + requestKey = options.mapRequestToAsset(request); + } + else if (ASSET_MANIFEST[rawPathKey]) { + requestKey = request; + } + else if (ASSET_MANIFEST[decodeURIComponent(rawPathKey)]) { + pathIsEncoded = true; + requestKey = request; + } + else { + const mappedRequest = mapRequestToAsset(request); + const mappedRawPathKey = new URL(mappedRequest.url).pathname.replace(/^\/+/, ""); + if (ASSET_MANIFEST[decodeURIComponent(mappedRawPathKey)]) { + pathIsEncoded = true; + requestKey = mappedRequest; + } + else { + // use default mapRequestToAsset + requestKey = mapRequestToAsset(request, options); + } + } + const SUPPORTED_METHODS = ["GET", "HEAD"]; + if (!SUPPORTED_METHODS.includes(requestKey.method)) { + throw new types_1.MethodNotAllowedError(`${requestKey.method} is not a valid request method`); + } + const parsedUrl = new URL(requestKey.url); + const pathname = pathIsEncoded + ? decodeURIComponent(parsedUrl.pathname) + : parsedUrl.pathname; // decode percentage encoded path only when necessary + // pathKey is the file path to look up in the manifest + let pathKey = pathname.replace(/^\/+/, ""); // remove prepended / + // @ts-expect-error we should pick cf types here + const cache = caches.default; + let mimeType = mime.getType(pathKey) || options.defaultMimeType; + if (mimeType.startsWith("text") || mimeType === "application/javascript") { + mimeType += "; charset=utf-8"; + } + let shouldEdgeCache = false; // false if storing in KV by raw file path i.e. no hash + // check manifest for map from file path to hash + if (typeof ASSET_MANIFEST !== "undefined") { + if (ASSET_MANIFEST[pathKey]) { + pathKey = ASSET_MANIFEST[pathKey]; + // if path key is in asset manifest, we can assume it contains a content hash and can be cached + shouldEdgeCache = true; + } + } + // TODO this excludes search params from cache, investigate ideal behavior + const cacheKey = new Request(`${parsedUrl.origin}/${pathKey}`, request); + // if argument passed in for cacheControl is a function then + // evaluate that function. otherwise return the Object passed in + // or default Object + const evalCacheOpts = (() => { + switch (typeof options.cacheControl) { + case "function": + return options.cacheControl(request); + case "object": + return options.cacheControl; + default: + return defaultCacheControl; + } + })(); + // formats the etag depending on the response context. if the entityId + // is invalid, returns an empty string (instead of null) to prevent the + // the potentially disastrous scenario where the value of the Etag resp + // header is "null". Could be modified in future to base64 encode etc + const formatETag = (entityId = pathKey, validatorType = options.defaultETag) => { + if (!entityId) { + return ""; + } + switch (validatorType) { + case "weak": + if (!entityId.startsWith("W/")) { + if (entityId.startsWith(`"`) && entityId.endsWith(`"`)) { + return `W/${entityId}`; + } + return `W/"${entityId}"`; + } + return entityId; + case "strong": + if (entityId.startsWith(`W/"`)) { + entityId = entityId.replace("W/", ""); + } + if (!entityId.endsWith(`"`)) { + entityId = `"${entityId}"`; + } + return entityId; + default: + return ""; + } + }; + options.cacheControl = Object.assign({}, defaultCacheControl, evalCacheOpts); + // override shouldEdgeCache if options say to bypassCache + if (options.cacheControl.bypassCache || + options.cacheControl.edgeTTL === null || + request.method == "HEAD") { + shouldEdgeCache = false; + } + // only set max-age if explicitly passed in a number as an arg + const shouldSetBrowserCache = typeof options.cacheControl.browserTTL === "number"; + let response = null; + if (shouldEdgeCache) { + response = await cache.match(cacheKey); + } + if (response) { + if (response.status > 300 && response.status < 400) { + if (response.body && "cancel" in Object.getPrototypeOf(response.body)) { + // Body exists and environment supports readable streams + response.body.cancel(); + } + else { + // Environment doesnt support readable streams, or null repsonse body. Nothing to do + } + response = new Response(null, response); + } + else { + // fixes #165 + const opts = { + headers: new Headers(response.headers), + status: 0, + statusText: "", + }; + opts.headers.set("cf-cache-status", "HIT"); + if (response.status) { + opts.status = response.status; + opts.statusText = response.statusText; + } + else if (opts.headers.has("Content-Range")) { + opts.status = 206; + opts.statusText = "Partial Content"; + } + else { + opts.status = 200; + opts.statusText = "OK"; + } + response = new Response(response.body, opts); + } + } + else { + const body = await ASSET_NAMESPACE.get(pathKey, "arrayBuffer"); + if (body === null) { + throw new types_1.NotFoundError(`could not find ${pathKey} in your content namespace`); + } + response = new Response(body); + if (shouldEdgeCache) { + response.headers.set("Accept-Ranges", "bytes"); + response.headers.set("Content-Length", String(body.byteLength)); + // set etag before cache insertion + if (!response.headers.has("etag")) { + response.headers.set("etag", formatETag(pathKey)); + } + // determine Cloudflare cache behavior + response.headers.set("Cache-Control", `max-age=${options.cacheControl.edgeTTL}`); + event.waitUntil(cache.put(cacheKey, response.clone())); + response.headers.set("CF-Cache-Status", "MISS"); + } + } + response.headers.set("Content-Type", mimeType); + if (response.status === 304) { + const etag = formatETag(response.headers.get("etag")); + const ifNoneMatch = cacheKey.headers.get("if-none-match"); + const proxyCacheStatus = response.headers.get("CF-Cache-Status"); + if (etag) { + if (ifNoneMatch && ifNoneMatch === etag && proxyCacheStatus === "MISS") { + response.headers.set("CF-Cache-Status", "EXPIRED"); + } + else { + response.headers.set("CF-Cache-Status", "REVALIDATED"); + } + response.headers.set("etag", formatETag(etag, "weak")); + } + } + if (shouldSetBrowserCache) { + response.headers.set("Cache-Control", `max-age=${options.cacheControl.browserTTL}`); + } + else { + response.headers.delete("Cache-Control"); + } + return response; +}; +exports.getAssetFromKV = getAssetFromKV; diff --git a/node_modules/@cloudflare/kv-asset-handler/dist/mocks.d.ts b/node_modules/@cloudflare/kv-asset-handler/dist/mocks.d.ts new file mode 100644 index 0000000..1a41f5d --- /dev/null +++ b/node_modules/@cloudflare/kv-asset-handler/dist/mocks.d.ts @@ -0,0 +1,14 @@ +export declare const getEvent: (request: Request) => Pick; +export declare const mockKV: (kvStore: Record) => { + get: (path: string) => string; +}; +export declare const mockManifest: () => string; +export declare const mockCaches: () => { + default: { + match(key: Request): Promise; + put(key: Request, val: Response): Promise; + }; +}; +export declare function mockRequestScope(): void; +export declare function mockGlobalScope(): void; +export declare const sleep: (milliseconds: number) => Promise; diff --git a/node_modules/@cloudflare/kv-asset-handler/dist/mocks.js b/node_modules/@cloudflare/kv-asset-handler/dist/mocks.js new file mode 100644 index 0000000..39e0369 --- /dev/null +++ b/node_modules/@cloudflare/kv-asset-handler/dist/mocks.js @@ -0,0 +1,153 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.sleep = exports.mockCaches = exports.mockManifest = exports.mockKV = exports.getEvent = void 0; +exports.mockRequestScope = mockRequestScope; +exports.mockGlobalScope = mockGlobalScope; +const service_worker_mock_1 = __importDefault(require("service-worker-mock")); +const HASH = "123HASHBROWN"; +const getEvent = (request) => { + const waitUntil = async (maybePromise) => { + await maybePromise; + }; + return { + request, + waitUntil, + }; +}; +exports.getEvent = getEvent; +const store = { + "key1.123HASHBROWN.txt": "val1", + "key1.123HASHBROWN.png": "val1", + "index.123HASHBROWN.html": "index.html", + "cache.123HASHBROWN.html": "cache me if you can", + "测试.123HASHBROWN.html": "My filename is non-ascii", + "%not-really-percent-encoded.123HASHBROWN.html": "browser percent encoded", + "%2F.123HASHBROWN.html": "user percent encoded", + "你好.123HASHBROWN.html": "I shouldnt be served", + "%E4%BD%A0%E5%A5%BD.123HASHBROWN.html": "Im important", + "nohash.txt": "no hash but still got some result", + "sub/blah.123HASHBROWN.png": "picturedis", + "sub/index.123HASHBROWN.html": "picturedis", + "client.123HASHBROWN": "important file", + "client.123HASHBROWN/index.html": "Im here but serve my big bro above", + "image.123HASHBROWN.png": "imagepng", + "image.123HASHBROWN.webp": "imagewebp", + "你好/index.123HASHBROWN.html": "My path is non-ascii", +}; +const mockKV = (kvStore) => { + return { + get: (path) => kvStore[path] || null, + }; +}; +exports.mockKV = mockKV; +const mockManifest = () => { + return JSON.stringify({ + "key1.txt": `key1.${HASH}.txt`, + "key1.png": `key1.${HASH}.png`, + "cache.html": `cache.${HASH}.html`, + "测试.html": `测试.${HASH}.html`, + "你好.html": `你好.${HASH}.html`, + "%not-really-percent-encoded.html": `%not-really-percent-encoded.${HASH}.html`, + "%2F.html": `%2F.${HASH}.html`, + "%E4%BD%A0%E5%A5%BD.html": `%E4%BD%A0%E5%A5%BD.${HASH}.html`, + "index.html": `index.${HASH}.html`, + "sub/blah.png": `sub/blah.${HASH}.png`, + "sub/index.html": `sub/index.${HASH}.html`, + client: `client.${HASH}`, + "client/index.html": `client.${HASH}`, + "image.png": `image.${HASH}.png`, + "image.webp": `image.${HASH}.webp`, + "你好/index.html": `你好/index.${HASH}.html`, + }); +}; +exports.mockManifest = mockManifest; +const cacheStore = new Map(); +const mockCaches = () => { + return { + default: { + async match(key) { + const cacheKey = { + url: key.url, + headers: {}, + }; + let response; + if (key.headers.has("if-none-match")) { + const makeStrongEtag = key.headers + .get("if-none-match") + .replace("W/", ""); + Reflect.set(cacheKey.headers, "etag", makeStrongEtag); + response = cacheStore.get(JSON.stringify(cacheKey)); + } + else { + // if client doesn't send if-none-match, we need to iterate through these keys + // and just test the URL + const activeCacheKeys = Array.from(cacheStore.keys()); + for (const cacheStoreKey of activeCacheKeys) { + if (JSON.parse(cacheStoreKey).url === key.url) { + response = cacheStore.get(cacheStoreKey); + } + } + } + // TODO: write test to accomodate for rare scenarios with where range requests accomodate etags + if (response && !key.headers.has("if-none-match")) { + // this appears overly verbose, but is necessary to document edge cache behavior + // The Range request header triggers the response header Content-Range ... + const range = key.headers.get("range"); + if (range) { + response.headers.set("content-range", `bytes ${range.split("=").pop()}/${response.headers.get("content-length")}`); + } + // ... which we are using in this repository to set status 206 + if (response.headers.has("content-range")) { + // @ts-expect-error overridding status in this mock + response.status = 206; + } + else { + // @ts-expect-error overridding status in this mock + response.status = 200; + } + const etag = response.headers.get("etag"); + if (etag && !etag.includes("W/")) { + response.headers.set("etag", `W/${etag}`); + } + } + return response; + }, + async put(key, val) { + const headers = new Headers(val.headers); + const url = new URL(key.url); + const resWithBody = new Response(val.body, { headers, status: 200 }); + const resNoBody = new Response(null, { headers, status: 304 }); + const cacheKey = { + url: key.url, + headers: { + etag: `"${url.pathname.replace("/", "")}"`, + }, + }; + cacheStore.set(JSON.stringify(cacheKey), resNoBody); + cacheKey.headers = {}; + cacheStore.set(JSON.stringify(cacheKey), resWithBody); + return; + }, + }, + }; +}; +exports.mockCaches = mockCaches; +// mocks functionality used inside worker request +function mockRequestScope() { + Object.assign(globalThis, (0, service_worker_mock_1.default)()); + Object.assign(globalThis, { __STATIC_CONTENT_MANIFEST: (0, exports.mockManifest)() }); + Object.assign(globalThis, { __STATIC_CONTENT: (0, exports.mockKV)(store) }); + Object.assign(globalThis, { caches: (0, exports.mockCaches)() }); +} +// mocks functionality used on global isolate scope. such as the KV namespace bind +function mockGlobalScope() { + Object.assign(globalThis, { __STATIC_CONTENT_MANIFEST: (0, exports.mockManifest)() }); + Object.assign(globalThis, { __STATIC_CONTENT: (0, exports.mockKV)(store) }); +} +const sleep = (milliseconds) => { + return new Promise((resolve) => setTimeout(resolve, milliseconds)); +}; +exports.sleep = sleep; diff --git a/node_modules/@cloudflare/kv-asset-handler/dist/types.d.ts b/node_modules/@cloudflare/kv-asset-handler/dist/types.d.ts new file mode 100644 index 0000000..0a8ac55 --- /dev/null +++ b/node_modules/@cloudflare/kv-asset-handler/dist/types.d.ts @@ -0,0 +1,29 @@ +export type CacheControl = { + browserTTL: number; + edgeTTL: number; + bypassCache: boolean; +}; +export type AssetManifestType = Record; +export type Options = { + cacheControl: ((req: Request) => Partial) | Partial; + ASSET_NAMESPACE: KVNamespace; + ASSET_MANIFEST: AssetManifestType | string; + mapRequestToAsset?: (req: Request, options?: Partial) => Request; + defaultMimeType: string; + defaultDocument: string; + pathIsEncoded: boolean; + defaultETag: "strong" | "weak"; +}; +export declare class KVError extends Error { + constructor(message?: string, status?: number); + status: number; +} +export declare class MethodNotAllowedError extends KVError { + constructor(message?: string, status?: number); +} +export declare class NotFoundError extends KVError { + constructor(message?: string, status?: number); +} +export declare class InternalError extends KVError { + constructor(message?: string, status?: number); +} diff --git a/node_modules/@cloudflare/kv-asset-handler/dist/types.js b/node_modules/@cloudflare/kv-asset-handler/dist/types.js new file mode 100644 index 0000000..e8ea0ab --- /dev/null +++ b/node_modules/@cloudflare/kv-asset-handler/dist/types.js @@ -0,0 +1,32 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.InternalError = exports.NotFoundError = exports.MethodNotAllowedError = exports.KVError = void 0; +class KVError extends Error { + constructor(message, status = 500) { + super(message); + // see: typescriptlang.org/docs/handbook/release-notes/typescript-2-2.html + Object.setPrototypeOf(this, new.target.prototype); // restore prototype chain + this.name = KVError.name; // stack traces display correctly now + this.status = status; + } + status; +} +exports.KVError = KVError; +class MethodNotAllowedError extends KVError { + constructor(message = `Not a valid request method`, status = 405) { + super(message, status); + } +} +exports.MethodNotAllowedError = MethodNotAllowedError; +class NotFoundError extends KVError { + constructor(message = `Not Found`, status = 404) { + super(message, status); + } +} +exports.NotFoundError = NotFoundError; +class InternalError extends KVError { + constructor(message = `Internal Error in KV Asset Handler`, status = 500) { + super(message, status); + } +} +exports.InternalError = InternalError; diff --git a/node_modules/@cloudflare/kv-asset-handler/package.json b/node_modules/@cloudflare/kv-asset-handler/package.json new file mode 100644 index 0000000..c3bba98 --- /dev/null +++ b/node_modules/@cloudflare/kv-asset-handler/package.json @@ -0,0 +1,63 @@ +{ + "name": "@cloudflare/kv-asset-handler", + "version": "0.4.0", + "description": "Routes requests to KV assets", + "keywords": [ + "kv", + "cloudflare", + "workers", + "wrangler", + "assets" + ], + "homepage": "https://github.com/cloudflare/workers-sdk#readme", + "bugs": { + "url": "https://github.com/cloudflare/workers-sdk/issues" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/cloudflare/workers-sdk.git", + "directory": "packages/kv-asset-handler" + }, + "license": "MIT OR Apache-2.0", + "author": "wrangler@cloudflare.com", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "files": [ + "src", + "dist", + "!src/test", + "!dist/test" + ], + "dependencies": { + "mime": "^3.0.0" + }, + "devDependencies": { + "@ava/typescript": "^4.1.0", + "@cloudflare/workers-types": "^4.20250310.0", + "@types/mime": "^3.0.4", + "@types/node": "^18.19.75", + "@types/service-worker-mock": "^2.0.1", + "ava": "^6.0.1", + "service-worker-mock": "^2.0.5" + }, + "engines": { + "node": ">=18.0.0" + }, + "volta": { + "extends": "../../package.json" + }, + "publishConfig": { + "access": "public" + }, + "workers-sdk": { + "prerelease": true + }, + "scripts": { + "build": "tsc -d", + "check:lint": "eslint . --max-warnings=0", + "check:type": "tsc", + "pretest": "npm run build", + "test": "ava dist/test/*.js --verbose", + "test:ci": "npm run build && ava dist/test/*.js --verbose" + } +} \ No newline at end of file diff --git a/node_modules/@cloudflare/kv-asset-handler/src/index.ts b/node_modules/@cloudflare/kv-asset-handler/src/index.ts new file mode 100644 index 0000000..6ad9156 --- /dev/null +++ b/node_modules/@cloudflare/kv-asset-handler/src/index.ts @@ -0,0 +1,356 @@ +import * as mime from "mime"; +import { + CacheControl, + InternalError, + MethodNotAllowedError, + NotFoundError, + Options, +} from "./types"; +import type { AssetManifestType } from "./types"; + +declare global { + const __STATIC_CONTENT: KVNamespace | undefined, + __STATIC_CONTENT_MANIFEST: string; +} + +const defaultCacheControl: CacheControl = { + browserTTL: null, + edgeTTL: 2 * 60 * 60 * 24, // 2 days + bypassCache: false, // do not bypass Cloudflare's cache +}; + +const parseStringAsObject = (maybeString: string | T): T => + typeof maybeString === "string" + ? (JSON.parse(maybeString) as T) + : maybeString; + +const getAssetFromKVDefaultOptions: Partial = { + ASSET_NAMESPACE: + typeof __STATIC_CONTENT !== "undefined" ? __STATIC_CONTENT : undefined, + ASSET_MANIFEST: + typeof __STATIC_CONTENT_MANIFEST !== "undefined" + ? parseStringAsObject(__STATIC_CONTENT_MANIFEST) + : {}, + cacheControl: defaultCacheControl, + defaultMimeType: "text/plain", + defaultDocument: "index.html", + pathIsEncoded: false, + defaultETag: "strong", +}; + +function assignOptions(options?: Partial): Options { + // Assign any missing options passed in to the default + // options.mapRequestToAsset is handled manually later + return Object.assign({}, getAssetFromKVDefaultOptions, options); +} + +/** + * maps the path of incoming request to the request pathKey to look up + * in bucket and in cache + * e.g. for a path '/' returns '/index.html' which serves + * the content of bucket/index.html + * @param {Request} request incoming request + */ +const mapRequestToAsset = (request: Request, options?: Partial) => { + options = assignOptions(options); + + const parsedUrl = new URL(request.url); + let pathname = parsedUrl.pathname; + + if (pathname.endsWith("/")) { + // If path looks like a directory append options.defaultDocument + // e.g. If path is /about/ -> /about/index.html + pathname = pathname.concat(options.defaultDocument); + } else if (!mime.getType(pathname)) { + // If path doesn't look like valid content + // e.g. /about.me -> /about.me/index.html + pathname = pathname.concat("/" + options.defaultDocument); + } + + parsedUrl.pathname = pathname; + return new Request(parsedUrl.toString(), request); +}; + +/** + * maps the path of incoming request to /index.html if it evaluates to + * any HTML file. + * @param {Request} request incoming request + */ +function serveSinglePageApp( + request: Request, + options?: Partial +): Request { + options = assignOptions(options); + + // First apply the default handler, which already has logic to detect + // paths that should map to HTML files. + request = mapRequestToAsset(request, options); + + const parsedUrl = new URL(request.url); + + // Detect if the default handler decided to map to + // a HTML file in some specific directory. + if (parsedUrl.pathname.endsWith(".html")) { + // If expected HTML file was missing, just return the root index.html (or options.defaultDocument) + return new Request( + `${parsedUrl.origin}/${options.defaultDocument}`, + request + ); + } else { + // The default handler decided this is not an HTML page. It's probably + // an image, CSS, or JS file. Leave it as-is. + return request; + } +} + +/** + * takes the path of the incoming request, gathers the appropriate content from KV, and returns + * the response + * + * @param {FetchEvent} event the fetch event of the triggered request + * @param {{mapRequestToAsset: (string: Request) => Request, cacheControl: {bypassCache:boolean, edgeTTL: number, browserTTL:number}, ASSET_NAMESPACE: any, ASSET_MANIFEST:any}} [options] configurable options + * @param {CacheControl} [options.cacheControl] determine how to cache on Cloudflare and the browser + * @param {typeof(options.mapRequestToAsset)} [options.mapRequestToAsset] maps the path of incoming request to the request pathKey to look up + * @param {Object | string} [options.ASSET_NAMESPACE] the binding to the namespace that script references + * @param {any} [options.ASSET_MANIFEST] the map of the key to cache and store in KV + * */ + +type Evt = { + request: Request; + waitUntil: (promise: Promise) => void; +}; + +const getAssetFromKV = async ( + event: Evt, + options?: Partial +): Promise => { + options = assignOptions(options); + + const request = event.request; + const ASSET_NAMESPACE = options.ASSET_NAMESPACE; + const ASSET_MANIFEST = parseStringAsObject( + options.ASSET_MANIFEST + ); + + if (typeof ASSET_NAMESPACE === "undefined") { + throw new InternalError(`there is no KV namespace bound to the script`); + } + + const rawPathKey = new URL(request.url).pathname.replace(/^\/+/, ""); // strip any preceding /'s + let pathIsEncoded = options.pathIsEncoded; + let requestKey; + // if options.mapRequestToAsset is explicitly passed in, always use it and assume user has own intentions + // otherwise handle request as normal, with default mapRequestToAsset below + if (options.mapRequestToAsset) { + requestKey = options.mapRequestToAsset(request); + } else if (ASSET_MANIFEST[rawPathKey]) { + requestKey = request; + } else if (ASSET_MANIFEST[decodeURIComponent(rawPathKey)]) { + pathIsEncoded = true; + requestKey = request; + } else { + const mappedRequest = mapRequestToAsset(request); + const mappedRawPathKey = new URL(mappedRequest.url).pathname.replace( + /^\/+/, + "" + ); + if (ASSET_MANIFEST[decodeURIComponent(mappedRawPathKey)]) { + pathIsEncoded = true; + requestKey = mappedRequest; + } else { + // use default mapRequestToAsset + requestKey = mapRequestToAsset(request, options); + } + } + + const SUPPORTED_METHODS = ["GET", "HEAD"]; + if (!SUPPORTED_METHODS.includes(requestKey.method)) { + throw new MethodNotAllowedError( + `${requestKey.method} is not a valid request method` + ); + } + + const parsedUrl = new URL(requestKey.url); + const pathname = pathIsEncoded + ? decodeURIComponent(parsedUrl.pathname) + : parsedUrl.pathname; // decode percentage encoded path only when necessary + + // pathKey is the file path to look up in the manifest + let pathKey = pathname.replace(/^\/+/, ""); // remove prepended / + + // @ts-expect-error we should pick cf types here + const cache = caches.default; + let mimeType = mime.getType(pathKey) || options.defaultMimeType; + if (mimeType.startsWith("text") || mimeType === "application/javascript") { + mimeType += "; charset=utf-8"; + } + + let shouldEdgeCache = false; // false if storing in KV by raw file path i.e. no hash + // check manifest for map from file path to hash + if (typeof ASSET_MANIFEST !== "undefined") { + if (ASSET_MANIFEST[pathKey]) { + pathKey = ASSET_MANIFEST[pathKey]; + // if path key is in asset manifest, we can assume it contains a content hash and can be cached + shouldEdgeCache = true; + } + } + + // TODO this excludes search params from cache, investigate ideal behavior + const cacheKey = new Request(`${parsedUrl.origin}/${pathKey}`, request); + + // if argument passed in for cacheControl is a function then + // evaluate that function. otherwise return the Object passed in + // or default Object + const evalCacheOpts = (() => { + switch (typeof options.cacheControl) { + case "function": + return options.cacheControl(request); + case "object": + return options.cacheControl; + default: + return defaultCacheControl; + } + })(); + + // formats the etag depending on the response context. if the entityId + // is invalid, returns an empty string (instead of null) to prevent the + // the potentially disastrous scenario where the value of the Etag resp + // header is "null". Could be modified in future to base64 encode etc + const formatETag = ( + entityId: string = pathKey, + validatorType: string = options.defaultETag + ) => { + if (!entityId) { + return ""; + } + switch (validatorType) { + case "weak": + if (!entityId.startsWith("W/")) { + if (entityId.startsWith(`"`) && entityId.endsWith(`"`)) { + return `W/${entityId}`; + } + return `W/"${entityId}"`; + } + return entityId; + case "strong": + if (entityId.startsWith(`W/"`)) { + entityId = entityId.replace("W/", ""); + } + if (!entityId.endsWith(`"`)) { + entityId = `"${entityId}"`; + } + return entityId; + default: + return ""; + } + }; + + options.cacheControl = Object.assign({}, defaultCacheControl, evalCacheOpts); + + // override shouldEdgeCache if options say to bypassCache + if ( + options.cacheControl.bypassCache || + options.cacheControl.edgeTTL === null || + request.method == "HEAD" + ) { + shouldEdgeCache = false; + } + // only set max-age if explicitly passed in a number as an arg + const shouldSetBrowserCache = + typeof options.cacheControl.browserTTL === "number"; + + let response = null; + if (shouldEdgeCache) { + response = await cache.match(cacheKey); + } + + if (response) { + if (response.status > 300 && response.status < 400) { + if (response.body && "cancel" in Object.getPrototypeOf(response.body)) { + // Body exists and environment supports readable streams + response.body.cancel(); + } else { + // Environment doesnt support readable streams, or null repsonse body. Nothing to do + } + response = new Response(null, response); + } else { + // fixes #165 + const opts = { + headers: new Headers(response.headers), + status: 0, + statusText: "", + }; + + opts.headers.set("cf-cache-status", "HIT"); + + if (response.status) { + opts.status = response.status; + opts.statusText = response.statusText; + } else if (opts.headers.has("Content-Range")) { + opts.status = 206; + opts.statusText = "Partial Content"; + } else { + opts.status = 200; + opts.statusText = "OK"; + } + response = new Response(response.body, opts); + } + } else { + const body = await ASSET_NAMESPACE.get(pathKey, "arrayBuffer"); + if (body === null) { + throw new NotFoundError( + `could not find ${pathKey} in your content namespace` + ); + } + response = new Response(body); + + if (shouldEdgeCache) { + response.headers.set("Accept-Ranges", "bytes"); + response.headers.set("Content-Length", String(body.byteLength)); + // set etag before cache insertion + if (!response.headers.has("etag")) { + response.headers.set("etag", formatETag(pathKey)); + } + // determine Cloudflare cache behavior + response.headers.set( + "Cache-Control", + `max-age=${options.cacheControl.edgeTTL}` + ); + event.waitUntil(cache.put(cacheKey, response.clone())); + response.headers.set("CF-Cache-Status", "MISS"); + } + } + response.headers.set("Content-Type", mimeType); + + if (response.status === 304) { + const etag = formatETag(response.headers.get("etag")); + const ifNoneMatch = cacheKey.headers.get("if-none-match"); + const proxyCacheStatus = response.headers.get("CF-Cache-Status"); + if (etag) { + if (ifNoneMatch && ifNoneMatch === etag && proxyCacheStatus === "MISS") { + response.headers.set("CF-Cache-Status", "EXPIRED"); + } else { + response.headers.set("CF-Cache-Status", "REVALIDATED"); + } + response.headers.set("etag", formatETag(etag, "weak")); + } + } + if (shouldSetBrowserCache) { + response.headers.set( + "Cache-Control", + `max-age=${options.cacheControl.browserTTL}` + ); + } else { + response.headers.delete("Cache-Control"); + } + return response; +}; + +export { getAssetFromKV, mapRequestToAsset, serveSinglePageApp }; +export { + Options, + CacheControl, + MethodNotAllowedError, + NotFoundError, + InternalError, +}; diff --git a/node_modules/@cloudflare/kv-asset-handler/src/mocks.ts b/node_modules/@cloudflare/kv-asset-handler/src/mocks.ts new file mode 100644 index 0000000..fb8c0fa --- /dev/null +++ b/node_modules/@cloudflare/kv-asset-handler/src/mocks.ts @@ -0,0 +1,156 @@ +import makeServiceWorkerEnv from "service-worker-mock"; + +const HASH = "123HASHBROWN"; + +export const getEvent = ( + request: Request +): Pick => { + const waitUntil = async (maybePromise: unknown) => { + await maybePromise; + }; + return { + request, + waitUntil, + }; +}; +const store = { + "key1.123HASHBROWN.txt": "val1", + "key1.123HASHBROWN.png": "val1", + "index.123HASHBROWN.html": "index.html", + "cache.123HASHBROWN.html": "cache me if you can", + "测试.123HASHBROWN.html": "My filename is non-ascii", + "%not-really-percent-encoded.123HASHBROWN.html": "browser percent encoded", + "%2F.123HASHBROWN.html": "user percent encoded", + "你好.123HASHBROWN.html": "I shouldnt be served", + "%E4%BD%A0%E5%A5%BD.123HASHBROWN.html": "Im important", + "nohash.txt": "no hash but still got some result", + "sub/blah.123HASHBROWN.png": "picturedis", + "sub/index.123HASHBROWN.html": "picturedis", + "client.123HASHBROWN": "important file", + "client.123HASHBROWN/index.html": "Im here but serve my big bro above", + "image.123HASHBROWN.png": "imagepng", + "image.123HASHBROWN.webp": "imagewebp", + "你好/index.123HASHBROWN.html": "My path is non-ascii", +}; +export const mockKV = (kvStore: Record) => { + return { + get: (path: string) => kvStore[path] || null, + }; +}; + +export const mockManifest = () => { + return JSON.stringify({ + "key1.txt": `key1.${HASH}.txt`, + "key1.png": `key1.${HASH}.png`, + "cache.html": `cache.${HASH}.html`, + "测试.html": `测试.${HASH}.html`, + "你好.html": `你好.${HASH}.html`, + "%not-really-percent-encoded.html": `%not-really-percent-encoded.${HASH}.html`, + "%2F.html": `%2F.${HASH}.html`, + "%E4%BD%A0%E5%A5%BD.html": `%E4%BD%A0%E5%A5%BD.${HASH}.html`, + "index.html": `index.${HASH}.html`, + "sub/blah.png": `sub/blah.${HASH}.png`, + "sub/index.html": `sub/index.${HASH}.html`, + client: `client.${HASH}`, + "client/index.html": `client.${HASH}`, + "image.png": `image.${HASH}.png`, + "image.webp": `image.${HASH}.webp`, + "你好/index.html": `你好/index.${HASH}.html`, + }); +}; + +const cacheStore = new Map(); +interface CacheKey { + url: string; + headers: HeadersInit; +} +export const mockCaches = () => { + return { + default: { + async match(key: Request) { + const cacheKey: CacheKey = { + url: key.url, + headers: {}, + }; + let response; + if (key.headers.has("if-none-match")) { + const makeStrongEtag = key.headers + .get("if-none-match") + .replace("W/", ""); + Reflect.set(cacheKey.headers, "etag", makeStrongEtag); + response = cacheStore.get(JSON.stringify(cacheKey)); + } else { + // if client doesn't send if-none-match, we need to iterate through these keys + // and just test the URL + const activeCacheKeys: Array = Array.from(cacheStore.keys()); + for (const cacheStoreKey of activeCacheKeys) { + if (JSON.parse(cacheStoreKey).url === key.url) { + response = cacheStore.get(cacheStoreKey); + } + } + } + // TODO: write test to accomodate for rare scenarios with where range requests accomodate etags + if (response && !key.headers.has("if-none-match")) { + // this appears overly verbose, but is necessary to document edge cache behavior + // The Range request header triggers the response header Content-Range ... + const range = key.headers.get("range"); + if (range) { + response.headers.set( + "content-range", + `bytes ${range.split("=").pop()}/${response.headers.get( + "content-length" + )}` + ); + } + // ... which we are using in this repository to set status 206 + if (response.headers.has("content-range")) { + // @ts-expect-error overridding status in this mock + response.status = 206; + } else { + // @ts-expect-error overridding status in this mock + response.status = 200; + } + const etag = response.headers.get("etag"); + if (etag && !etag.includes("W/")) { + response.headers.set("etag", `W/${etag}`); + } + } + return response; + }, + async put(key: Request, val: Response) { + const headers = new Headers(val.headers); + const url = new URL(key.url); + const resWithBody = new Response(val.body, { headers, status: 200 }); + const resNoBody = new Response(null, { headers, status: 304 }); + const cacheKey: CacheKey = { + url: key.url, + headers: { + etag: `"${url.pathname.replace("/", "")}"`, + }, + }; + cacheStore.set(JSON.stringify(cacheKey), resNoBody); + cacheKey.headers = {}; + cacheStore.set(JSON.stringify(cacheKey), resWithBody); + return; + }, + }, + }; +}; + +// mocks functionality used inside worker request +export function mockRequestScope() { + Object.assign(globalThis, makeServiceWorkerEnv()); + Object.assign(globalThis, { __STATIC_CONTENT_MANIFEST: mockManifest() }); + Object.assign(globalThis, { __STATIC_CONTENT: mockKV(store) }); + Object.assign(globalThis, { caches: mockCaches() }); +} + +// mocks functionality used on global isolate scope. such as the KV namespace bind +export function mockGlobalScope() { + Object.assign(globalThis, { __STATIC_CONTENT_MANIFEST: mockManifest() }); + Object.assign(globalThis, { __STATIC_CONTENT: mockKV(store) }); +} + +export const sleep = (milliseconds: number) => { + return new Promise((resolve) => setTimeout(resolve, milliseconds)); +}; diff --git a/node_modules/@cloudflare/kv-asset-handler/src/types.ts b/node_modules/@cloudflare/kv-asset-handler/src/types.ts new file mode 100644 index 0000000..8976709 --- /dev/null +++ b/node_modules/@cloudflare/kv-asset-handler/src/types.ts @@ -0,0 +1,52 @@ +export type CacheControl = { + browserTTL: number; + edgeTTL: number; + bypassCache: boolean; +}; + +export type AssetManifestType = Record; + +export type Options = { + cacheControl: + | ((req: Request) => Partial) + | Partial; + ASSET_NAMESPACE: KVNamespace; + ASSET_MANIFEST: AssetManifestType | string; + mapRequestToAsset?: (req: Request, options?: Partial) => Request; + defaultMimeType: string; + defaultDocument: string; + pathIsEncoded: boolean; + defaultETag: "strong" | "weak"; +}; + +export class KVError extends Error { + constructor(message?: string, status: number = 500) { + super(message); + // see: typescriptlang.org/docs/handbook/release-notes/typescript-2-2.html + Object.setPrototypeOf(this, new.target.prototype); // restore prototype chain + this.name = KVError.name; // stack traces display correctly now + this.status = status; + } + status: number; +} +export class MethodNotAllowedError extends KVError { + constructor( + message: string = `Not a valid request method`, + status: number = 405 + ) { + super(message, status); + } +} +export class NotFoundError extends KVError { + constructor(message: string = `Not Found`, status: number = 404) { + super(message, status); + } +} +export class InternalError extends KVError { + constructor( + message: string = `Internal Error in KV Asset Handler`, + status: number = 500 + ) { + super(message, status); + } +} diff --git a/node_modules/@cloudflare/unenv-preset/README.md b/node_modules/@cloudflare/unenv-preset/README.md new file mode 100644 index 0000000..7d79e92 --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/README.md @@ -0,0 +1,20 @@ +# @cloudflare/unenv-preset + +[unenv](https://github.com/unjs/unenv) preset for cloudflare. + +unenv provides polyfills to add [Node.js](https://nodejs.org/) compatibility for any JavaScript runtime, including browsers and edge workers. + +## Usage + +```ts +import { cloudflare } from "@cloudflare/unenv-preset"; +import { defineEnv } from "unenv"; + +const { env } = defineEnv({ + presets: [cloudflare], +}); + +const { alias, inject, external, polyfill } = env; +``` + +See the unenv [README](https://github.com/unjs/unenv/blob/main/README.md) for more details. diff --git a/node_modules/@cloudflare/unenv-preset/dist/index.d.mts b/node_modules/@cloudflare/unenv-preset/dist/index.d.mts new file mode 100644 index 0000000..7f41f07 --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/dist/index.d.mts @@ -0,0 +1,5 @@ +import { Preset } from 'unenv'; + +declare const cloudflare: Preset; + +export { cloudflare }; diff --git a/node_modules/@cloudflare/unenv-preset/dist/index.d.ts b/node_modules/@cloudflare/unenv-preset/dist/index.d.ts new file mode 100644 index 0000000..7f41f07 --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/dist/index.d.ts @@ -0,0 +1,5 @@ +import { Preset } from 'unenv'; + +declare const cloudflare: Preset; + +export { cloudflare }; diff --git a/node_modules/@cloudflare/unenv-preset/dist/index.mjs b/node_modules/@cloudflare/unenv-preset/dist/index.mjs new file mode 100644 index 0000000..0181f0a --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/dist/index.mjs @@ -0,0 +1,91 @@ + + +// -- Unbuild CommonJS Shims -- +import __cjs_url__ from 'url'; +import __cjs_path__ from 'path'; +import __cjs_mod__ from 'module'; +const __filename = __cjs_url__.fileURLToPath(import.meta.url); +const __dirname = __cjs_path__.dirname(__filename); +const require = __cjs_mod__.createRequire(import.meta.url); +const version = "2.3.2"; + +const nodeCompatModules = [ + "_stream_duplex", + "_stream_passthrough", + "_stream_readable", + "_stream_transform", + "_stream_writable", + "_tls_common", + "_tls_wrap", + "assert", + "assert/strict", + "buffer", + "diagnostics_channel", + "dns", + "dns/promises", + "events", + "net", + "path", + "path/posix", + "path/win32", + "querystring", + "stream", + "stream/consumers", + "stream/promises", + "stream/web", + "string_decoder", + "timers", + "timers/promises", + "url", + "util/types", + "zlib" +]; +const hybridNodeCompatModules = [ + "async_hooks", + "console", + "crypto", + "module", + "process", + "tls", + "util" +]; +const cloudflare = { + meta: { + name: "unenv:cloudflare", + version, + url: __filename + }, + alias: { + // `nodeCompatModules` are implemented in workerd. + // Create aliases to override polyfills defined in based environments. + ...Object.fromEntries( + nodeCompatModules.flatMap((p) => [ + [p, p], + [`node:${p}`, `node:${p}`] + ]) + ), + // The `node:sys` module is just a deprecated alias for `node:util` which we implemented using a hybrid polyfill + sys: "@cloudflare/unenv-preset/node/util", + "node:sys": "@cloudflare/unenv-preset/node/util", + // `hybridNodeCompatModules` are implemented by the cloudflare preset. + ...Object.fromEntries( + hybridNodeCompatModules.flatMap((m) => [ + [m, `@cloudflare/unenv-preset/node/${m}`], + [`node:${m}`, `@cloudflare/unenv-preset/node/${m}`] + ]) + ) + }, + inject: { + // Setting symbols implemented by workerd to `false` so that `inject`s defined in base presets are not used. + Buffer: false, + global: false, + clearImmediate: false, + setImmediate: false, + console: "@cloudflare/unenv-preset/node/console", + process: "@cloudflare/unenv-preset/node/process" + }, + polyfill: ["@cloudflare/unenv-preset/polyfill/performance"], + external: nodeCompatModules.flatMap((p) => [p, `node:${p}`]) +}; + +export { cloudflare }; diff --git a/node_modules/@cloudflare/unenv-preset/dist/runtime/node/async_hooks.d.ts b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/async_hooks.d.ts new file mode 100644 index 0000000..f5e0ef7 --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/async_hooks.d.ts @@ -0,0 +1,4 @@ +export { asyncWrapProviders, createHook, executionAsyncId, executionAsyncResource, triggerAsyncId, } from "unenv/node/async_hooks"; +export declare const AsyncLocalStorage: typeof import("async_hooks").AsyncLocalStorage, AsyncResource: typeof import("async_hooks").AsyncResource; +declare const _default: any; +export default _default; diff --git a/node_modules/@cloudflare/unenv-preset/dist/runtime/node/async_hooks.mjs b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/async_hooks.mjs new file mode 100644 index 0000000..31a481c --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/async_hooks.mjs @@ -0,0 +1,31 @@ +import { + asyncWrapProviders, + createHook, + executionAsyncId, + executionAsyncResource, + triggerAsyncId +} from "unenv/node/async_hooks"; +export { + asyncWrapProviders, + createHook, + executionAsyncId, + executionAsyncResource, + triggerAsyncId +} from "unenv/node/async_hooks"; +const workerdAsyncHooks = process.getBuiltinModule("node:async_hooks"); +export const { AsyncLocalStorage, AsyncResource } = workerdAsyncHooks; +export default { + /** + * manually unroll unenv-polyfilled-symbols to make it tree-shakeable + */ + asyncWrapProviders, + createHook, + executionAsyncId, + executionAsyncResource, + triggerAsyncId, + /** + * manually unroll workerd-polyfilled-symbols to make it tree-shakeable + */ + AsyncLocalStorage, + AsyncResource +}; diff --git a/node_modules/@cloudflare/unenv-preset/dist/runtime/node/console.d.ts b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/console.d.ts new file mode 100644 index 0000000..4889256 --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/console.d.ts @@ -0,0 +1,4 @@ +export { Console, _ignoreErrors, _stderr, _stderrErrorHandler, _stdout, _stdoutErrorHandler, _times, } from "unenv/node/console"; +export declare const assert: any, clear: any, context: any, count: any, countReset: any, createTask: any, debug: any, dir: any, dirxml: any, error: any, group: any, groupCollapsed: any, groupEnd: any, info: any, log: any, profile: any, profileEnd: any, table: any, time: any, timeEnd: any, timeLog: any, timeStamp: any, trace: any, warn: any; +declare const _default: any; +export default _default; diff --git a/node_modules/@cloudflare/unenv-preset/dist/runtime/node/console.mjs b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/console.mjs new file mode 100644 index 0000000..fe65525 --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/console.mjs @@ -0,0 +1,57 @@ +import { + _ignoreErrors, + _stderr, + _stderrErrorHandler, + _stdout, + _stdoutErrorHandler, + _times, + Console +} from "unenv/node/console"; +export { + Console, + _ignoreErrors, + _stderr, + _stderrErrorHandler, + _stdout, + _stdoutErrorHandler, + _times +} from "unenv/node/console"; +const workerdConsole = globalThis["console"]; +export const { + assert, + clear, + // @ts-expect-error undocumented public API + context, + count, + countReset, + // @ts-expect-error undocumented public API + createTask, + debug, + dir, + dirxml, + error, + group, + groupCollapsed, + groupEnd, + info, + log, + profile, + profileEnd, + table, + time, + timeEnd, + timeLog, + timeStamp, + trace, + warn +} = workerdConsole; +Object.assign(workerdConsole, { + Console, + _ignoreErrors, + _stderr, + _stderrErrorHandler, + _stdout, + _stdoutErrorHandler, + _times +}); +export default workerdConsole; diff --git a/node_modules/@cloudflare/unenv-preset/dist/runtime/node/crypto.d.ts b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/crypto.d.ts new file mode 100644 index 0000000..6c3befe --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/crypto.d.ts @@ -0,0 +1,5 @@ +export { Cipher, constants, Decipher } from "unenv/node/crypto"; +export declare const Certificate: typeof import("crypto").Certificate, checkPrime: typeof import("crypto").checkPrime, checkPrimeSync: typeof import("crypto").checkPrimeSync, Cipheriv: any, createCipheriv: typeof import("crypto").createCipheriv, createDecipheriv: typeof import("crypto").createDecipheriv, createDiffieHellman: typeof import("crypto").createDiffieHellman, createDiffieHellmanGroup: typeof import("crypto").createDiffieHellmanGroup, createECDH: typeof import("crypto").createECDH, createHash: typeof import("crypto").createHash, createHmac: typeof import("crypto").createHmac, createPrivateKey: typeof import("crypto").createPrivateKey, createPublicKey: typeof import("crypto").createPublicKey, createSecretKey: typeof import("crypto").createSecretKey, createSign: typeof import("crypto").createSign, createVerify: typeof import("crypto").createVerify, Decipheriv: any, diffieHellman: typeof import("crypto").diffieHellman, DiffieHellman: typeof import("crypto").DiffieHellman, DiffieHellmanGroup: import("crypto").DiffieHellmanGroupConstructor, ECDH: typeof import("crypto").ECDH, fips: boolean, generateKey: typeof import("crypto").generateKey, generateKeyPair: typeof import("crypto").generateKeyPair, generateKeyPairSync: typeof import("crypto").generateKeyPairSync, generateKeySync: typeof import("crypto").generateKeySync, generatePrime: typeof import("crypto").generatePrime, generatePrimeSync: typeof import("crypto").generatePrimeSync, getCipherInfo: typeof import("crypto").getCipherInfo, getCiphers: typeof import("crypto").getCiphers, getCurves: typeof import("crypto").getCurves, getDiffieHellman: typeof import("crypto").getDiffieHellman, getFips: typeof import("crypto").getFips, getHashes: typeof import("crypto").getHashes, getRandomValues: typeof import("crypto").getRandomValues, hash: typeof import("crypto").hash, Hash: typeof import("crypto").Hash, hkdf: typeof import("crypto").hkdf, hkdfSync: typeof import("crypto").hkdfSync, Hmac: typeof import("crypto").Hmac, KeyObject: typeof import("crypto").KeyObject, pbkdf2: typeof import("crypto").pbkdf2, pbkdf2Sync: typeof import("crypto").pbkdf2Sync, privateDecrypt: typeof import("crypto").privateDecrypt, privateEncrypt: typeof import("crypto").privateEncrypt, publicDecrypt: typeof import("crypto").publicDecrypt, publicEncrypt: typeof import("crypto").publicEncrypt, randomBytes: typeof import("crypto").randomBytes, randomFill: typeof import("crypto").randomFill, randomFillSync: typeof import("crypto").randomFillSync, randomInt: typeof import("crypto").randomInt, randomUUID: typeof import("crypto").randomUUID, scrypt: typeof import("crypto").scrypt, scryptSync: typeof import("crypto").scryptSync, secureHeapUsed: typeof import("crypto").secureHeapUsed, setEngine: typeof import("crypto").setEngine, setFips: typeof import("crypto").setFips, sign: typeof import("crypto").sign, Sign: typeof import("crypto").Sign, subtle: import("crypto").webcrypto.SubtleCrypto, timingSafeEqual: typeof import("crypto").timingSafeEqual, verify: typeof import("crypto").verify, Verify: typeof import("crypto").Verify, X509Certificate: typeof import("crypto").X509Certificate; +export declare const webcrypto: any; +declare const _default: any; +export default _default; diff --git a/node_modules/@cloudflare/unenv-preset/dist/runtime/node/crypto.mjs b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/crypto.mjs new file mode 100644 index 0000000..066037a --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/crypto.mjs @@ -0,0 +1,172 @@ +import { + Cipher, + constants, + createCipher, + createDecipher, + Decipher, + pseudoRandomBytes, + webcrypto as unenvCryptoWebcrypto +} from "unenv/node/crypto"; +export { Cipher, constants, Decipher } from "unenv/node/crypto"; +const workerdCrypto = process.getBuiltinModule("node:crypto"); +export const { + Certificate, + checkPrime, + checkPrimeSync, + // @ts-expect-error + Cipheriv, + createCipheriv, + createDecipheriv, + createDiffieHellman, + createDiffieHellmanGroup, + createECDH, + createHash, + createHmac, + createPrivateKey, + createPublicKey, + createSecretKey, + createSign, + createVerify, + // @ts-expect-error + Decipheriv, + diffieHellman, + DiffieHellman, + DiffieHellmanGroup, + ECDH, + fips, + generateKey, + generateKeyPair, + generateKeyPairSync, + generateKeySync, + generatePrime, + generatePrimeSync, + getCipherInfo, + getCiphers, + getCurves, + getDiffieHellman, + getFips, + getHashes, + getRandomValues, + hash, + Hash, + hkdf, + hkdfSync, + Hmac, + KeyObject, + pbkdf2, + pbkdf2Sync, + privateDecrypt, + privateEncrypt, + publicDecrypt, + publicEncrypt, + randomBytes, + randomFill, + randomFillSync, + randomInt, + randomUUID, + scrypt, + scryptSync, + secureHeapUsed, + setEngine, + setFips, + sign, + Sign, + subtle, + timingSafeEqual, + verify, + Verify, + X509Certificate +} = workerdCrypto; +export const webcrypto = { + // @ts-expect-error + CryptoKey: unenvCryptoWebcrypto.CryptoKey, + getRandomValues, + randomUUID, + subtle +}; +export 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, + createCipheriv, + createDecipheriv, + createECDH, + createSign, + createVerify, + diffieHellman, + getCipherInfo, + hash, + privateDecrypt, + privateEncrypt, + publicDecrypt, + publicEncrypt, + scrypt, + scryptSync, + sign, + verify, + // 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, + secureHeapUsed, + setEngine, + setFips, + subtle, + timingSafeEqual, + // default-only export from workerd + fips, + // special-cased deep merged symbols + webcrypto +}; diff --git a/node_modules/@cloudflare/unenv-preset/dist/runtime/node/module.d.ts b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/module.d.ts new file mode 100644 index 0000000..9f07732 --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/module.d.ts @@ -0,0 +1,31 @@ +import type nodeModule from "node:module"; +export { Module, SourceMap, _cache, _extensions, _debug, _pathCache, _findPath, _initPaths, _load, _nodeModulePaths, _preloadModules, _resolveFilename, _resolveLookupPaths, builtinModules, constants, enableCompileCache, findSourceMap, getCompileCacheDir, globalPaths, isBuiltin, register, runMain, syncBuiltinESMExports, wrap, } from "unenv/node/module"; +export declare const createRequire: typeof nodeModule.createRequire; +declare const _default: { + Module: any; + SourceMap: any; + _cache: any; + _extensions: any; + _debug: any; + _pathCache: any; + _findPath: any; + _initPaths: any; + _load: any; + _nodeModulePaths: any; + _preloadModules: any; + _resolveFilename: any; + _resolveLookupPaths: any; + builtinModules: any; + enableCompileCache: any; + constants: any; + createRequire: any; + findSourceMap: any; + getCompileCacheDir: any; + globalPaths: any; + isBuiltin: any; + register: any; + runMain: any; + syncBuiltinESMExports: any; + wrap: any; +}; +export default _default; diff --git a/node_modules/@cloudflare/unenv-preset/dist/runtime/node/module.mjs b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/module.mjs new file mode 100644 index 0000000..c54d05e --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/module.mjs @@ -0,0 +1,94 @@ +import { notImplemented } from "unenv/_internal/utils"; +import { + _cache, + _debug, + _extensions, + _findPath, + _initPaths, + _load, + _nodeModulePaths, + _pathCache, + _preloadModules, + _resolveFilename, + _resolveLookupPaths, + builtinModules, + constants, + enableCompileCache, + findSourceMap, + getCompileCacheDir, + globalPaths, + isBuiltin, + Module, + register, + runMain, + SourceMap, + syncBuiltinESMExports, + wrap +} from "unenv/node/module"; +export { + Module, + SourceMap, + _cache, + _extensions, + _debug, + _pathCache, + _findPath, + _initPaths, + _load, + _nodeModulePaths, + _preloadModules, + _resolveFilename, + _resolveLookupPaths, + builtinModules, + constants, + enableCompileCache, + findSourceMap, + getCompileCacheDir, + globalPaths, + isBuiltin, + register, + runMain, + syncBuiltinESMExports, + wrap +} from "unenv/node/module"; +const workerdModule = process.getBuiltinModule("node:module"); +export const createRequire = (file) => { + return Object.assign(workerdModule.createRequire(file), { + resolve: Object.assign( + /* @__PURE__ */ notImplemented("module.require.resolve"), + { + paths: /* @__PURE__ */ notImplemented("module.require.resolve.paths") + } + ), + cache: /* @__PURE__ */ Object.create(null), + extensions: _extensions, + main: void 0 + }); +}; +export default { + Module, + SourceMap, + _cache, + _extensions, + _debug, + _pathCache, + _findPath, + _initPaths, + _load, + _nodeModulePaths, + _preloadModules, + _resolveFilename, + _resolveLookupPaths, + builtinModules, + enableCompileCache, + constants, + createRequire, + findSourceMap, + getCompileCacheDir, + globalPaths, + isBuiltin, + register, + runMain, + syncBuiltinESMExports, + wrap +}; diff --git a/node_modules/@cloudflare/unenv-preset/dist/runtime/node/process.d.ts b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/process.d.ts new file mode 100644 index 0000000..4c3e1d0 --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/process.d.ts @@ -0,0 +1,11 @@ +export declare const getBuiltinModule: NodeJS.Process["getBuiltinModule"]; +export declare const exit: { + (code?: number | string | null | undefined): never; + (code?: number | string | null | undefined): never; +}, platform: NodeJS.Platform, nextTick: { + (callback: Function, ...args: any[]): void; + (callback: Function, ...args: any[]): void; +}; +export declare const abort: any, addListener: any, allowedNodeEnvironmentFlags: any, hasUncaughtExceptionCaptureCallback: any, setUncaughtExceptionCaptureCallback: any, loadEnvFile: any, sourceMapsEnabled: any, arch: any, argv: any, argv0: any, chdir: any, config: any, connected: any, constrainedMemory: any, availableMemory: any, cpuUsage: any, cwd: any, debugPort: any, dlopen: any, disconnect: any, emit: any, emitWarning: any, env: any, eventNames: any, execArgv: any, execPath: any, finalization: any, features: any, getActiveResourcesInfo: any, getMaxListeners: any, hrtime: any, kill: any, listeners: any, listenerCount: any, memoryUsage: any, on: any, off: any, once: any, pid: any, ppid: any, prependListener: any, prependOnceListener: any, rawListeners: any, release: any, removeAllListeners: any, removeListener: any, report: any, resourceUsage: any, setMaxListeners: any, setSourceMapsEnabled: any, stderr: any, stdin: any, stdout: any, title: any, throwDeprecation: any, traceDeprecation: any, umask: any, uptime: any, version: any, versions: any, domain: any, initgroups: any, moduleLoadList: any, reallyExit: any, openStdin: any, assert: any, binding: any, send: any, exitCode: any, channel: any, getegid: any, geteuid: any, getgid: any, getgroups: any, getuid: any, setegid: any, seteuid: any, setgid: any, setgroups: any, setuid: any, permission: any, mainModule: any, _events: any, _eventsCount: any, _exiting: any, _maxListeners: any, _debugEnd: any, _debugProcess: any, _fatalException: any, _getActiveHandles: any, _getActiveRequests: any, _kill: any, _preload_modules: any, _rawDebug: any, _startProfilerIdleNotifier: any, _stopProfilerIdleNotifier: any, _tickCallback: any, _disconnect: any, _handleQueue: any, _pendingMessage: any, _channel: any, _send: any, _linkedBinding: any; +declare const _default: NodeJS.Process; +export default _default; diff --git a/node_modules/@cloudflare/unenv-preset/dist/runtime/node/process.mjs b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/process.mjs new file mode 100644 index 0000000..427913a --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/process.mjs @@ -0,0 +1,228 @@ +import { hrtime as UnenvHrTime } from "unenv/node/internal/process/hrtime"; +import { Process as UnenvProcess } from "unenv/node/internal/process/process"; +const globalProcess = globalThis["process"]; +export const getBuiltinModule = globalProcess.getBuiltinModule; +export const { exit, platform, nextTick } = getBuiltinModule( + "node:process" +); +const unenvProcess = new UnenvProcess({ + env: globalProcess.env, + hrtime: UnenvHrTime, + nextTick +}); +export const { + 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, + 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, + 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; +const _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, + 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, + 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 +}; +export default _process; diff --git a/node_modules/@cloudflare/unenv-preset/dist/runtime/node/tls.d.ts b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/tls.d.ts new file mode 100644 index 0000000..6a4e586 --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/tls.d.ts @@ -0,0 +1,4 @@ +export { CLIENT_RENEG_LIMIT, CLIENT_RENEG_WINDOW, createSecurePair, createServer, DEFAULT_CIPHERS, DEFAULT_ECDH_CURVE, DEFAULT_MAX_VERSION, DEFAULT_MIN_VERSION, getCiphers, rootCertificates, Server, } from "unenv/node/tls"; +export declare const checkServerIdentity: typeof import("tls").checkServerIdentity, connect: typeof import("tls").connect, createSecureContext: typeof import("tls").createSecureContext, convertALPNProtocols: any, SecureContext: any, TLSSocket: typeof import("tls").TLSSocket; +declare const _default: any; +export default _default; diff --git a/node_modules/@cloudflare/unenv-preset/dist/runtime/node/tls.mjs b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/tls.mjs new file mode 100644 index 0000000..8a08754 --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/tls.mjs @@ -0,0 +1,57 @@ +import { + CLIENT_RENEG_LIMIT, + CLIENT_RENEG_WINDOW, + createSecurePair, + createServer, + DEFAULT_CIPHERS, + DEFAULT_ECDH_CURVE, + DEFAULT_MAX_VERSION, + DEFAULT_MIN_VERSION, + getCiphers, + rootCertificates, + Server +} from "unenv/node/tls"; +export { + CLIENT_RENEG_LIMIT, + CLIENT_RENEG_WINDOW, + createSecurePair, + createServer, + DEFAULT_CIPHERS, + DEFAULT_ECDH_CURVE, + DEFAULT_MAX_VERSION, + DEFAULT_MIN_VERSION, + getCiphers, + rootCertificates, + Server +} from "unenv/node/tls"; +const workerdTls = process.getBuiltinModule("node:tls"); +export const { + checkServerIdentity, + connect, + createSecureContext, + // @ts-expect-error @types/node does not provide this function + convertALPNProtocols, + // @ts-expect-error Node typings wrongly declare `SecureContext` as an interface + SecureContext, + TLSSocket +} = workerdTls; +export default { + CLIENT_RENEG_LIMIT, + CLIENT_RENEG_WINDOW, + DEFAULT_CIPHERS, + DEFAULT_ECDH_CURVE, + DEFAULT_MAX_VERSION, + DEFAULT_MIN_VERSION, + // @ts-expect-error + SecureContext, + Server, + TLSSocket, + checkServerIdentity, + connect, + convertALPNProtocols, + createSecureContext, + createSecurePair, + createServer, + getCiphers, + rootCertificates +}; diff --git a/node_modules/@cloudflare/unenv-preset/dist/runtime/node/util.d.ts b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/util.d.ts new file mode 100644 index 0000000..518aceb --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/util.d.ts @@ -0,0 +1,5 @@ +export { _errnoException, _exceptionWithHostPort, getSystemErrorMap, getSystemErrorName, isBoolean, isBuffer, isDate, isError, isFunction, isNull, isNullOrUndefined, isNumber, isObject, isPrimitive, isRegExp, isString, isSymbol, isUndefined, parseEnv, styleText, } from "unenv/node/util"; +export declare const MIMEParams: typeof import("util").MIMEParams, MIMEType: typeof import("util").MIMEType, TextDecoder: typeof import("util").TextDecoder, TextEncoder: typeof import("util").TextEncoder, _extend: any, aborted: typeof import("util").aborted, callbackify: typeof import("util").callbackify, debug: typeof import("util").debuglog, debuglog: typeof import("util").debuglog, deprecate: typeof import("util").deprecate, format: typeof import("util").format, formatWithOptions: typeof import("util").formatWithOptions, getCallSite: any, inherits: typeof import("util").inherits, inspect: typeof import("util").inspect, isArray: typeof import("util").isArray, isDeepStrictEqual: typeof import("util").isDeepStrictEqual, log: typeof import("util").log, parseArgs: typeof import("util").parseArgs, promisify: typeof import("util").promisify, stripVTControlCharacters: typeof import("util").stripVTControlCharacters, toUSVString: typeof import("util").toUSVString, transferableAbortController: typeof import("util").transferableAbortController, transferableAbortSignal: typeof import("util").transferableAbortSignal; +export declare const types: typeof import("node:util/types"); +declare const _default: any; +export default _default; diff --git a/node_modules/@cloudflare/unenv-preset/dist/runtime/node/util.mjs b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/util.mjs new file mode 100644 index 0000000..a66bb7b --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/dist/runtime/node/util.mjs @@ -0,0 +1,132 @@ +import { + _errnoException, + _exceptionWithHostPort, + getSystemErrorMap, + getSystemErrorName, + isBoolean, + isBuffer, + isDate, + isError, + isFunction, + isNull, + isNullOrUndefined, + isNumber, + isObject, + isPrimitive, + isRegExp, + isString, + isSymbol, + isUndefined, + parseEnv, + styleText +} from "unenv/node/util"; +export { + _errnoException, + _exceptionWithHostPort, + getSystemErrorMap, + getSystemErrorName, + isBoolean, + isBuffer, + isDate, + isError, + isFunction, + isNull, + isNullOrUndefined, + isNumber, + isObject, + isPrimitive, + isRegExp, + isString, + isSymbol, + isUndefined, + parseEnv, + styleText +} from "unenv/node/util"; +const workerdUtil = process.getBuiltinModule("node:util"); +export const { + MIMEParams, + MIMEType, + TextDecoder, + TextEncoder, + // @ts-expect-error missing types? + _extend, + aborted, + callbackify, + debug, + debuglog, + deprecate, + format, + formatWithOptions, + // @ts-expect-error unknown type + getCallSite, + inherits, + inspect, + isArray, + isDeepStrictEqual, + log, + parseArgs, + promisify, + stripVTControlCharacters, + toUSVString, + transferableAbortController, + transferableAbortSignal +} = workerdUtil; +export const types = workerdUtil.types; +export default { + /** + * manually unroll unenv-polyfilled-symbols to make it tree-shakeable + */ + _errnoException, + _exceptionWithHostPort, + // @ts-expect-error unenv has unknown type + getSystemErrorMap, + // @ts-expect-error unenv has unknown type + getSystemErrorName, + isBoolean, + isBuffer, + isDate, + isError, + isFunction, + isNull, + isNullOrUndefined, + isNumber, + isObject, + isPrimitive, + isRegExp, + isString, + isSymbol, + isUndefined, + // @ts-expect-error unenv has unknown type + parseEnv, + // @ts-expect-error unenv has unknown type + styleText, + /** + * manually unroll workerd-polyfilled-symbols to make it tree-shakeable + */ + _extend, + aborted, + callbackify, + debug, + debuglog, + deprecate, + format, + formatWithOptions, + getCallSite, + inherits, + inspect, + isArray, + isDeepStrictEqual, + log, + MIMEParams, + MIMEType, + parseArgs, + promisify, + stripVTControlCharacters, + TextDecoder, + TextEncoder, + toUSVString, + transferableAbortController, + transferableAbortSignal, + // special-cased deep merged symbols + types +}; diff --git a/node_modules/@cloudflare/unenv-preset/dist/runtime/polyfill/package.json b/node_modules/@cloudflare/unenv-preset/dist/runtime/polyfill/package.json new file mode 100644 index 0000000..74a558a --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/dist/runtime/polyfill/package.json @@ -0,0 +1,3 @@ +{ + "sideEffects": true +} diff --git a/node_modules/@cloudflare/unenv-preset/dist/runtime/polyfill/performance.d.ts b/node_modules/@cloudflare/unenv-preset/dist/runtime/polyfill/performance.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/dist/runtime/polyfill/performance.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@cloudflare/unenv-preset/dist/runtime/polyfill/performance.mjs b/node_modules/@cloudflare/unenv-preset/dist/runtime/polyfill/performance.mjs new file mode 100644 index 0000000..0ab1692 --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/dist/runtime/polyfill/performance.mjs @@ -0,0 +1,18 @@ +import { + performance, + Performance, + PerformanceEntry, + PerformanceMark, + PerformanceMeasure, + PerformanceObserver, + PerformanceObserverEntryList, + PerformanceResourceTiming +} from "node: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; diff --git a/node_modules/@cloudflare/unenv-preset/package.json b/node_modules/@cloudflare/unenv-preset/package.json new file mode 100644 index 0000000..e8a0d6a --- /dev/null +++ b/node_modules/@cloudflare/unenv-preset/package.json @@ -0,0 +1,70 @@ +{ + "name": "@cloudflare/unenv-preset", + "version": "2.3.2", + "description": "cloudflare preset for unenv", + "keywords": [ + "cloudflare", + "workers", + "cloudflare workers", + "Node.js", + "unenv", + "polyfills" + ], + "homepage": "https://github.com/cloudflare/workers-sdk#readme", + "bugs": { + "url": "https://github.com/cloudflare/workers-sdk/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/cloudflare/workers-sdk.git", + "directory": "packages/unenv-preset" + }, + "license": "MIT OR Apache-2.0", + "sideEffects": false, + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs" + }, + "./*": { + "types": "./dist/runtime/*.d.mts", + "default": "./dist/runtime/*.mjs" + }, + "./package.json": "./package.json" + }, + "types": "./dist/index.d.ts", + "files": [ + "dist" + ], + "devDependencies": { + "@types/node-unenv": "npm:@types/node@^22.14.0", + "typescript": "^5.7.2", + "unbuild": "^3.2.0", + "undici": "^5.28.5", + "vitest": "~3.1.1", + "wrangler": "4.15.1" + }, + "peerDependencies": { + "unenv": "2.0.0-rc.17", + "workerd": "^1.20250508.0" + }, + "peerDependenciesMeta": { + "workerd": { + "optional": true + } + }, + "publishConfig": { + "access": "public" + }, + "workers-sdk": { + "prerelease": true + }, + "scripts": { + "build": "unbuild", + "check:lint": "eslint", + "check:type": "tsc --noEmit", + "test:ci": "vitest run", + "test:watch": "vitest" + } +} \ No newline at end of file diff --git a/node_modules/@cloudflare/workerd-darwin-64/README.md b/node_modules/@cloudflare/workerd-darwin-64/README.md new file mode 100644 index 0000000..409f389 --- /dev/null +++ b/node_modules/@cloudflare/workerd-darwin-64/README.md @@ -0,0 +1,6 @@ +# 👷 `workerd` for macOS 64-bit, Cloudflare's JavaScript/Wasm Runtime + +`workerd` is a JavaScript / Wasm server runtime based on the same code that powers +[Cloudflare Workers](https://workers.dev). + +See https://github.com/cloudflare/workerd for details. diff --git a/node_modules/@cloudflare/workerd-darwin-64/bin/workerd b/node_modules/@cloudflare/workerd-darwin-64/bin/workerd new file mode 100755 index 0000000..c9bf02d Binary files /dev/null and b/node_modules/@cloudflare/workerd-darwin-64/bin/workerd differ diff --git a/node_modules/@cloudflare/workerd-darwin-64/package.json b/node_modules/@cloudflare/workerd-darwin-64/package.json new file mode 100644 index 0000000..3810979 --- /dev/null +++ b/node_modules/@cloudflare/workerd-darwin-64/package.json @@ -0,0 +1,17 @@ +{ + "name": "@cloudflare/workerd-darwin-64", + "description": "👷 workerd for macOS 64-bit, Cloudflare's JavaScript/Wasm Runtime", + "repository": "https://github.com/cloudflare/workerd", + "license": "Apache-2.0", + "preferUnplugged": false, + "engines": { + "node": ">=16" + }, + "os": [ + "darwin" + ], + "cpu": [ + "x64" + ], + "version": "1.20250508.0" +} diff --git a/node_modules/@cspotcode/source-map-support/LICENSE.md b/node_modules/@cspotcode/source-map-support/LICENSE.md new file mode 100644 index 0000000..6247ca9 --- /dev/null +++ b/node_modules/@cspotcode/source-map-support/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Evan Wallace + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@cspotcode/source-map-support/README.md b/node_modules/@cspotcode/source-map-support/README.md new file mode 100644 index 0000000..f739070 --- /dev/null +++ b/node_modules/@cspotcode/source-map-support/README.md @@ -0,0 +1,289 @@ +# Source Map Support + +[![NPM version](https://img.shields.io/npm/v/@cspotcode/source-map-support.svg?style=flat)](https://npmjs.org/package/@cspotcode/source-map-support) +[![NPM downloads](https://img.shields.io/npm/dm/@cspotcode/source-map-support.svg?style=flat)](https://npmjs.org/package/@cspotcode/source-map-support) +[![Build status](https://img.shields.io/github/workflow/status/cspotcode/node-source-map-support/Continuous%20Integration)](https://github.com/cspotcode/node-source-map-support/actions?query=workflow%3A%22Continuous+Integration%22) + +This module provides source map support for stack traces in node via the [V8 stack trace API](https://github.com/v8/v8/wiki/Stack-Trace-API). It uses the [source-map](https://github.com/mozilla/source-map) module to replace the paths and line numbers of source-mapped files with their original paths and line numbers. The output mimics node's stack trace format with the goal of making every compile-to-JS language more of a first-class citizen. Source maps are completely general (not specific to any one language) so you can use source maps with multiple compile-to-JS languages in the same node process. + +## Installation and Usage + +#### Node support + +``` +$ npm install @cspotcode/source-map-support +``` + +Source maps can be generated using libraries such as [source-map-index-generator](https://github.com/twolfson/source-map-index-generator). Once you have a valid source map, place a source mapping comment somewhere in the file (usually done automatically or with an option by your transpiler): + +``` +//# sourceMappingURL=path/to/source.map +``` + +If multiple sourceMappingURL comments exist in one file, the last sourceMappingURL comment will be +respected (e.g. if a file mentions the comment in code, or went through multiple transpilers). +The path should either be absolute or relative to the compiled file. + +From here you have two options. + +##### CLI Usage + +```bash +node -r @cspotcode/source-map-support/register compiled.js +# Or to enable hookRequire +node -r @cspotcode/source-map-support/register-hook-require compiled.js +``` + +##### Programmatic Usage + +Put the following line at the top of the compiled file. + +```js +require('@cspotcode/source-map-support').install(); +``` + +It is also possible to install the source map support directly by +requiring the `register` module which can be handy with ES6: + +```js +import '@cspotcode/source-map-support/register' + +// Instead of: +import sourceMapSupport from '@cspotcode/source-map-support' +sourceMapSupport.install() +``` +Note: if you're using babel-register, it includes source-map-support already. + +It is also very useful with Mocha: + +``` +$ mocha --require @cspotcode/source-map-support/register tests/ +``` + +#### Browser support + +This library also works in Chrome. While the DevTools console already supports source maps, the V8 engine doesn't and `Error.prototype.stack` will be incorrect without this library. Everything will just work if you deploy your source files using [browserify](http://browserify.org/). Just make sure to pass the `--debug` flag to the browserify command so your source maps are included in the bundled code. + +This library also works if you use another build process or just include the source files directly. In this case, include the file `browser-source-map-support.js` in your page and call `sourceMapSupport.install()`. It contains the whole library already bundled for the browser using browserify. + +```html + + +``` + +This library also works if you use AMD (Asynchronous Module Definition), which is used in tools like [RequireJS](http://requirejs.org/). Just list `browser-source-map-support` as a dependency: + +```html + +``` + +## Options + +This module installs two things: a change to the `stack` property on `Error` objects and a handler for uncaught exceptions that mimics node's default exception handler (the handler can be seen in the demos below). You may want to disable the handler if you have your own uncaught exception handler. This can be done by passing an argument to the installer: + +```js +require('@cspotcode/source-map-support').install({ + handleUncaughtExceptions: false +}); +``` + +This module loads source maps from the filesystem by default. You can provide alternate loading behavior through a callback as shown below. For example, [Meteor](https://github.com/meteor) keeps all source maps cached in memory to avoid disk access. + +```js +require('@cspotcode/source-map-support').install({ + retrieveSourceMap: function(source) { + if (source === 'compiled.js') { + return { + url: 'original.js', + map: fs.readFileSync('compiled.js.map', 'utf8') + }; + } + return null; + } +}); +``` + +The module will by default assume a browser environment if XMLHttpRequest and window are defined. If either of these do not exist it will instead assume a node environment. +In some rare cases, e.g. when running a browser emulation and where both variables are also set, you can explictly specify the environment to be either 'browser' or 'node'. + +```js +require('@cspotcode/source-map-support').install({ + environment: 'node' +}); +``` + +To support files with inline source maps, the `hookRequire` options can be specified, which will monitor all source files for inline source maps. + + +```js +require('@cspotcode/source-map-support').install({ + hookRequire: true +}); +``` + +This monkey patches the `require` module loading chain, so is not enabled by default and is not recommended for any sort of production usage. + +## Demos + +#### Basic Demo + +original.js: + +```js +throw new Error('test'); // This is the original code +``` + +compiled.js: + +```js +require('@cspotcode/source-map-support').install(); + +throw new Error('test'); // This is the compiled code +// The next line defines the sourceMapping. +//# sourceMappingURL=compiled.js.map +``` + +compiled.js.map: + +```json +{ + "version": 3, + "file": "compiled.js", + "sources": ["original.js"], + "names": [], + "mappings": ";;AAAA,MAAM,IAAI" +} +``` + +Run compiled.js using node (notice how the stack trace uses original.js instead of compiled.js): + +``` +$ node compiled.js + +original.js:1 +throw new Error('test'); // This is the original code + ^ +Error: test + at Object. (original.js:1:7) + at Module._compile (module.js:456:26) + at Object.Module._extensions..js (module.js:474:10) + at Module.load (module.js:356:32) + at Function.Module._load (module.js:312:12) + at Function.Module.runMain (module.js:497:10) + at startup (node.js:119:16) + at node.js:901:3 +``` + +#### TypeScript Demo + +demo.ts: + +```typescript +declare function require(name: string); +require('@cspotcode/source-map-support').install(); +class Foo { + constructor() { this.bar(); } + bar() { throw new Error('this is a demo'); } +} +new Foo(); +``` + +Compile and run the file using the TypeScript compiler from the terminal: + +``` +$ npm install source-map-support typescript +$ node_modules/typescript/bin/tsc -sourcemap demo.ts +$ node demo.js + +demo.ts:5 + bar() { throw new Error('this is a demo'); } + ^ +Error: this is a demo + at Foo.bar (demo.ts:5:17) + at new Foo (demo.ts:4:24) + at Object. (demo.ts:7:1) + at Module._compile (module.js:456:26) + at Object.Module._extensions..js (module.js:474:10) + at Module.load (module.js:356:32) + at Function.Module._load (module.js:312:12) + at Function.Module.runMain (module.js:497:10) + at startup (node.js:119:16) + at node.js:901:3 +``` + +There is also the option to use `-r source-map-support/register` with typescript, without the need add the `require('@cspotcode/source-map-support').install()` in the code base: + +``` +$ npm install source-map-support typescript +$ node_modules/typescript/bin/tsc -sourcemap demo.ts +$ node -r source-map-support/register demo.js + +demo.ts:5 + bar() { throw new Error('this is a demo'); } + ^ +Error: this is a demo + at Foo.bar (demo.ts:5:17) + at new Foo (demo.ts:4:24) + at Object. (demo.ts:7:1) + at Module._compile (module.js:456:26) + at Object.Module._extensions..js (module.js:474:10) + at Module.load (module.js:356:32) + at Function.Module._load (module.js:312:12) + at Function.Module.runMain (module.js:497:10) + at startup (node.js:119:16) + at node.js:901:3 +``` + +#### CoffeeScript Demo + +demo.coffee: + +```coffee +require('@cspotcode/source-map-support').install() +foo = -> + bar = -> throw new Error 'this is a demo' + bar() +foo() +``` + +Compile and run the file using the CoffeeScript compiler from the terminal: + +```sh +$ npm install @cspotcode/source-map-support coffeescript +$ node_modules/.bin/coffee --map --compile demo.coffee +$ node demo.js + +demo.coffee:3 + bar = -> throw new Error 'this is a demo' + ^ +Error: this is a demo + at bar (demo.coffee:3:22) + at foo (demo.coffee:4:3) + at Object. (demo.coffee:5:1) + at Object. (demo.coffee:1:1) + at Module._compile (module.js:456:26) + at Object.Module._extensions..js (module.js:474:10) + at Module.load (module.js:356:32) + at Function.Module._load (module.js:312:12) + at Function.Module.runMain (module.js:497:10) + at startup (node.js:119:16) +``` + +## Tests + +This repo contains both automated tests for node and manual tests for the browser. The automated tests can be run using mocha (type `mocha` in the root directory). To run the manual tests: + +* Build the tests using `build.js` +* Launch the HTTP server (`npm run serve-tests`) and visit + * http://127.0.0.1:1336/amd-test + * http://127.0.0.1:1336/browser-test + * http://127.0.0.1:1336/browserify-test - **Currently not working** due to a bug with browserify (see [pull request #66](https://github.com/evanw/node-source-map-support/pull/66) for details). +* For `header-test`, run `server.js` inside that directory and visit http://127.0.0.1:1337/ + +## License + +This code is available under the [MIT license](http://opensource.org/licenses/MIT). diff --git a/node_modules/@cspotcode/source-map-support/browser-source-map-support.js b/node_modules/@cspotcode/source-map-support/browser-source-map-support.js new file mode 100644 index 0000000..782da50 --- /dev/null +++ b/node_modules/@cspotcode/source-map-support/browser-source-map-support.js @@ -0,0 +1,114 @@ +/* + * Support for source maps in V8 stack traces + * https://github.com/evanw/node-source-map-support + */ +/* + The buffer module from node.js, for the browser. + + @author Feross Aboukhadijeh + license MIT +*/ +(this.define||function(R,U){this.sourceMapSupport=U()})("browser-source-map-support",function(R){(function e(C,J,A){function p(f,c){if(!J[f]){if(!C[f]){var l="function"==typeof require&&require;if(!c&&l)return l(f,!0);if(t)return t(f,!0);throw Error("Cannot find module '"+f+"'");}l=J[f]={exports:{}};C[f][0].call(l.exports,function(q){var r=C[f][1][q];return p(r?r:q)},l,l.exports,e,C,J,A)}return J[f].exports}for(var t="function"==typeof require&&require,m=0;mm)return-1;if(58>m)return m-48+52;if(91>m)return m-65;if(123>m)return m-97+26}var t="undefined"!==typeof Uint8Array?Uint8Array:Array;e.toByteArray=function(m){function f(d){q[k++]=d}if(0>16);f((u&65280)>>8);f(u&255)}2===l?(u=p(m.charAt(c))<<2|p(m.charAt(c+1))>>4,f(u&255)):1===l&&(u=p(m.charAt(c))<<10|p(m.charAt(c+1))<<4|p(m.charAt(c+2))>>2,f(u>>8&255),f(u&255));return q};e.fromByteArray=function(m){var f=m.length%3,c="",l;var q=0;for(l=m.length-f;q> +18&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>12&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>6&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r&63);c+=r}switch(f){case 1:r=m[m.length-1];c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r<<4&63);c+="==";break;case 2:r=(m[m.length-2]<<8)+ +m[m.length-1],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>10),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>4&63),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r<<2&63),c+="="}return c}})("undefined"===typeof A?this.base64js={}:A)},{}],3:[function(C,J,A){},{}],4:[function(C,J,A){(function(e){var p=Object.prototype.toString,t="function"===typeof e.alloc&&"function"===typeof e.allocUnsafe&&"function"=== +typeof e.from;J.exports=function(m,f,c){if("number"===typeof m)throw new TypeError('"value" argument must not be a number');if("ArrayBuffer"===p.call(m).slice(8,-1)){f>>>=0;var l=m.byteLength-f;if(0>l)throw new RangeError("'offset' is out of bounds");if(void 0===c)c=l;else if(c>>>=0,c>l)throw new RangeError("'length' is out of bounds");return t?e.from(m.slice(f,f+c)):new e(new Uint8Array(m.slice(f,f+c)))}if("string"===typeof m){c=f;if("string"!==typeof c||""===c)c="utf8";if(!e.isEncoding(c))throw new TypeError('"encoding" must be a valid string encoding'); +return t?e.from(m,c):new e(m,c)}return t?e.from(m):new e(m)}}).call(this,C("buffer").Buffer)},{buffer:5}],5:[function(C,J,A){function e(a,b,h){if(!(this instanceof e))return new e(a,b,h);var w=typeof a;if("number"===w)var y=0>>0:0;else if("string"===w){if("base64"===b)for(a=(a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")).replace(L,"");0!==a.length%4;)a+="=";y=e.byteLength(a,b)}else if("object"===w&&null!==a)"Buffer"===a.type&&z(a.data)&&(a=a.data),y=0<+a.length?Math.floor(+a.length):0;else throw new TypeError("must start with number, buffer, array or string"); +if(this.length>G)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+G.toString(16)+" bytes");if(e.TYPED_ARRAY_SUPPORT)var I=e._augment(new Uint8Array(y));else I=this,I.length=y,I._isBuffer=!0;if(e.TYPED_ARRAY_SUPPORT&&"number"===typeof a.byteLength)I._set(a);else{var K=a;if(z(K)||e.isBuffer(K)||K&&"object"===typeof K&&"number"===typeof K.length)if(e.isBuffer(a))for(b=0;ba)throw new RangeError("offset is not uint");if(a+b>h)throw new RangeError("Trying to access beyond buffer length");}function m(a,b,h,w,y,I){if(!e.isBuffer(a))throw new TypeError("buffer must be a Buffer instance");if(b>y||ba.length)throw new TypeError("index out of range"); +}function f(a,b,h,w){0>b&&(b=65535+b+1);for(var y=0,I=Math.min(a.length-h,2);y>>8*(w?y:1-y)}function c(a,b,h,w){0>b&&(b=4294967295+b+1);for(var y=0,I=Math.min(a.length-h,4);y>>8*(w?y:3-y)&255}function l(a,b,h,w,y,I){if(b>y||ba.length)throw new TypeError("index out of range");}function q(a,b,h,w,y){y||l(a,b,h,4,3.4028234663852886E38,-3.4028234663852886E38);v.write(a,b,h,w,23,4);return h+4}function r(a, +b,h,w,y){y||l(a,b,h,8,1.7976931348623157E308,-1.7976931348623157E308);v.write(a,b,h,w,52,8);return h+8}function k(a){for(var b=[],h=0;h=w)b.push(w);else{var y=h;55296<=w&&57343>=w&&h++;w=encodeURIComponent(a.slice(y,h+1)).substr(1).split("%");for(y=0;y=b.length||y>=a.length);y++)b[y+ +h]=a[y];return y}function g(a){try{return decodeURIComponent(a)}catch(b){return String.fromCharCode(65533)}}var n=C("base64-js"),v=C("ieee754"),z=C("is-array");A.Buffer=e;A.SlowBuffer=e;A.INSPECT_MAX_BYTES=50;e.poolSize=8192;var G=1073741823;e.TYPED_ARRAY_SUPPORT=function(){try{var a=new ArrayBuffer(0),b=new Uint8Array(a);b.foo=function(){return 42};return 42===b.foo()&&"function"===typeof b.subarray&&0===(new Uint8Array(1)).subarray(1,1).byteLength}catch(h){return!1}}();e.isBuffer=function(a){return!(null== +a||!a._isBuffer)};e.compare=function(a,b){if(!e.isBuffer(a)||!e.isBuffer(b))throw new TypeError("Arguments must be Buffers");for(var h=a.length,w=b.length,y=0,I=Math.min(h,w);y>>1;break;case "utf8":case "utf-8":h=k(a).length;break;case "base64":h=n.toByteArray(a).length; +break;default:h=a.length}return h};e.prototype.length=void 0;e.prototype.parent=void 0;e.prototype.toString=function(a,b,h){var w=!1;b>>>=0;h=void 0===h||Infinity===h?this.length:h>>>0;a||(a="utf8");0>b&&(b=0);h>this.length&&(h=this.length);if(h<=b)return"";for(;;)switch(a){case "hex":a=b;b=h;h=this.length;if(!a||0>a)a=0;if(!b||0>b||b>h)b=h;w="";for(h=a;hw?"0"+w.toString(16):w.toString(16),w=a+w;return w;case "utf8":case "utf-8":w=a="";for(h=Math.min(this.length,h);b= +this[b]?(a+=g(w)+String.fromCharCode(this[b]),w=""):w+="%"+this[b].toString(16);return a+g(w);case "ascii":return p(this,b,h);case "binary":return p(this,b,h);case "base64":return b=0===b&&h===this.length?n.fromByteArray(this):n.fromByteArray(this.slice(b,h)),b;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":b=this.slice(b,h);h="";for(a=0;ab&&(a+=" ... "));return""};e.prototype.compare=function(a){if(!e.isBuffer(a))throw new TypeError("Argument must be a Buffer");return e.compare(this,a)};e.prototype.get=function(a){console.log(".get() is deprecated. Access using array indexes instead."); +return this.readUInt8(a)};e.prototype.set=function(a,b){console.log(".set() is deprecated. Access using array indexes instead.");return this.writeUInt8(a,b)};e.prototype.write=function(a,b,h,w){if(isFinite(b))isFinite(h)||(w=h,h=void 0);else{var y=w;w=b;b=h;h=y}b=Number(b)||0;y=this.length-b;h?(h=Number(h),h>y&&(h=y)):h=y;w=String(w||"utf8").toLowerCase();switch(w){case "hex":b=Number(b)||0;w=this.length-b;h?(h=Number(h),h>w&&(h=w)):h=w;w=a.length;if(0!==w%2)throw Error("Invalid hex string");h>w/ +2&&(h=w/2);for(w=0;w>8;K%=256;y.push(K);y.push(w)}a=d(y,this,b,h,2);break;default:throw new TypeError("Unknown encoding: "+ +w);}return a};e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};e.prototype.slice=function(a,b){var h=this.length;a=~~a;b=void 0===b?h:~~b;0>a?(a+=h,0>a&&(a=0)):a>h&&(a=h);0>b?(b+=h,0>b&&(b=0)):b>h&&(b=h);b>>=0;h||m(this,a,b,1,255,0);e.TYPED_ARRAY_SUPPORT||(a=Math.floor(a));this[b]=a;return b+1};e.prototype.writeUInt16LE=function(a, +b,h){a=+a;b>>>=0;h||m(this,a,b,2,65535,0);e.TYPED_ARRAY_SUPPORT?(this[b]=a,this[b+1]=a>>>8):f(this,a,b,!0);return b+2};e.prototype.writeUInt16BE=function(a,b,h){a=+a;b>>>=0;h||m(this,a,b,2,65535,0);e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=a):f(this,a,b,!1);return b+2};e.prototype.writeUInt32LE=function(a,b,h){a=+a;b>>>=0;h||m(this,a,b,4,4294967295,0);e.TYPED_ARRAY_SUPPORT?(this[b+3]=a>>>24,this[b+2]=a>>>16,this[b+1]=a>>>8,this[b]=a):c(this,a,b,!0);return b+4};e.prototype.writeUInt32BE=function(a, +b,h){a=+a;b>>>=0;h||m(this,a,b,4,4294967295,0);e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+2]=a>>>8,this[b+3]=a):c(this,a,b,!1);return b+4};e.prototype.writeInt8=function(a,b,h){a=+a;b>>>=0;h||m(this,a,b,1,127,-128);e.TYPED_ARRAY_SUPPORT||(a=Math.floor(a));0>a&&(a=255+a+1);this[b]=a;return b+1};e.prototype.writeInt16LE=function(a,b,h){a=+a;b>>>=0;h||m(this,a,b,2,32767,-32768);e.TYPED_ARRAY_SUPPORT?(this[b]=a,this[b+1]=a>>>8):f(this,a,b,!0);return b+2};e.prototype.writeInt16BE=function(a, +b,h){a=+a;b>>>=0;h||m(this,a,b,2,32767,-32768);e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=a):f(this,a,b,!1);return b+2};e.prototype.writeInt32LE=function(a,b,h){a=+a;b>>>=0;h||m(this,a,b,4,2147483647,-2147483648);e.TYPED_ARRAY_SUPPORT?(this[b]=a,this[b+1]=a>>>8,this[b+2]=a>>>16,this[b+3]=a>>>24):c(this,a,b,!0);return b+4};e.prototype.writeInt32BE=function(a,b,h){a=+a;b>>>=0;h||m(this,a,b,4,2147483647,-2147483648);0>a&&(a=4294967295+a+1);e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+ +2]=a>>>8,this[b+3]=a):c(this,a,b,!1);return b+4};e.prototype.writeFloatLE=function(a,b,h){return q(this,a,b,!0,h)};e.prototype.writeFloatBE=function(a,b,h){return q(this,a,b,!1,h)};e.prototype.writeDoubleLE=function(a,b,h){return r(this,a,b,!0,h)};e.prototype.writeDoubleBE=function(a,b,h){return r(this,a,b,!1,h)};e.prototype.copy=function(a,b,h,w){h||(h=0);w||0===w||(w=this.length);b||(b=0);if(w!==h&&0!==a.length&&0!==this.length){if(wb||b>=a.length)throw new TypeError("targetStart out of bounds"); +if(0>h||h>=this.length)throw new TypeError("sourceStart out of bounds");if(0>w||w>this.length)throw new TypeError("sourceEnd out of bounds");w>this.length&&(w=this.length);a.length-bw||!e.TYPED_ARRAY_SUPPORT)for(var y=0;yb||b>=this.length)throw new TypeError("start out of bounds"); +if(0>h||h>this.length)throw new TypeError("end out of bounds");if("number"===typeof a)for(;b>1,r=-7;f=t?f-1:0;var k=t?-1:1,u=e[p+f];f+=k;t=u&(1<<-r)-1;u>>=-r;for(r+=c;0>=-r;for(r+=m;0>1,u=23===f?Math.pow(2,-24)-Math.pow(2,-77):0;c=m?0:c-1;var d=m?1:-1,g=0>p||0===p&&0>1/p?1:0;p=Math.abs(p);isNaN(p)||Infinity===p?(p=isNaN(p)?1:0,m=r):(m=Math.floor(Math.log(p)/Math.LN2),1>p*(l=Math.pow(2,-m))&&(m--,l*=2),p=1<=m+k?p+u/l:p+u*Math.pow(2,1-k),2<=p*l&&(m++,l/=2),m+k>=r?(p=0,m=r):1<=m+k?(p=(p*l-1)*Math.pow(2,f),m+=k):(p=p*Math.pow(2,k-1)*Math.pow(2,f),m=0));for(;8<=f;e[t+c]=p&255,c+= +d,p/=256,f-=8);m=m<z?[]:n.slice(v,z-v+1)}c=A.resolve(c).substr(1);l=A.resolve(l).substr(1); +for(var r=q(c.split("/")),k=q(l.split("/")),u=Math.min(r.length,k.length),d=u,g=0;gl&&(l=c.length+l);return c.substr(l,q)}}).call(this,C("g5I+bs"))},{"g5I+bs":9}],9:[function(C,J,A){function e(){}C=J.exports={};C.nextTick=function(){if("undefined"!==typeof window&&window.setImmediate)return function(t){return window.setImmediate(t)};if("undefined"!==typeof window&&window.postMessage&&window.addEventListener){var p=[];window.addEventListener("message",function(t){var m=t.source;m!==window&&null!== +m||"process-tick"!==t.data||(t.stopPropagation(),0p?(-p<<1)+1:p<<1;do p=m&31,m>>>=5,0=f)throw Error("Expected more digits in base 64 VLQ value.");var q=e.decode(p.charCodeAt(t++));if(-1===q)throw Error("Invalid base64 digit: "+p.charAt(t-1));var r=!!(q&32);q&=31;c+=q<>1;m.value=1===(c&1)?-p:p;m.rest=t}},{"./base64":12}],12:[function(C, +J,A){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");A.encode=function(p){if(0<=p&&p=p?p-65:97<=p&&122>=p?p-97+26:48<=p&&57>=p?p-48+52:43==p?62:47==p?63:-1}},{}],13:[function(C,J,A){function e(p,t,m,f,c,l){var q=Math.floor((t-p)/2)+p,r=c(m,f[q],!0);return 0===r?q:0p?-1:p}A.GREATEST_LOWER_BOUND=1;A.LEAST_UPPER_BOUND=2;A.search=function(p,t,m,f){if(0===t.length)return-1;p=e(-1,t.length,p,t,m,f||A.GREATEST_LOWER_BOUND);if(0>p)return-1;for(;0<=p-1&&0===m(t[p],t[p-1],!0);)--p;return p}},{}],14:[function(C,J,A){function e(){this._array=[];this._sorted=!0;this._last={generatedLine:-1,generatedColumn:0}}var p=C("./util");e.prototype.unsortedForEach=function(t,m){this._array.forEach(t,m)};e.prototype.add=function(t){var m=this._last,f=m.generatedLine, +c=t.generatedLine,l=m.generatedColumn,q=t.generatedColumn;c>f||c==f&&q>=l||0>=p.compareByGeneratedPositionsInflated(m,t)?this._last=t:this._sorted=!1;this._array.push(t)};e.prototype.toArray=function(){this._sorted||(this._array.sort(p.compareByGeneratedPositionsInflated),this._sorted=!0);return this._array};A.MappingList=e},{"./util":19}],15:[function(C,J,A){function e(t,m,f){var c=t[m];t[m]=t[f];t[f]=c}function p(t,m,f,c){if(f=m(t[r],q)&&(l+=1,e(t,l,r));e(t,l+1,r);l+=1;p(t,m,f,l-1);p(t,m,l+1,c)}}A.quickSort=function(t,m){p(t,m,0,t.length-1)}},{}],16:[function(C,J,A){function e(k,u){var d=k;"string"===typeof k&&(d=f.parseSourceMapInput(k));return null!=d.sections?new m(d,u):new p(d,u)}function p(k,u){var d=k;"string"===typeof k&&(d=f.parseSourceMapInput(k));var g=f.getArg(d,"version"),n=f.getArg(d,"sources"),v=f.getArg(d,"names",[]),z=f.getArg(d,"sourceRoot",null),G=f.getArg(d,"sourcesContent",null),D=f.getArg(d, +"mappings");d=f.getArg(d,"file",null);if(g!=this._version)throw Error("Unsupported version: "+g);z&&(z=f.normalize(z));n=n.map(String).map(f.normalize).map(function(L){return z&&f.isAbsolute(z)&&f.isAbsolute(L)?f.relative(z,L):L});this._names=l.fromArray(v.map(String),!0);this._sources=l.fromArray(n,!0);this.sourceRoot=z;this.sourcesContent=G;this._mappings=D;this._sourceMapURL=u;this.file=d}function t(){this.generatedColumn=this.generatedLine=0;this.name=this.originalColumn=this.originalLine=this.source= +null}function m(k,u){var d=k;"string"===typeof k&&(d=f.parseSourceMapInput(k));var g=f.getArg(d,"version");d=f.getArg(d,"sections");if(g!=this._version)throw Error("Unsupported version: "+g);this._sources=new l;this._names=new l;var n={line:-1,column:0};this._sections=d.map(function(v){if(v.url)throw Error("Support for url field in sections not implemented.");var z=f.getArg(v,"offset"),G=f.getArg(z,"line"),D=f.getArg(z,"column");if(G=k[d])throw new TypeError("Line must be greater than or equal to 1, got "+ +k[d]);if(0>k[g])throw new TypeError("Column must be greater than or equal to 0, got "+k[g]);return c.search(k,u,n,v)};p.prototype.computeColumnSpans=function(){for(var k=0;k=this._sources.size()&&!this.sourcesContent.some(function(k){return null==k}):!1};p.prototype.sourceContentFor=function(k,u){if(!this.sourcesContent)return null;var d=k;null!=this.sourceRoot&&(d=f.relative(this.sourceRoot,d));if(this._sources.has(d))return this.sourcesContent[this._sources.indexOf(d)]; +var g=this.sources,n;for(n=0;n +g||95!==d.charCodeAt(g-1)||95!==d.charCodeAt(g-2)||111!==d.charCodeAt(g-3)||116!==d.charCodeAt(g-4)||111!==d.charCodeAt(g-5)||114!==d.charCodeAt(g-6)||112!==d.charCodeAt(g-7)||95!==d.charCodeAt(g-8)||95!==d.charCodeAt(g-9))return!1;for(g-=10;0<=g;g--)if(36!==d.charCodeAt(g))return!1;return!0}function r(d,g){return d===g?0:null===d?1:null===g?-1:d>g?1:-1}A.getArg=function(d,g,n){if(g in d)return d[g];if(3===arguments.length)return n;throw Error('"'+g+'" is a required argument.');};var k=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/, +u=/^data:.+,.+$/;A.urlParse=e;A.urlGenerate=p;A.normalize=t;A.join=m;A.isAbsolute=function(d){return"/"===d.charAt(0)||k.test(d)};A.relative=function(d,g){""===d&&(d=".");d=d.replace(/\/$/,"");for(var n=0;0!==g.indexOf(d+"/");){var v=d.lastIndexOf("/");if(0>v)return g;d=d.slice(0,v);if(d.match(/^([^\/]+:\/)?\/*$/))return g;++n}return Array(n+1).join("../")+g.substr(d.length+1)};C=!("__proto__"in Object.create(null));A.toSetString=C?f:c;A.fromSetString=C?f:l;A.compareByOriginalPositions=function(d, +g,n){var v=r(d.source,g.source);if(0!==v)return v;v=d.originalLine-g.originalLine;if(0!==v)return v;v=d.originalColumn-g.originalColumn;if(0!==v||n)return v;v=d.generatedColumn-g.generatedColumn;if(0!==v)return v;v=d.generatedLine-g.generatedLine;return 0!==v?v:r(d.name,g.name)};A.compareByGeneratedPositionsDeflated=function(d,g,n){var v=d.generatedLine-g.generatedLine;if(0!==v)return v;v=d.generatedColumn-g.generatedColumn;if(0!==v||n)return v;v=r(d.source,g.source);if(0!==v)return v;v=d.originalLine- +g.originalLine;if(0!==v)return v;v=d.originalColumn-g.originalColumn;return 0!==v?v:r(d.name,g.name)};A.compareByGeneratedPositionsInflated=function(d,g){var n=d.generatedLine-g.generatedLine;if(0!==n)return n;n=d.generatedColumn-g.generatedColumn;if(0!==n)return n;n=r(d.source,g.source);if(0!==n)return n;n=d.originalLine-g.originalLine;if(0!==n)return n;n=d.originalColumn-g.originalColumn;return 0!==n?n:r(d.name,g.name)};A.parseSourceMapInput=function(d){return JSON.parse(d.replace(/^\)]}'[^\n]*\n/, +""))};A.computeSourceURL=function(d,g,n){g=g||"";d&&("/"!==d[d.length-1]&&"/"!==g[0]&&(d+="/"),g=d+g);if(n){d=e(n);if(!d)throw Error("sourceMapURL could not be parsed");d.path&&(n=d.path.lastIndexOf("/"),0<=n&&(d.path=d.path.substring(0,n+1)));g=m(p(d),g)}return t(g)}},{}],20:[function(C,J,A){A.SourceMapGenerator=C("./lib/source-map-generator").SourceMapGenerator;A.SourceMapConsumer=C("./lib/source-map-consumer").SourceMapConsumer;A.SourceNode=C("./lib/source-node").SourceNode},{"./lib/source-map-consumer":16, +"./lib/source-map-generator":17,"./lib/source-node":18}],21:[function(C,J,A){(function(e){function p(){return"browser"===a?!0:"node"===a?!1:"undefined"!==typeof window&&"function"===typeof XMLHttpRequest&&!(window.require&&window.module&&window.process&&"renderer"===window.process.type)}function t(x){return function(B){for(var F=0;F";B=this.getLineNumber();null!=B&&(x+=":"+B,(B= +this.getColumnNumber())&&(x+=":"+B))}B="";var F=this.getFunctionName(),E=!0,H=this.isConstructor();if(this.isToplevel()||H)H?B+="new "+(F||""):F?B+=F:(B+=x,E=!1);else{H=this.getTypeName();"[object Object]"===H&&(H="null");var M=this.getMethodName();F?(H&&0!=F.indexOf(H)&&(B+=H+"."),B+=F,M&&F.indexOf("."+M)!=F.length-M.length-1&&(B+=" [as "+M+"]")):B+=H+"."+(M||"")}E&&(B+=" ("+x+")");return B}function q(x){var B={};Object.getOwnPropertyNames(Object.getPrototypeOf(x)).forEach(function(F){B[F]= +/^(?:is|get)/.test(F)?function(){return x[F].call(x)}:x[F]});B.toString=l;return B}function r(x,B){void 0===B&&(B={nextPosition:null,curPosition:null});if(x.isNative())return B.curPosition=null,x;var F=x.getFileName()||x.getScriptNameOrSourceURL();if(F){var E=x.getLineNumber(),H=x.getColumnNumber()-1,M=/^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/,S=M.test;var V="object"===typeof e&&null!==e?e.version:"";M=S.call(M,V)?0:62;1===E&&H>M&&!p()&&!x.isEval()&&(H-=M);var O= +f({source:F,line:E,column:H});B.curPosition=O;x=q(x);var T=x.getFunctionName;x.getFunctionName=function(){return null==B.nextPosition?T():B.nextPosition.name||T()};x.getFileName=function(){return O.source};x.getLineNumber=function(){return O.line};x.getColumnNumber=function(){return O.column+1};x.getScriptNameOrSourceURL=function(){return O.source};return x}var Q=x.isEval()&&x.getEvalOrigin();Q&&(Q=c(Q),x=q(x),x.getEvalOrigin=function(){return Q});return x}function k(x,B){L&&(b={},h={});for(var F= +(x.name||"Error")+": "+(x.message||""),E={nextPosition:null,curPosition:null},H=[],M=B.length-1;0<=M;M--)H.push("\n at "+r(B[M],E)),E.nextPosition=E.curPosition;E.curPosition=E.nextPosition=null;return F+H.reverse().join("")}function u(x){var B=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(x.stack);if(B){x=B[1];var F=+B[2];B=+B[3];var E=b[x];if(!E&&v&&v.existsSync(x))try{E=v.readFileSync(x,"utf8")}catch(H){E=""}if(E&&(E=E.split(/(?:\r\n|\r|\n)/)[F-1]))return x+":"+F+"\n"+E+"\n"+Array(B).join(" ")+ +"^"}return null}function d(){var x=e.emit;e.emit=function(B){if("uncaughtException"===B){var F=arguments[1]&&arguments[1].stack,E=0=12" + }, + "volta": { + "node": "16.11.0", + "npm": "7.24.2" + } +} diff --git a/node_modules/@cspotcode/source-map-support/register-hook-require.d.ts b/node_modules/@cspotcode/source-map-support/register-hook-require.d.ts new file mode 100755 index 0000000..a787e69 --- /dev/null +++ b/node_modules/@cspotcode/source-map-support/register-hook-require.d.ts @@ -0,0 +1,7 @@ +// tslint:disable:no-useless-files + +// For following usage: +// import '@cspotcode/source-map-support/register-hook-require' +// Instead of: +// import sourceMapSupport from '@cspotcode/source-map-support' +// sourceMapSupport.install({hookRequire: true}) diff --git a/node_modules/@cspotcode/source-map-support/register-hook-require.js b/node_modules/@cspotcode/source-map-support/register-hook-require.js new file mode 100644 index 0000000..6bc12ab --- /dev/null +++ b/node_modules/@cspotcode/source-map-support/register-hook-require.js @@ -0,0 +1,3 @@ +require('./').install({ + hookRequire: true +}); diff --git a/node_modules/@cspotcode/source-map-support/register.d.ts b/node_modules/@cspotcode/source-map-support/register.d.ts new file mode 100755 index 0000000..063cd7c --- /dev/null +++ b/node_modules/@cspotcode/source-map-support/register.d.ts @@ -0,0 +1,7 @@ +// tslint:disable:no-useless-files + +// For following usage: +// import '@cspotcode/source-map-support/register' +// Instead of: +// import sourceMapSupport from '@cspotcode/source-map-support' +// sourceMapSupport.install() diff --git a/node_modules/@cspotcode/source-map-support/register.js b/node_modules/@cspotcode/source-map-support/register.js new file mode 100644 index 0000000..4f68e67 --- /dev/null +++ b/node_modules/@cspotcode/source-map-support/register.js @@ -0,0 +1 @@ +require('./').install(); diff --git a/node_modules/@cspotcode/source-map-support/source-map-support.d.ts b/node_modules/@cspotcode/source-map-support/source-map-support.d.ts new file mode 100755 index 0000000..d8cb9d8 --- /dev/null +++ b/node_modules/@cspotcode/source-map-support/source-map-support.d.ts @@ -0,0 +1,76 @@ +// Type definitions for source-map-support 0.5 +// Project: https://github.com/evanw/node-source-map-support +// Definitions by: Bart van der Schoor +// Jason Cheatham +// Alcedo Nathaniel De Guzman Jr +// Griffin Yourick +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export interface RawSourceMap { + version: 3; + sources: string[]; + names: string[]; + sourceRoot?: string; + sourcesContent?: string[]; + mappings: string; + file: string; +} + +/** + * Output of retrieveSourceMap(). + * From source-map-support: + * The map field may be either a string or the parsed JSON object (i.e., + * it must be a valid argument to the SourceMapConsumer constructor). + */ +export interface UrlAndMap { + url: string; + map: string | RawSourceMap; +} + +/** + * Options to install(). + */ +export interface Options { + handleUncaughtExceptions?: boolean | undefined; + hookRequire?: boolean | undefined; + emptyCacheBetweenOperations?: boolean | undefined; + environment?: 'auto' | 'browser' | 'node' | undefined; + overrideRetrieveFile?: boolean | undefined; + overrideRetrieveSourceMap?: boolean | undefined; + retrieveFile?(path: string): string; + retrieveSourceMap?(source: string): UrlAndMap | null; + /** + * Set false to disable redirection of require / import `source-map-support` to `@cspotcode/source-map-support` + */ + redirectConflictingLibrary?: boolean; + /** + * Callback will be called every time we redirect due to `redirectConflictingLibrary` + * This allows consumers to log helpful warnings if they choose. + * @param parent NodeJS.Module which made the require() or require.resolve() call + * @param options options object internally passed to node's `_resolveFilename` hook + */ + onConflictingLibraryRedirect?: (request: string, parent: any, isMain: boolean, options: any, redirectedRequest: string) => void; +} + +export interface Position { + source: string; + line: number; + column: number; +} + +export function wrapCallSite(frame: any /* StackFrame */): any /* StackFrame */; +export function getErrorSource(error: Error): string | null; +export function mapSourcePosition(position: Position): Position; +export function retrieveSourceMap(source: string): UrlAndMap | null; +export function resetRetrieveHandlers(): void; + +/** + * Install SourceMap support. + * @param options Can be used to e.g. disable uncaughtException handler. + */ +export function install(options?: Options): void; + +/** + * Uninstall SourceMap support. + */ +export function uninstall(): void; diff --git a/node_modules/@cspotcode/source-map-support/source-map-support.js b/node_modules/@cspotcode/source-map-support/source-map-support.js new file mode 100644 index 0000000..ad830b6 --- /dev/null +++ b/node_modules/@cspotcode/source-map-support/source-map-support.js @@ -0,0 +1,938 @@ +const { TraceMap, originalPositionFor, AnyMap } = require('@jridgewell/trace-mapping'); +var path = require('path'); +const { fileURLToPath, pathToFileURL } = require('url'); +var util = require('util'); + +var fs; +try { + fs = require('fs'); + if (!fs.existsSync || !fs.readFileSync) { + // fs doesn't have all methods we need + fs = null; + } +} catch (err) { + /* nop */ +} + +/** + * Requires a module which is protected against bundler minification. + * + * @param {NodeModule} mod + * @param {string} request + */ +function dynamicRequire(mod, request) { + return mod.require(request); +} + +/** + * @typedef {{ + * enabled: boolean; + * originalValue: any; + * installedValue: any; + * }} HookState + * Used for installing and uninstalling hooks + */ + +// Increment this if the format of sharedData changes in a breaking way. +var sharedDataVersion = 1; + +/** + * @template T + * @param {T} defaults + * @returns {T} + */ +function initializeSharedData(defaults) { + var sharedDataKey = 'source-map-support/sharedData'; + if (typeof Symbol !== 'undefined') { + sharedDataKey = Symbol.for(sharedDataKey); + } + var sharedData = this[sharedDataKey]; + if (!sharedData) { + sharedData = { version: sharedDataVersion }; + if (Object.defineProperty) { + Object.defineProperty(this, sharedDataKey, { value: sharedData }); + } else { + this[sharedDataKey] = sharedData; + } + } + if (sharedDataVersion !== sharedData.version) { + throw new Error("Multiple incompatible instances of source-map-support were loaded"); + } + for (var key in defaults) { + if (!(key in sharedData)) { + sharedData[key] = defaults[key]; + } + } + return sharedData; +} + +// If multiple instances of source-map-support are loaded into the same +// context, they shouldn't overwrite each other. By storing handlers, caches, +// and other state on a shared object, different instances of +// source-map-support can work together in a limited way. This does require +// that future versions of source-map-support continue to support the fields on +// this object. If this internal contract ever needs to be broken, increment +// sharedDataVersion. (This version number is not the same as any of the +// package's version numbers, which should reflect the *external* API of +// source-map-support.) +var sharedData = initializeSharedData({ + + // Only install once if called multiple times + // Remember how the environment looked before installation so we can restore if able + /** @type {HookState} */ + errorPrepareStackTraceHook: undefined, + /** @type {HookState} */ + processEmitHook: undefined, + /** @type {HookState} */ + moduleResolveFilenameHook: undefined, + + /** @type {Array<(request: string, parent: any, isMain: boolean, options: any, redirectedRequest: string) => void>} */ + onConflictingLibraryRedirectArr: [], + + // If true, the caches are reset before a stack trace formatting operation + emptyCacheBetweenOperations: false, + + // Maps a file path to a string containing the file contents + fileContentsCache: Object.create(null), + + // Maps a file path to a source map for that file + /** @type {Record C:/dir/file + '/'; // file:///root-dir/file -> /root-dir/file + }); + } + const key = getCacheKey(path); + if(hasFileContentsCacheFromKey(key)) { + return getFileContentsCacheFromKey(key); + } + + var contents = ''; + try { + if (!fs) { + // Use SJAX if we are in the browser + var xhr = new XMLHttpRequest(); + xhr.open('GET', path, /** async */ false); + xhr.send(null); + if (xhr.readyState === 4 && xhr.status === 200) { + contents = xhr.responseText; + } + } else if (fs.existsSync(path)) { + // Otherwise, use the filesystem + contents = fs.readFileSync(path, 'utf8'); + } + } catch (er) { + /* ignore any errors */ + } + + return setFileContentsCache(path, contents); +}); + +// Support URLs relative to a directory, but be careful about a protocol prefix +// in case we are in the browser (i.e. directories may start with "http://" or "file:///") +function supportRelativeURL(file, url) { + if(!file) return url; + // given that this happens within error formatting codepath, probably best to + // fallback instead of throwing if anything goes wrong + try { + // if should output a URL + if(isAbsoluteUrl(file) || isSchemeRelativeUrl(file)) { + if(isAbsoluteUrl(url) || isSchemeRelativeUrl(url)) { + return new URL(url, file).toString(); + } + if(path.isAbsolute(url)) { + return new URL(pathToFileURL(url), file).toString(); + } + // url is relative path or URL + return new URL(url.replace(/\\/g, '/'), file).toString(); + } + // if should output a path (unless URL is something like https://) + if(path.isAbsolute(file)) { + if(isFileUrl(url)) { + return fileURLToPath(url); + } + if(isSchemeRelativeUrl(url)) { + return fileURLToPath(new URL(url, 'file://')); + } + if(isAbsoluteUrl(url)) { + // url is a non-file URL + // Go with the URL + return url; + } + if(path.isAbsolute(url)) { + // Normalize at all? decodeURI or normalize slashes? + return path.normalize(url); + } + // url is relative path or URL + return path.join(file, '..', decodeURI(url)); + } + // If we get here, file is relative. + // Shouldn't happen since node identifies modules with absolute paths or URLs. + // But we can take a stab at returning something meaningful anyway. + if(isAbsoluteUrl(url) || isSchemeRelativeUrl(url)) { + return url; + } + return path.join(file, '..', url); + } catch(e) { + return url; + } +} + +// Return pathOrUrl in the same style as matchStyleOf: either a file URL or a native path +function matchStyleOfPathOrUrl(matchStyleOf, pathOrUrl) { + try { + if(isAbsoluteUrl(matchStyleOf) || isSchemeRelativeUrl(matchStyleOf)) { + if(isAbsoluteUrl(pathOrUrl) || isSchemeRelativeUrl(pathOrUrl)) return pathOrUrl; + if(path.isAbsolute(pathOrUrl)) return pathToFileURL(pathOrUrl).toString(); + } else if(path.isAbsolute(matchStyleOf)) { + if(isAbsoluteUrl(pathOrUrl) || isSchemeRelativeUrl(pathOrUrl)) { + return fileURLToPath(new URL(pathOrUrl, 'file://')); + } + } + return pathOrUrl; + } catch(e) { + return pathOrUrl; + } +} + +function retrieveSourceMapURL(source) { + var fileData; + + if (isInBrowser()) { + try { + var xhr = new XMLHttpRequest(); + xhr.open('GET', source, false); + xhr.send(null); + fileData = xhr.readyState === 4 ? xhr.responseText : null; + + // Support providing a sourceMappingURL via the SourceMap header + var sourceMapHeader = xhr.getResponseHeader("SourceMap") || + xhr.getResponseHeader("X-SourceMap"); + if (sourceMapHeader) { + return sourceMapHeader; + } + } catch (e) { + } + } + + // Get the URL of the source map + fileData = retrieveFile(tryFileURLToPath(source)); + var re = /(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/mg; + // Keep executing the search to find the *last* sourceMappingURL to avoid + // picking up sourceMappingURLs from comments, strings, etc. + var lastMatch, match; + while (match = re.exec(fileData)) lastMatch = match; + if (!lastMatch) return null; + return lastMatch[1]; +}; + +// Can be overridden by the retrieveSourceMap option to install. Takes a +// generated source filename; returns a {map, optional url} object, or null if +// there is no source map. The map field may be either a string or the parsed +// JSON object (ie, it must be a valid argument to the SourceMapConsumer +// constructor). +/** @type {(source: string) => import('./source-map-support').UrlAndMap | null} */ +var retrieveSourceMap = handlerExec(sharedData.retrieveMapHandlers, sharedData.internalRetrieveMapHandlers); +sharedData.internalRetrieveMapHandlers.push(function(source) { + var sourceMappingURL = retrieveSourceMapURL(source); + if (!sourceMappingURL) return null; + + // Read the contents of the source map + var sourceMapData; + if (reSourceMap.test(sourceMappingURL)) { + // Support source map URL as a data url + var rawData = sourceMappingURL.slice(sourceMappingURL.indexOf(',') + 1); + sourceMapData = Buffer.from(rawData, "base64").toString(); + sourceMappingURL = source; + } else { + // Support source map URLs relative to the source URL + sourceMappingURL = supportRelativeURL(source, sourceMappingURL); + sourceMapData = retrieveFile(tryFileURLToPath(sourceMappingURL)); + } + + if (!sourceMapData) { + return null; + } + + return { + url: sourceMappingURL, + map: sourceMapData + }; +}); + +function mapSourcePosition(position) { + var sourceMap = getSourceMapCache(position.source); + if (!sourceMap) { + // Call the (overrideable) retrieveSourceMap function to get the source map. + var urlAndMap = retrieveSourceMap(position.source); + if (urlAndMap) { + sourceMap = setSourceMapCache(position.source, { + url: urlAndMap.url, + map: new AnyMap(urlAndMap.map, urlAndMap.url) + }); + + // Overwrite trace-mapping's resolutions, because they do not handle + // Windows paths the way we want. + // TODO Remove now that windows path support was added to resolve-uri and thus trace-mapping? + sourceMap.map.resolvedSources = sourceMap.map.sources.map(s => supportRelativeURL(sourceMap.url, s)); + + // Load all sources stored inline with the source map into the file cache + // to pretend like they are already loaded. They may not exist on disk. + if (sourceMap.map.sourcesContent) { + sourceMap.map.resolvedSources.forEach(function(resolvedSource, i) { + var contents = sourceMap.map.sourcesContent[i]; + if (contents) { + setFileContentsCache(resolvedSource, contents); + } + }); + } + } else { + sourceMap = setSourceMapCache(position.source, { + url: null, + map: null + }); + } + } + + // Resolve the source URL relative to the URL of the source map + if (sourceMap && sourceMap.map) { + var originalPosition = originalPositionFor(sourceMap.map, position); + + // Only return the original position if a matching line was found. If no + // matching line is found then we return position instead, which will cause + // the stack trace to print the path and line for the compiled file. It is + // better to give a precise location in the compiled file than a vague + // location in the original file. + if (originalPosition.source !== null) { + // originalPosition.source has *already* been resolved against sourceMap.url + // so is *already* as absolute as possible. + // However, we want to ensure we output in same format as input: URL or native path + originalPosition.source = matchStyleOfPathOrUrl( + position.source, originalPosition.source); + return originalPosition; + } + } + + return position; +} + +// Parses code generated by FormatEvalOrigin(), a function inside V8: +// https://code.google.com/p/v8/source/browse/trunk/src/messages.js +function mapEvalOrigin(origin) { + // Most eval() calls are in this format + var match = /^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(origin); + if (match) { + var position = mapSourcePosition({ + source: match[2], + line: +match[3], + column: match[4] - 1 + }); + return 'eval at ' + match[1] + ' (' + position.source + ':' + + position.line + ':' + (position.column + 1) + ')'; + } + + // Parse nested eval() calls using recursion + match = /^eval at ([^(]+) \((.+)\)$/.exec(origin); + if (match) { + return 'eval at ' + match[1] + ' (' + mapEvalOrigin(match[2]) + ')'; + } + + // Make sure we still return useful information if we didn't find anything + return origin; +} + +// This is copied almost verbatim from the V8 source code at +// https://code.google.com/p/v8/source/browse/trunk/src/messages.js +// Update 2022-04-29: +// https://github.com/v8/v8/blob/98f6f100c5ab8e390e51422747c4ef644d5ac6f2/src/builtins/builtins-callsite.cc#L175-L179 +// https://github.com/v8/v8/blob/98f6f100c5ab8e390e51422747c4ef644d5ac6f2/src/objects/call-site-info.cc#L795-L804 +// https://github.com/v8/v8/blob/98f6f100c5ab8e390e51422747c4ef644d5ac6f2/src/objects/call-site-info.cc#L717-L750 +// The implementation of wrapCallSite() used to just forward to the actual source +// code of CallSite.prototype.toString but unfortunately a new release of V8 +// did something to the prototype chain and broke the shim. The only fix I +// could find was copy/paste. +function CallSiteToString() { + var fileName; + var fileLocation = ""; + if (this.isNative()) { + fileLocation = "native"; + } else { + fileName = this.getScriptNameOrSourceURL(); + if (!fileName && this.isEval()) { + fileLocation = this.getEvalOrigin(); + fileLocation += ", "; // Expecting source position to follow. + } + + if (fileName) { + fileLocation += fileName; + } else { + // Source code does not originate from a file and is not native, but we + // can still get the source position inside the source string, e.g. in + // an eval string. + fileLocation += ""; + } + var lineNumber = this.getLineNumber(); + if (lineNumber != null) { + fileLocation += ":" + lineNumber; + var columnNumber = this.getColumnNumber(); + if (columnNumber) { + fileLocation += ":" + columnNumber; + } + } + } + + var line = ""; + var isAsync = this.isAsync ? this.isAsync() : false; + if(isAsync) { + line += 'async '; + var isPromiseAll = this.isPromiseAll ? this.isPromiseAll() : false; + var isPromiseAny = this.isPromiseAny ? this.isPromiseAny() : false; + if(isPromiseAny || isPromiseAll) { + line += isPromiseAll ? 'Promise.all (index ' : 'Promise.any (index '; + var promiseIndex = this.getPromiseIndex(); + line += promiseIndex + ')'; + } + } + var functionName = this.getFunctionName(); + var addSuffix = true; + var isConstructor = this.isConstructor(); + var isMethodCall = !(this.isToplevel() || isConstructor); + if (isMethodCall) { + var typeName = this.getTypeName(); + // Fixes shim to be backward compatable with Node v0 to v4 + if (typeName === "[object Object]") { + typeName = "null"; + } + var methodName = this.getMethodName(); + if (functionName) { + if (typeName && functionName.indexOf(typeName) != 0) { + line += typeName + "."; + } + line += functionName; + if (methodName && functionName.indexOf("." + methodName) != functionName.length - methodName.length - 1) { + line += " [as " + methodName + "]"; + } + } else { + line += typeName + "." + (methodName || ""); + } + } else if (isConstructor) { + line += "new " + (functionName || ""); + } else if (functionName) { + line += functionName; + } else { + line += fileLocation; + addSuffix = false; + } + if (addSuffix) { + line += " (" + fileLocation + ")"; + } + return line; +} + +function cloneCallSite(frame) { + var object = {}; + Object.getOwnPropertyNames(Object.getPrototypeOf(frame)).forEach(function(name) { + object[name] = /^(?:is|get)/.test(name) ? function() { return frame[name].call(frame); } : frame[name]; + }); + object.toString = CallSiteToString; + return object; +} + +function wrapCallSite(frame, state) { + // provides interface backward compatibility + if (state === undefined) { + state = { nextPosition: null, curPosition: null } + } + if(frame.isNative()) { + state.curPosition = null; + return frame; + } + + // Most call sites will return the source file from getFileName(), but code + // passed to eval() ending in "//# sourceURL=..." will return the source file + // from getScriptNameOrSourceURL() instead + var source = frame.getFileName() || frame.getScriptNameOrSourceURL(); + if (source) { + // v8 does not expose its internal isWasm, etc methods, so we do this instead. + if(source.startsWith('wasm://')) { + state.curPosition = null; + return frame; + } + + var line = frame.getLineNumber(); + var column = frame.getColumnNumber() - 1; + + // Fix position in Node where some (internal) code is prepended. + // See https://github.com/evanw/node-source-map-support/issues/36 + // Header removed in node at ^10.16 || >=11.11.0 + // v11 is not an LTS candidate, we can just test the one version with it. + // Test node versions for: 10.16-19, 10.20+, 12-19, 20-99, 100+, or 11.11 + var noHeader = /^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/; + var headerLength = noHeader.test(process.version) ? 0 : 62; + if (line === 1 && column > headerLength && !isInBrowser() && !frame.isEval()) { + column -= headerLength; + } + + var position = mapSourcePosition({ + source: source, + line: line, + column: column + }); + state.curPosition = position; + frame = cloneCallSite(frame); + var originalFunctionName = frame.getFunctionName; + frame.getFunctionName = function() { + if (state.nextPosition == null) { + return originalFunctionName(); + } + return state.nextPosition.name || originalFunctionName(); + }; + frame.getFileName = function() { return position.source; }; + frame.getLineNumber = function() { return position.line; }; + frame.getColumnNumber = function() { return position.column + 1; }; + frame.getScriptNameOrSourceURL = function() { return position.source; }; + return frame; + } + + // Code called using eval() needs special handling + var origin = frame.isEval() && frame.getEvalOrigin(); + if (origin) { + origin = mapEvalOrigin(origin); + frame = cloneCallSite(frame); + frame.getEvalOrigin = function() { return origin; }; + return frame; + } + + // If we get here then we were unable to change the source position + return frame; +} + +var kIsNodeError = undefined; +try { + // Get a deliberate ERR_INVALID_ARG_TYPE + // TODO is there a better way to reliably get an instance of NodeError? + path.resolve(123); +} catch(e) { + const symbols = Object.getOwnPropertySymbols(e); + const symbol = symbols.find(function (s) {return s.toString().indexOf('kIsNodeError') >= 0}); + if(symbol) kIsNodeError = symbol; +} + +const ErrorPrototypeToString = (err) =>Error.prototype.toString.call(err); + +/** @param {HookState} hookState */ +function createPrepareStackTrace(hookState) { + return prepareStackTrace; + + // This function is part of the V8 stack trace API, for more info see: + // https://v8.dev/docs/stack-trace-api + function prepareStackTrace(error, stack) { + if(!hookState.enabled) return hookState.originalValue.apply(this, arguments); + + if (sharedData.emptyCacheBetweenOperations) { + clearCaches(); + } + + // node gives its own errors special treatment. Mimic that behavior + // https://github.com/nodejs/node/blob/3cbaabc4622df1b4009b9d026a1a970bdbae6e89/lib/internal/errors.js#L118-L128 + // https://github.com/nodejs/node/pull/39182 + var errorString; + if (kIsNodeError) { + if(kIsNodeError in error) { + errorString = `${error.name} [${error.code}]: ${error.message}`; + } else { + errorString = ErrorPrototypeToString(error); + } + } else { + var name = error.name || 'Error'; + var message = error.message || ''; + errorString = message ? name + ": " + message : name; + } + + var state = { nextPosition: null, curPosition: null }; + var processedStack = []; + for (var i = stack.length - 1; i >= 0; i--) { + processedStack.push('\n at ' + wrapCallSite(stack[i], state)); + state.nextPosition = state.curPosition; + } + state.curPosition = state.nextPosition = null; + return errorString + processedStack.reverse().join(''); + } +} + +// Generate position and snippet of original source with pointer +function getErrorSource(error) { + var match = /\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(error.stack); + if (match) { + var source = match[1]; + var line = +match[2]; + var column = +match[3]; + + // Support the inline sourceContents inside the source map + var contents = getFileContentsCache(source); + + const sourceAsPath = tryFileURLToPath(source); + + // Support files on disk + if (!contents && fs && fs.existsSync(sourceAsPath)) { + try { + contents = fs.readFileSync(sourceAsPath, 'utf8'); + } catch (er) { + contents = ''; + } + } + + // Format the line from the original source code like node does + if (contents) { + var code = contents.split(/(?:\r\n|\r|\n)/)[line - 1]; + if (code) { + return source + ':' + line + '\n' + code + '\n' + + new Array(column).join(' ') + '^'; + } + } + } + return null; +} + +function printFatalErrorUponExit (error) { + var source = getErrorSource(error); + + // Ensure error is printed synchronously and not truncated + if (process.stderr._handle && process.stderr._handle.setBlocking) { + process.stderr._handle.setBlocking(true); + } + + if (source) { + console.error(source); + } + + // Matches node's behavior for colorized output + console.error( + util.inspect(error, { + customInspect: false, + colors: process.stderr.isTTY + }) + ); +} + +function shimEmitUncaughtException () { + const originalValue = process.emit; + var hook = sharedData.processEmitHook = { + enabled: true, + originalValue, + installedValue: undefined + }; + var isTerminatingDueToFatalException = false; + var fatalException; + + process.emit = sharedData.processEmitHook.installedValue = function (type) { + const hadListeners = originalValue.apply(this, arguments); + if(hook.enabled) { + if (type === 'uncaughtException' && !hadListeners) { + isTerminatingDueToFatalException = true; + fatalException = arguments[1]; + process.exit(1); + } + if (type === 'exit' && isTerminatingDueToFatalException) { + printFatalErrorUponExit(fatalException); + } + } + return hadListeners; + }; +} + +var originalRetrieveFileHandlers = sharedData.retrieveFileHandlers.slice(0); +var originalRetrieveMapHandlers = sharedData.retrieveMapHandlers.slice(0); + +exports.wrapCallSite = wrapCallSite; +exports.getErrorSource = getErrorSource; +exports.mapSourcePosition = mapSourcePosition; +exports.retrieveSourceMap = retrieveSourceMap; + +exports.install = function(options) { + options = options || {}; + + if (options.environment) { + environment = options.environment; + if (["node", "browser", "auto"].indexOf(environment) === -1) { + throw new Error("environment " + environment + " was unknown. Available options are {auto, browser, node}") + } + } + + // Use dynamicRequire to avoid including in browser bundles + var Module = dynamicRequire(module, 'module'); + + // Redirect subsequent imports of "source-map-support" + // to this package + const {redirectConflictingLibrary = true, onConflictingLibraryRedirect} = options; + if(redirectConflictingLibrary) { + if (!sharedData.moduleResolveFilenameHook) { + const originalValue = Module._resolveFilename; + const moduleResolveFilenameHook = sharedData.moduleResolveFilenameHook = { + enabled: true, + originalValue, + installedValue: undefined, + } + Module._resolveFilename = sharedData.moduleResolveFilenameHook.installedValue = function (request, parent, isMain, options) { + if (moduleResolveFilenameHook.enabled) { + // Match all source-map-support entrypoints: source-map-support, source-map-support/register + let requestRedirect; + if (request === 'source-map-support') { + requestRedirect = './'; + } else if (request === 'source-map-support/register') { + requestRedirect = './register'; + } + + if (requestRedirect !== undefined) { + const newRequest = require.resolve(requestRedirect); + for (const cb of sharedData.onConflictingLibraryRedirectArr) { + cb(request, parent, isMain, options, newRequest); + } + request = newRequest; + } + } + + return originalValue.call(this, request, parent, isMain, options); + } + } + if (onConflictingLibraryRedirect) { + sharedData.onConflictingLibraryRedirectArr.push(onConflictingLibraryRedirect); + } + } + + // Allow sources to be found by methods other than reading the files + // directly from disk. + if (options.retrieveFile) { + if (options.overrideRetrieveFile) { + sharedData.retrieveFileHandlers.length = 0; + } + + sharedData.retrieveFileHandlers.unshift(options.retrieveFile); + } + + // Allow source maps to be found by methods other than reading the files + // directly from disk. + if (options.retrieveSourceMap) { + if (options.overrideRetrieveSourceMap) { + sharedData.retrieveMapHandlers.length = 0; + } + + sharedData.retrieveMapHandlers.unshift(options.retrieveSourceMap); + } + + // Support runtime transpilers that include inline source maps + if (options.hookRequire && !isInBrowser()) { + var $compile = Module.prototype._compile; + + if (!$compile.__sourceMapSupport) { + Module.prototype._compile = function(content, filename) { + setFileContentsCache(filename, content); + setSourceMapCache(filename, undefined); + return $compile.call(this, content, filename); + }; + + Module.prototype._compile.__sourceMapSupport = true; + } + } + + // Configure options + if (!sharedData.emptyCacheBetweenOperations) { + sharedData.emptyCacheBetweenOperations = 'emptyCacheBetweenOperations' in options ? + options.emptyCacheBetweenOperations : false; + } + + + // Install the error reformatter + if (!sharedData.errorPrepareStackTraceHook) { + const originalValue = Error.prepareStackTrace; + sharedData.errorPrepareStackTraceHook = { + enabled: true, + originalValue, + installedValue: undefined + }; + Error.prepareStackTrace = sharedData.errorPrepareStackTraceHook.installedValue = createPrepareStackTrace(sharedData.errorPrepareStackTraceHook); + } + + if (!sharedData.processEmitHook) { + var installHandler = 'handleUncaughtExceptions' in options ? + options.handleUncaughtExceptions : true; + + // Do not override 'uncaughtException' with our own handler in Node.js + // Worker threads. Workers pass the error to the main thread as an event, + // rather than printing something to stderr and exiting. + try { + // We need to use `dynamicRequire` because `require` on it's own will be optimized by WebPack/Browserify. + var worker_threads = dynamicRequire(module, 'worker_threads'); + if (worker_threads.isMainThread === false) { + installHandler = false; + } + } catch(e) {} + + // Provide the option to not install the uncaught exception handler. This is + // to support other uncaught exception handlers (in test frameworks, for + // example). If this handler is not installed and there are no other uncaught + // exception handlers, uncaught exceptions will be caught by node's built-in + // exception handler and the process will still be terminated. However, the + // generated JavaScript code will be shown above the stack trace instead of + // the original source code. + if (installHandler && hasGlobalProcessEventEmitter()) { + shimEmitUncaughtException(); + } + } +}; + +exports.uninstall = function() { + if(sharedData.processEmitHook) { + // Disable behavior + sharedData.processEmitHook.enabled = false; + // If possible, remove our hook function. May not be possible if subsequent third-party hooks have wrapped around us. + if(process.emit === sharedData.processEmitHook.installedValue) { + process.emit = sharedData.processEmitHook.originalValue; + } + sharedData.processEmitHook = undefined; + } + if(sharedData.errorPrepareStackTraceHook) { + // Disable behavior + sharedData.errorPrepareStackTraceHook.enabled = false; + // If possible or necessary, remove our hook function. + // In vanilla environments, prepareStackTrace is `undefined`. + // We cannot delegate to `undefined` the way we can to a function w/`.apply()`; our only option is to remove the function. + // If we are the *first* hook installed, and another was installed on top of us, we have no choice but to remove both. + if(Error.prepareStackTrace === sharedData.errorPrepareStackTraceHook.installedValue || typeof sharedData.errorPrepareStackTraceHook.originalValue !== 'function') { + Error.prepareStackTrace = sharedData.errorPrepareStackTraceHook.originalValue; + } + sharedData.errorPrepareStackTraceHook = undefined; + } + if (sharedData.moduleResolveFilenameHook) { + // Disable behavior + sharedData.moduleResolveFilenameHook.enabled = false; + // If possible, remove our hook function. May not be possible if subsequent third-party hooks have wrapped around us. + var Module = dynamicRequire(module, 'module'); + if(Module._resolveFilename === sharedData.moduleResolveFilenameHook.installedValue) { + Module._resolveFilename = sharedData.moduleResolveFilenameHook.originalValue; + } + sharedData.moduleResolveFilenameHook = undefined; + } + sharedData.onConflictingLibraryRedirectArr.length = 0; +} + +exports.resetRetrieveHandlers = function() { + sharedData.retrieveFileHandlers.length = 0; + sharedData.retrieveMapHandlers.length = 0; +} diff --git a/node_modules/@esbuild/darwin-x64/README.md b/node_modules/@esbuild/darwin-x64/README.md new file mode 100644 index 0000000..a2fd0cb --- /dev/null +++ b/node_modules/@esbuild/darwin-x64/README.md @@ -0,0 +1,3 @@ +# esbuild + +This is the macOS 64-bit binary for esbuild, a JavaScript bundler and minifier. See https://github.com/evanw/esbuild for details. diff --git a/node_modules/@esbuild/darwin-x64/bin/esbuild b/node_modules/@esbuild/darwin-x64/bin/esbuild new file mode 100755 index 0000000..10af517 Binary files /dev/null and b/node_modules/@esbuild/darwin-x64/bin/esbuild differ diff --git a/node_modules/@esbuild/darwin-x64/package.json b/node_modules/@esbuild/darwin-x64/package.json new file mode 100644 index 0000000..7a7b9ad --- /dev/null +++ b/node_modules/@esbuild/darwin-x64/package.json @@ -0,0 +1,20 @@ +{ + "name": "@esbuild/darwin-x64", + "version": "0.25.4", + "description": "The macOS 64-bit binary for esbuild, a JavaScript bundler.", + "repository": { + "type": "git", + "url": "git+https://github.com/evanw/esbuild.git" + }, + "license": "MIT", + "preferUnplugged": true, + "engines": { + "node": ">=18" + }, + "os": [ + "darwin" + ], + "cpu": [ + "x64" + ] +} diff --git a/node_modules/@fastify/busboy/LICENSE b/node_modules/@fastify/busboy/LICENSE new file mode 100644 index 0000000..290762e --- /dev/null +++ b/node_modules/@fastify/busboy/LICENSE @@ -0,0 +1,19 @@ +Copyright Brian White. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/@fastify/busboy/README.md b/node_modules/@fastify/busboy/README.md new file mode 100644 index 0000000..ece3cc8 --- /dev/null +++ b/node_modules/@fastify/busboy/README.md @@ -0,0 +1,271 @@ +# busboy + +
+ +[![Build Status](https://github.com/fastify/busboy/actions/workflows/ci.yml/badge.svg)](https://github.com/fastify/busboy/actions) +[![Coverage Status](https://coveralls.io/repos/fastify/busboy/badge.svg?branch=master)](https://coveralls.io/r/fastify/busboy?branch=master) +[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/) +[![Security Responsible Disclosure](https://img.shields.io/badge/Security-Responsible%20Disclosure-yellow.svg)](https://github.com/fastify/.github/blob/main/SECURITY.md) + +
+ +
+ +[![NPM version](https://img.shields.io/npm/v/@fastify/busboy.svg?style=flat)](https://www.npmjs.com/package/@fastify/busboy) +[![NPM downloads](https://img.shields.io/npm/dm/@fastify/busboy.svg?style=flat)](https://www.npmjs.com/package/@fastify/busboy) + +
+ +Description +=========== + +A Node.js module for parsing incoming HTML form data. + +This is an officially supported fork by [fastify](https://github.com/fastify/) organization of the amazing library [originally created](https://github.com/mscdex/busboy) by Brian White, +aimed at addressing long-standing issues with it. + +Benchmark (Mean time for 500 Kb payload, 2000 cycles, 1000 cycle warmup): + +| Library | Version | Mean time in nanoseconds (less is better) | +|-----------------------|---------|-------------------------------------------| +| busboy | 0.3.1 | `340114` | +| @fastify/busboy | 1.0.0 | `270984` | + +[Changelog](https://github.com/fastify/busboy/blob/master/CHANGELOG.md) since busboy 0.31. + +Requirements +============ + +* [Node.js](http://nodejs.org/) 10+ + + +Install +======= + + npm i @fastify/busboy + + +Examples +======== + +* Parsing (multipart) with default options: + +```javascript +const http = require('node:http'); +const { inspect } = require('node:util'); +const Busboy = require('busboy'); + +http.createServer((req, res) => { + if (req.method === 'POST') { + const busboy = new Busboy({ headers: req.headers }); + busboy.on('file', (fieldname, file, filename, encoding, mimetype) => { + console.log(`File [${fieldname}]: filename: ${filename}, encoding: ${encoding}, mimetype: ${mimetype}`); + file.on('data', data => { + console.log(`File [${fieldname}] got ${data.length} bytes`); + }); + file.on('end', () => { + console.log(`File [${fieldname}] Finished`); + }); + }); + busboy.on('field', (fieldname, val, fieldnameTruncated, valTruncated, encoding, mimetype) => { + console.log(`Field [${fieldname}]: value: ${inspect(val)}`); + }); + busboy.on('finish', () => { + console.log('Done parsing form!'); + res.writeHead(303, { Connection: 'close', Location: '/' }); + res.end(); + }); + req.pipe(busboy); + } else if (req.method === 'GET') { + res.writeHead(200, { Connection: 'close' }); + res.end(` +
+
+
+ +
+ `); + } +}).listen(8000, () => { + console.log('Listening for requests'); +}); + +// Example output, using http://nodejs.org/images/ryan-speaker.jpg as the file: +// +// Listening for requests +// File [filefield]: filename: ryan-speaker.jpg, encoding: binary +// File [filefield] got 11971 bytes +// Field [textfield]: value: 'testing! :-)' +// File [filefield] Finished +// Done parsing form! +``` + +* Save all incoming files to disk: + +```javascript +const http = require('node:http'); +const path = require('node:path'); +const os = require('node:os'); +const fs = require('node:fs'); + +const Busboy = require('busboy'); + +http.createServer(function(req, res) { + if (req.method === 'POST') { + const busboy = new Busboy({ headers: req.headers }); + busboy.on('file', function(fieldname, file, filename, encoding, mimetype) { + var saveTo = path.join(os.tmpdir(), path.basename(fieldname)); + file.pipe(fs.createWriteStream(saveTo)); + }); + busboy.on('finish', function() { + res.writeHead(200, { 'Connection': 'close' }); + res.end("That's all folks!"); + }); + return req.pipe(busboy); + } + res.writeHead(404); + res.end(); +}).listen(8000, function() { + console.log('Listening for requests'); +}); +``` + +* Parsing (urlencoded) with default options: + +```javascript +const http = require('node:http'); +const { inspect } = require('node:util'); + +const Busboy = require('busboy'); + +http.createServer(function(req, res) { + if (req.method === 'POST') { + const busboy = new Busboy({ headers: req.headers }); + busboy.on('file', function(fieldname, file, filename, encoding, mimetype) { + console.log('File [' + fieldname + ']: filename: ' + filename); + file.on('data', function(data) { + console.log('File [' + fieldname + '] got ' + data.length + ' bytes'); + }); + file.on('end', function() { + console.log('File [' + fieldname + '] Finished'); + }); + }); + busboy.on('field', function(fieldname, val, fieldnameTruncated, valTruncated) { + console.log('Field [' + fieldname + ']: value: ' + inspect(val)); + }); + busboy.on('finish', function() { + console.log('Done parsing form!'); + res.writeHead(303, { Connection: 'close', Location: '/' }); + res.end(); + }); + req.pipe(busboy); + } else if (req.method === 'GET') { + res.writeHead(200, { Connection: 'close' }); + res.end('\ +
\ +
\ +
\ + Node.js rules!
\ + \ +
\ + '); + } +}).listen(8000, function() { + console.log('Listening for requests'); +}); + +// Example output: +// +// Listening for requests +// Field [textfield]: value: 'testing! :-)' +// Field [selectfield]: value: '9001' +// Field [checkfield]: value: 'on' +// Done parsing form! +``` + + +API +=== + +_Busboy_ is a _Writable_ stream + +Busboy (special) events +----------------------- + +* **file**(< _string_ >fieldname, < _ReadableStream_ >stream, < _string_ >filename, < _string_ >transferEncoding, < _string_ >mimeType) - Emitted for each new file form field found. `transferEncoding` contains the 'Content-Transfer-Encoding' value for the file stream. `mimeType` contains the 'Content-Type' value for the file stream. + * Note: if you listen for this event, you should always handle the `stream` no matter if you care about the file contents or not (e.g. you can simply just do `stream.resume();` if you want to discard the contents), otherwise the 'finish' event will never fire on the Busboy instance. However, if you don't care about **any** incoming files, you can simply not listen for the 'file' event at all and any/all files will be automatically and safely discarded (these discarded files do still count towards `files` and `parts` limits). + * If a configured file size limit was reached, `stream` will both have a boolean property `truncated` (best checked at the end of the stream) and emit a 'limit' event to notify you when this happens. + * The property `bytesRead` informs about the number of bytes that have been read so far. + +* **field**(< _string_ >fieldname, < _string_ >value, < _boolean_ >fieldnameTruncated, < _boolean_ >valueTruncated, < _string_ >transferEncoding, < _string_ >mimeType) - Emitted for each new non-file field found. + +* **partsLimit**() - Emitted when specified `parts` limit has been reached. No more 'file' or 'field' events will be emitted. + +* **filesLimit**() - Emitted when specified `files` limit has been reached. No more 'file' events will be emitted. + +* **fieldsLimit**() - Emitted when specified `fields` limit has been reached. No more 'field' events will be emitted. + + +Busboy methods +-------------- + +* **(constructor)**(< _object_ >config) - Creates and returns a new Busboy instance. + + * The constructor takes the following valid `config` settings: + + * **headers** - _object_ - These are the HTTP headers of the incoming request, which are used by individual parsers. + + * **autoDestroy** - _boolean_ - Whether this stream should automatically call .destroy() on itself after ending. (Default: false). + + * **highWaterMark** - _integer_ - highWaterMark to use for this Busboy instance (Default: WritableStream default). + + * **fileHwm** - _integer_ - highWaterMark to use for file streams (Default: ReadableStream default). + + * **defCharset** - _string_ - Default character set to use when one isn't defined (Default: 'utf8'). + + * **preservePath** - _boolean_ - If paths in the multipart 'filename' field shall be preserved. (Default: false). + + * **isPartAFile** - __function__ - Use this function to override the default file detection functionality. It has following parameters: + + * fieldName - __string__ The name of the field. + + * contentType - __string__ The content-type of the part, e.g. `text/plain`, `image/jpeg`, `application/octet-stream` + + * fileName - __string__ The name of a file supplied by the part. + + (Default: `(fieldName, contentType, fileName) => (contentType === 'application/octet-stream' || fileName !== undefined)`) + + * **limits** - _object_ - Various limits on incoming data. Valid properties are: + + * **fieldNameSize** - _integer_ - Max field name size (in bytes) (Default: 100 bytes). + + * **fieldSize** - _integer_ - Max field value size (in bytes) (Default: 1 MiB, which is 1024 x 1024 bytes). + + * **fields** - _integer_ - Max number of non-file fields (Default: Infinity). + + * **fileSize** - _integer_ - For multipart forms, the max file size (in bytes) (Default: Infinity). + + * **files** - _integer_ - For multipart forms, the max number of file fields (Default: Infinity). + + * **parts** - _integer_ - For multipart forms, the max number of parts (fields + files) (Default: Infinity). + + * **headerPairs** - _integer_ - For multipart forms, the max number of header key=>value pairs to parse **Default:** 2000 + + * **headerSize** - _integer_ - For multipart forms, the max size of a multipart header **Default:** 81920. + + * The constructor can throw errors: + + * **Busboy expected an options-Object.** - Busboy expected an Object as first parameters. + + * **Busboy expected an options-Object with headers-attribute.** - The first parameter is lacking of a headers-attribute. + + * **Limit $limit is not a valid number** - Busboy expected the desired limit to be of type number. Busboy throws this Error to prevent a potential security issue by falling silently back to the Busboy-defaults. Potential source for this Error can be the direct use of environment variables without transforming them to the type number. + + * **Unsupported Content-Type.** - The `Content-Type` isn't one Busboy can parse. + + * **Missing Content-Type-header.** - The provided headers don't include `Content-Type` at all. diff --git a/node_modules/@fastify/busboy/deps/dicer/LICENSE b/node_modules/@fastify/busboy/deps/dicer/LICENSE new file mode 100644 index 0000000..290762e --- /dev/null +++ b/node_modules/@fastify/busboy/deps/dicer/LICENSE @@ -0,0 +1,19 @@ +Copyright Brian White. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js b/node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js new file mode 100644 index 0000000..3c8c081 --- /dev/null +++ b/node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js @@ -0,0 +1,213 @@ +'use strict' + +const WritableStream = require('node:stream').Writable +const inherits = require('node:util').inherits + +const StreamSearch = require('../../streamsearch/sbmh') + +const PartStream = require('./PartStream') +const HeaderParser = require('./HeaderParser') + +const DASH = 45 +const B_ONEDASH = Buffer.from('-') +const B_CRLF = Buffer.from('\r\n') +const EMPTY_FN = function () {} + +function Dicer (cfg) { + if (!(this instanceof Dicer)) { return new Dicer(cfg) } + WritableStream.call(this, cfg) + + if (!cfg || (!cfg.headerFirst && typeof cfg.boundary !== 'string')) { throw new TypeError('Boundary required') } + + if (typeof cfg.boundary === 'string') { this.setBoundary(cfg.boundary) } else { this._bparser = undefined } + + this._headerFirst = cfg.headerFirst + + this._dashes = 0 + this._parts = 0 + this._finished = false + this._realFinish = false + this._isPreamble = true + this._justMatched = false + this._firstWrite = true + this._inHeader = true + this._part = undefined + this._cb = undefined + this._ignoreData = false + this._partOpts = { highWaterMark: cfg.partHwm } + this._pause = false + + const self = this + this._hparser = new HeaderParser(cfg) + this._hparser.on('header', function (header) { + self._inHeader = false + self._part.emit('header', header) + }) +} +inherits(Dicer, WritableStream) + +Dicer.prototype.emit = function (ev) { + if (ev === 'finish' && !this._realFinish) { + if (!this._finished) { + const self = this + process.nextTick(function () { + self.emit('error', new Error('Unexpected end of multipart data')) + if (self._part && !self._ignoreData) { + const type = (self._isPreamble ? 'Preamble' : 'Part') + self._part.emit('error', new Error(type + ' terminated early due to unexpected end of multipart data')) + self._part.push(null) + process.nextTick(function () { + self._realFinish = true + self.emit('finish') + self._realFinish = false + }) + return + } + self._realFinish = true + self.emit('finish') + self._realFinish = false + }) + } + } else { WritableStream.prototype.emit.apply(this, arguments) } +} + +Dicer.prototype._write = function (data, encoding, cb) { + // ignore unexpected data (e.g. extra trailer data after finished) + if (!this._hparser && !this._bparser) { return cb() } + + if (this._headerFirst && this._isPreamble) { + if (!this._part) { + this._part = new PartStream(this._partOpts) + if (this.listenerCount('preamble') !== 0) { this.emit('preamble', this._part) } else { this._ignore() } + } + const r = this._hparser.push(data) + if (!this._inHeader && r !== undefined && r < data.length) { data = data.slice(r) } else { return cb() } + } + + // allows for "easier" testing + if (this._firstWrite) { + this._bparser.push(B_CRLF) + this._firstWrite = false + } + + this._bparser.push(data) + + if (this._pause) { this._cb = cb } else { cb() } +} + +Dicer.prototype.reset = function () { + this._part = undefined + this._bparser = undefined + this._hparser = undefined +} + +Dicer.prototype.setBoundary = function (boundary) { + const self = this + this._bparser = new StreamSearch('\r\n--' + boundary) + this._bparser.on('info', function (isMatch, data, start, end) { + self._oninfo(isMatch, data, start, end) + }) +} + +Dicer.prototype._ignore = function () { + if (this._part && !this._ignoreData) { + this._ignoreData = true + this._part.on('error', EMPTY_FN) + // we must perform some kind of read on the stream even though we are + // ignoring the data, otherwise node's Readable stream will not emit 'end' + // after pushing null to the stream + this._part.resume() + } +} + +Dicer.prototype._oninfo = function (isMatch, data, start, end) { + let buf; const self = this; let i = 0; let r; let shouldWriteMore = true + + if (!this._part && this._justMatched && data) { + while (this._dashes < 2 && (start + i) < end) { + if (data[start + i] === DASH) { + ++i + ++this._dashes + } else { + if (this._dashes) { buf = B_ONEDASH } + this._dashes = 0 + break + } + } + if (this._dashes === 2) { + if ((start + i) < end && this.listenerCount('trailer') !== 0) { this.emit('trailer', data.slice(start + i, end)) } + this.reset() + this._finished = true + // no more parts will be added + if (self._parts === 0) { + self._realFinish = true + self.emit('finish') + self._realFinish = false + } + } + if (this._dashes) { return } + } + if (this._justMatched) { this._justMatched = false } + if (!this._part) { + this._part = new PartStream(this._partOpts) + this._part._read = function (n) { + self._unpause() + } + if (this._isPreamble && this.listenerCount('preamble') !== 0) { + this.emit('preamble', this._part) + } else if (this._isPreamble !== true && this.listenerCount('part') !== 0) { + this.emit('part', this._part) + } else { + this._ignore() + } + if (!this._isPreamble) { this._inHeader = true } + } + if (data && start < end && !this._ignoreData) { + if (this._isPreamble || !this._inHeader) { + if (buf) { shouldWriteMore = this._part.push(buf) } + shouldWriteMore = this._part.push(data.slice(start, end)) + if (!shouldWriteMore) { this._pause = true } + } else if (!this._isPreamble && this._inHeader) { + if (buf) { this._hparser.push(buf) } + r = this._hparser.push(data.slice(start, end)) + if (!this._inHeader && r !== undefined && r < end) { this._oninfo(false, data, start + r, end) } + } + } + if (isMatch) { + this._hparser.reset() + if (this._isPreamble) { this._isPreamble = false } else { + if (start !== end) { + ++this._parts + this._part.on('end', function () { + if (--self._parts === 0) { + if (self._finished) { + self._realFinish = true + self.emit('finish') + self._realFinish = false + } else { + self._unpause() + } + } + }) + } + } + this._part.push(null) + this._part = undefined + this._ignoreData = false + this._justMatched = true + this._dashes = 0 + } +} + +Dicer.prototype._unpause = function () { + if (!this._pause) { return } + + this._pause = false + if (this._cb) { + const cb = this._cb + this._cb = undefined + cb() + } +} + +module.exports = Dicer diff --git a/node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js b/node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js new file mode 100644 index 0000000..65f667b --- /dev/null +++ b/node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js @@ -0,0 +1,100 @@ +'use strict' + +const EventEmitter = require('node:events').EventEmitter +const inherits = require('node:util').inherits +const getLimit = require('../../../lib/utils/getLimit') + +const StreamSearch = require('../../streamsearch/sbmh') + +const B_DCRLF = Buffer.from('\r\n\r\n') +const RE_CRLF = /\r\n/g +const RE_HDR = /^([^:]+):[ \t]?([\x00-\xFF]+)?$/ // eslint-disable-line no-control-regex + +function HeaderParser (cfg) { + EventEmitter.call(this) + + cfg = cfg || {} + const self = this + this.nread = 0 + this.maxed = false + this.npairs = 0 + this.maxHeaderPairs = getLimit(cfg, 'maxHeaderPairs', 2000) + this.maxHeaderSize = getLimit(cfg, 'maxHeaderSize', 80 * 1024) + this.buffer = '' + this.header = {} + this.finished = false + this.ss = new StreamSearch(B_DCRLF) + this.ss.on('info', function (isMatch, data, start, end) { + if (data && !self.maxed) { + if (self.nread + end - start >= self.maxHeaderSize) { + end = self.maxHeaderSize - self.nread + start + self.nread = self.maxHeaderSize + self.maxed = true + } else { self.nread += (end - start) } + + self.buffer += data.toString('binary', start, end) + } + if (isMatch) { self._finish() } + }) +} +inherits(HeaderParser, EventEmitter) + +HeaderParser.prototype.push = function (data) { + const r = this.ss.push(data) + if (this.finished) { return r } +} + +HeaderParser.prototype.reset = function () { + this.finished = false + this.buffer = '' + this.header = {} + this.ss.reset() +} + +HeaderParser.prototype._finish = function () { + if (this.buffer) { this._parseHeader() } + this.ss.matches = this.ss.maxMatches + const header = this.header + this.header = {} + this.buffer = '' + this.finished = true + this.nread = this.npairs = 0 + this.maxed = false + this.emit('header', header) +} + +HeaderParser.prototype._parseHeader = function () { + if (this.npairs === this.maxHeaderPairs) { return } + + const lines = this.buffer.split(RE_CRLF) + const len = lines.length + let m, h + + for (var i = 0; i < len; ++i) { // eslint-disable-line no-var + if (lines[i].length === 0) { continue } + if (lines[i][0] === '\t' || lines[i][0] === ' ') { + // folded header content + // RFC2822 says to just remove the CRLF and not the whitespace following + // it, so we follow the RFC and include the leading whitespace ... + if (h) { + this.header[h][this.header[h].length - 1] += lines[i] + continue + } + } + + const posColon = lines[i].indexOf(':') + if ( + posColon === -1 || + posColon === 0 + ) { + return + } + m = RE_HDR.exec(lines[i]) + h = m[1].toLowerCase() + this.header[h] = this.header[h] || [] + this.header[h].push((m[2] || '')) + if (++this.npairs === this.maxHeaderPairs) { break } + } +} + +module.exports = HeaderParser diff --git a/node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js b/node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js new file mode 100644 index 0000000..c91da1c --- /dev/null +++ b/node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js @@ -0,0 +1,13 @@ +'use strict' + +const inherits = require('node:util').inherits +const ReadableStream = require('node:stream').Readable + +function PartStream (opts) { + ReadableStream.call(this, opts) +} +inherits(PartStream, ReadableStream) + +PartStream.prototype._read = function (n) {} + +module.exports = PartStream diff --git a/node_modules/@fastify/busboy/deps/dicer/lib/dicer.d.ts b/node_modules/@fastify/busboy/deps/dicer/lib/dicer.d.ts new file mode 100644 index 0000000..3c5b896 --- /dev/null +++ b/node_modules/@fastify/busboy/deps/dicer/lib/dicer.d.ts @@ -0,0 +1,164 @@ +// Type definitions for dicer 0.2 +// Project: https://github.com/mscdex/dicer +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 +/// + +import stream = require("stream"); + +// tslint:disable:unified-signatures + +/** + * A very fast streaming multipart parser for node.js. + * Dicer is a WritableStream + * + * Dicer (special) events: + * - on('finish', ()) - Emitted when all parts have been parsed and the Dicer instance has been ended. + * - on('part', (stream: PartStream)) - Emitted when a new part has been found. + * - on('preamble', (stream: PartStream)) - Emitted for preamble if you should happen to need it (can usually be ignored). + * - on('trailer', (data: Buffer)) - Emitted when trailing data was found after the terminating boundary (as with the preamble, this can usually be ignored too). + */ +export class Dicer extends stream.Writable { + /** + * Creates and returns a new Dicer instance with the following valid config settings: + * + * @param config The configuration to use + */ + constructor(config: Dicer.Config); + /** + * Sets the boundary to use for parsing and performs some initialization needed for parsing. + * You should only need to use this if you set headerFirst to true in the constructor and are parsing the boundary from the preamble header. + * + * @param boundary The boundary to use + */ + setBoundary(boundary: string): void; + addListener(event: "finish", listener: () => void): this; + addListener(event: "part", listener: (stream: Dicer.PartStream) => void): this; + addListener(event: "preamble", listener: (stream: Dicer.PartStream) => void): this; + addListener(event: "trailer", listener: (data: Buffer) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "drain", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: "pipe", listener: (src: stream.Readable) => void): this; + addListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + addListener(event: string, listener: (...args: any[]) => void): this; + on(event: "finish", listener: () => void): this; + on(event: "part", listener: (stream: Dicer.PartStream) => void): this; + on(event: "preamble", listener: (stream: Dicer.PartStream) => void): this; + on(event: "trailer", listener: (data: Buffer) => void): this; + on(event: "close", listener: () => void): this; + on(event: "drain", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "pipe", listener: (src: stream.Readable) => void): this; + on(event: "unpipe", listener: (src: stream.Readable) => void): this; + on(event: string, listener: (...args: any[]) => void): this; + once(event: "finish", listener: () => void): this; + once(event: "part", listener: (stream: Dicer.PartStream) => void): this; + once(event: "preamble", listener: (stream: Dicer.PartStream) => void): this; + once(event: "trailer", listener: (data: Buffer) => void): this; + once(event: "close", listener: () => void): this; + once(event: "drain", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: "pipe", listener: (src: stream.Readable) => void): this; + once(event: "unpipe", listener: (src: stream.Readable) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "finish", listener: () => void): this; + prependListener(event: "part", listener: (stream: Dicer.PartStream) => void): this; + prependListener(event: "preamble", listener: (stream: Dicer.PartStream) => void): this; + prependListener(event: "trailer", listener: (data: Buffer) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "drain", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: "pipe", listener: (src: stream.Readable) => void): this; + prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "finish", listener: () => void): this; + prependOnceListener(event: "part", listener: (stream: Dicer.PartStream) => void): this; + prependOnceListener(event: "preamble", listener: (stream: Dicer.PartStream) => void): this; + prependOnceListener(event: "trailer", listener: (data: Buffer) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "drain", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this; + prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + removeListener(event: "finish", listener: () => void): this; + removeListener(event: "part", listener: (stream: Dicer.PartStream) => void): this; + removeListener(event: "preamble", listener: (stream: Dicer.PartStream) => void): this; + removeListener(event: "trailer", listener: (data: Buffer) => void): this; + removeListener(event: "close", listener: () => void): this; + removeListener(event: "drain", listener: () => void): this; + removeListener(event: "error", listener: (err: Error) => void): this; + removeListener(event: "pipe", listener: (src: stream.Readable) => void): this; + removeListener(event: "unpipe", listener: (src: stream.Readable) => void): this; + removeListener(event: string, listener: (...args: any[]) => void): this; +} + +declare namespace Dicer { + interface Config { + /** + * This is the boundary used to detect the beginning of a new part. + */ + boundary?: string | undefined; + /** + * If true, preamble header parsing will be performed first. + */ + headerFirst?: boolean | undefined; + /** + * The maximum number of header key=>value pairs to parse Default: 2000 (same as node's http). + */ + maxHeaderPairs?: number | undefined; + } + + /** + * PartStream is a _ReadableStream_ + * + * PartStream (special) events: + * - on('header', (header: object)) - An object containing the header for this particular part. Each property value is an array of one or more string values. + */ + interface PartStream extends stream.Readable { + addListener(event: "header", listener: (header: object) => void): this; + addListener(event: "close", listener: () => void): this; + addListener(event: "data", listener: (chunk: Buffer | string) => void): this; + addListener(event: "end", listener: () => void): this; + addListener(event: "readable", listener: () => void): this; + addListener(event: "error", listener: (err: Error) => void): this; + addListener(event: string, listener: (...args: any[]) => void): this; + on(event: "header", listener: (header: object) => void): this; + on(event: "close", listener: () => void): this; + on(event: "data", listener: (chunk: Buffer | string) => void): this; + on(event: "end", listener: () => void): this; + on(event: "readable", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: string, listener: (...args: any[]) => void): this; + once(event: "header", listener: (header: object) => void): this; + once(event: "close", listener: () => void): this; + once(event: "data", listener: (chunk: Buffer | string) => void): this; + once(event: "end", listener: () => void): this; + once(event: "readable", listener: () => void): this; + once(event: "error", listener: (err: Error) => void): this; + once(event: string, listener: (...args: any[]) => void): this; + prependListener(event: "header", listener: (header: object) => void): this; + prependListener(event: "close", listener: () => void): this; + prependListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependListener(event: "end", listener: () => void): this; + prependListener(event: "readable", listener: () => void): this; + prependListener(event: "error", listener: (err: Error) => void): this; + prependListener(event: string, listener: (...args: any[]) => void): this; + prependOnceListener(event: "header", listener: (header: object) => void): this; + prependOnceListener(event: "close", listener: () => void): this; + prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this; + prependOnceListener(event: "end", listener: () => void): this; + prependOnceListener(event: "readable", listener: () => void): this; + prependOnceListener(event: "error", listener: (err: Error) => void): this; + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + removeListener(event: "header", listener: (header: object) => void): this; + removeListener(event: "close", listener: () => void): this; + removeListener(event: "data", listener: (chunk: Buffer | string) => void): this; + removeListener(event: "end", listener: () => void): this; + removeListener(event: "readable", listener: () => void): this; + removeListener(event: "error", listener: (err: Error) => void): this; + removeListener(event: string, listener: (...args: any[]) => void): this; + } +} \ No newline at end of file diff --git a/node_modules/@fastify/busboy/deps/streamsearch/sbmh.js b/node_modules/@fastify/busboy/deps/streamsearch/sbmh.js new file mode 100644 index 0000000..b90c0e8 --- /dev/null +++ b/node_modules/@fastify/busboy/deps/streamsearch/sbmh.js @@ -0,0 +1,228 @@ +'use strict' + +/** + * Copyright Brian White. All rights reserved. + * + * @see https://github.com/mscdex/streamsearch + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + * Based heavily on the Streaming Boyer-Moore-Horspool C++ implementation + * by Hongli Lai at: https://github.com/FooBarWidget/boyer-moore-horspool + */ +const EventEmitter = require('node:events').EventEmitter +const inherits = require('node:util').inherits + +function SBMH (needle) { + if (typeof needle === 'string') { + needle = Buffer.from(needle) + } + + if (!Buffer.isBuffer(needle)) { + throw new TypeError('The needle has to be a String or a Buffer.') + } + + const needleLength = needle.length + + if (needleLength === 0) { + throw new Error('The needle cannot be an empty String/Buffer.') + } + + if (needleLength > 256) { + throw new Error('The needle cannot have a length bigger than 256.') + } + + this.maxMatches = Infinity + this.matches = 0 + + this._occ = new Array(256) + .fill(needleLength) // Initialize occurrence table. + this._lookbehind_size = 0 + this._needle = needle + this._bufpos = 0 + + this._lookbehind = Buffer.alloc(needleLength) + + // Populate occurrence table with analysis of the needle, + // ignoring last letter. + for (var i = 0; i < needleLength - 1; ++i) { // eslint-disable-line no-var + this._occ[needle[i]] = needleLength - 1 - i + } +} +inherits(SBMH, EventEmitter) + +SBMH.prototype.reset = function () { + this._lookbehind_size = 0 + this.matches = 0 + this._bufpos = 0 +} + +SBMH.prototype.push = function (chunk, pos) { + if (!Buffer.isBuffer(chunk)) { + chunk = Buffer.from(chunk, 'binary') + } + const chlen = chunk.length + this._bufpos = pos || 0 + let r + while (r !== chlen && this.matches < this.maxMatches) { r = this._sbmh_feed(chunk) } + return r +} + +SBMH.prototype._sbmh_feed = function (data) { + const len = data.length + const needle = this._needle + const needleLength = needle.length + const lastNeedleChar = needle[needleLength - 1] + + // Positive: points to a position in `data` + // pos == 3 points to data[3] + // Negative: points to a position in the lookbehind buffer + // pos == -2 points to lookbehind[lookbehind_size - 2] + let pos = -this._lookbehind_size + let ch + + if (pos < 0) { + // Lookbehind buffer is not empty. Perform Boyer-Moore-Horspool + // search with character lookup code that considers both the + // lookbehind buffer and the current round's haystack data. + // + // Loop until + // there is a match. + // or until + // we've moved past the position that requires the + // lookbehind buffer. In this case we switch to the + // optimized loop. + // or until + // the character to look at lies outside the haystack. + while (pos < 0 && pos <= len - needleLength) { + ch = this._sbmh_lookup_char(data, pos + needleLength - 1) + + if ( + ch === lastNeedleChar && + this._sbmh_memcmp(data, pos, needleLength - 1) + ) { + this._lookbehind_size = 0 + ++this.matches + this.emit('info', true) + + return (this._bufpos = pos + needleLength) + } + pos += this._occ[ch] + } + + // No match. + + if (pos < 0) { + // There's too few data for Boyer-Moore-Horspool to run, + // so let's use a different algorithm to skip as much as + // we can. + // Forward pos until + // the trailing part of lookbehind + data + // looks like the beginning of the needle + // or until + // pos == 0 + while (pos < 0 && !this._sbmh_memcmp(data, pos, len - pos)) { ++pos } + } + + if (pos >= 0) { + // Discard lookbehind buffer. + this.emit('info', false, this._lookbehind, 0, this._lookbehind_size) + this._lookbehind_size = 0 + } else { + // Cut off part of the lookbehind buffer that has + // been processed and append the entire haystack + // into it. + const bytesToCutOff = this._lookbehind_size + pos + if (bytesToCutOff > 0) { + // The cut off data is guaranteed not to contain the needle. + this.emit('info', false, this._lookbehind, 0, bytesToCutOff) + } + + this._lookbehind.copy(this._lookbehind, 0, bytesToCutOff, + this._lookbehind_size - bytesToCutOff) + this._lookbehind_size -= bytesToCutOff + + data.copy(this._lookbehind, this._lookbehind_size) + this._lookbehind_size += len + + this._bufpos = len + return len + } + } + + pos += (pos >= 0) * this._bufpos + + // Lookbehind buffer is now empty. We only need to check if the + // needle is in the haystack. + if (data.indexOf(needle, pos) !== -1) { + pos = data.indexOf(needle, pos) + ++this.matches + if (pos > 0) { this.emit('info', true, data, this._bufpos, pos) } else { this.emit('info', true) } + + return (this._bufpos = pos + needleLength) + } else { + pos = len - needleLength + } + + // There was no match. If there's trailing haystack data that we cannot + // match yet using the Boyer-Moore-Horspool algorithm (because the trailing + // data is less than the needle size) then match using a modified + // algorithm that starts matching from the beginning instead of the end. + // Whatever trailing data is left after running this algorithm is added to + // the lookbehind buffer. + while ( + pos < len && + ( + data[pos] !== needle[0] || + ( + (Buffer.compare( + data.subarray(pos, pos + len - pos), + needle.subarray(0, len - pos) + ) !== 0) + ) + ) + ) { + ++pos + } + if (pos < len) { + data.copy(this._lookbehind, 0, pos, pos + (len - pos)) + this._lookbehind_size = len - pos + } + + // Everything until pos is guaranteed not to contain needle data. + if (pos > 0) { this.emit('info', false, data, this._bufpos, pos < len ? pos : len) } + + this._bufpos = len + return len +} + +SBMH.prototype._sbmh_lookup_char = function (data, pos) { + return (pos < 0) + ? this._lookbehind[this._lookbehind_size + pos] + : data[pos] +} + +SBMH.prototype._sbmh_memcmp = function (data, pos, len) { + for (var i = 0; i < len; ++i) { // eslint-disable-line no-var + if (this._sbmh_lookup_char(data, pos + i) !== this._needle[i]) { return false } + } + return true +} + +module.exports = SBMH diff --git a/node_modules/@fastify/busboy/lib/main.d.ts b/node_modules/@fastify/busboy/lib/main.d.ts new file mode 100644 index 0000000..91b6448 --- /dev/null +++ b/node_modules/@fastify/busboy/lib/main.d.ts @@ -0,0 +1,196 @@ +// Definitions by: Jacob Baskin +// BendingBender +// Igor Savin + +/// + +import * as http from 'http'; +import { Readable, Writable } from 'stream'; +export { Dicer } from "../deps/dicer/lib/dicer"; + +export const Busboy: BusboyConstructor; +export default Busboy; + +export interface BusboyConfig { + /** + * These are the HTTP headers of the incoming request, which are used by individual parsers. + */ + headers: BusboyHeaders; + /** + * `highWaterMark` to use for this Busboy instance. + * @default WritableStream default. + */ + highWaterMark?: number | undefined; + /** + * highWaterMark to use for file streams. + * @default ReadableStream default. + */ + fileHwm?: number | undefined; + /** + * Default character set to use when one isn't defined. + * @default 'utf8' + */ + defCharset?: string | undefined; + /** + * Detect if a Part is a file. + * + * By default a file is detected if contentType + * is application/octet-stream or fileName is not + * undefined. + * + * Modify this to handle e.g. Blobs. + */ + isPartAFile?: (fieldName: string | undefined, contentType: string | undefined, fileName: string | undefined) => boolean; + /** + * If paths in the multipart 'filename' field shall be preserved. + * @default false + */ + preservePath?: boolean | undefined; + /** + * Various limits on incoming data. + */ + limits?: + | { + /** + * Max field name size (in bytes) + * @default 100 bytes + */ + fieldNameSize?: number | undefined; + /** + * Max field value size (in bytes) + * @default 1MB + */ + fieldSize?: number | undefined; + /** + * Max number of non-file fields + * @default Infinity + */ + fields?: number | undefined; + /** + * For multipart forms, the max file size (in bytes) + * @default Infinity + */ + fileSize?: number | undefined; + /** + * For multipart forms, the max number of file fields + * @default Infinity + */ + files?: number | undefined; + /** + * For multipart forms, the max number of parts (fields + files) + * @default Infinity + */ + parts?: number | undefined; + /** + * For multipart forms, the max number of header key=>value pairs to parse + * @default 2000 + */ + headerPairs?: number | undefined; + + /** + * For multipart forms, the max size of a header part + * @default 81920 + */ + headerSize?: number | undefined; + } + | undefined; +} + +export type BusboyHeaders = { 'content-type': string } & http.IncomingHttpHeaders; + +export interface BusboyFileStream extends + Readable { + + truncated: boolean; + + /** + * The number of bytes that have been read so far. + */ + bytesRead: number; +} + +export interface Busboy extends Writable { + addListener(event: Event, listener: BusboyEvents[Event]): this; + + addListener(event: string | symbol, listener: (...args: any[]) => void): this; + + on(event: Event, listener: BusboyEvents[Event]): this; + + on(event: string | symbol, listener: (...args: any[]) => void): this; + + once(event: Event, listener: BusboyEvents[Event]): this; + + once(event: string | symbol, listener: (...args: any[]) => void): this; + + removeListener(event: Event, listener: BusboyEvents[Event]): this; + + removeListener(event: string | symbol, listener: (...args: any[]) => void): this; + + off(event: Event, listener: BusboyEvents[Event]): this; + + off(event: string | symbol, listener: (...args: any[]) => void): this; + + prependListener(event: Event, listener: BusboyEvents[Event]): this; + + prependListener(event: string | symbol, listener: (...args: any[]) => void): this; + + prependOnceListener(event: Event, listener: BusboyEvents[Event]): this; + + prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; +} + +export interface BusboyEvents { + /** + * Emitted for each new file form field found. + * + * * Note: if you listen for this event, you should always handle the `stream` no matter if you care about the + * file contents or not (e.g. you can simply just do `stream.resume();` if you want to discard the contents), + * otherwise the 'finish' event will never fire on the Busboy instance. However, if you don't care about **any** + * incoming files, you can simply not listen for the 'file' event at all and any/all files will be automatically + * and safely discarded (these discarded files do still count towards `files` and `parts` limits). + * * If a configured file size limit was reached, `stream` will both have a boolean property `truncated` + * (best checked at the end of the stream) and emit a 'limit' event to notify you when this happens. + * + * @param listener.transferEncoding Contains the 'Content-Transfer-Encoding' value for the file stream. + * @param listener.mimeType Contains the 'Content-Type' value for the file stream. + */ + file: ( + fieldname: string, + stream: BusboyFileStream, + filename: string, + transferEncoding: string, + mimeType: string, + ) => void; + /** + * Emitted for each new non-file field found. + */ + field: ( + fieldname: string, + value: string, + fieldnameTruncated: boolean, + valueTruncated: boolean, + transferEncoding: string, + mimeType: string, + ) => void; + finish: () => void; + /** + * Emitted when specified `parts` limit has been reached. No more 'file' or 'field' events will be emitted. + */ + partsLimit: () => void; + /** + * Emitted when specified `files` limit has been reached. No more 'file' events will be emitted. + */ + filesLimit: () => void; + /** + * Emitted when specified `fields` limit has been reached. No more 'field' events will be emitted. + */ + fieldsLimit: () => void; + error: (error: unknown) => void; +} + +export interface BusboyConstructor { + (options: BusboyConfig): Busboy; + + new(options: BusboyConfig): Busboy; +} + diff --git a/node_modules/@fastify/busboy/lib/main.js b/node_modules/@fastify/busboy/lib/main.js new file mode 100644 index 0000000..8794beb --- /dev/null +++ b/node_modules/@fastify/busboy/lib/main.js @@ -0,0 +1,85 @@ +'use strict' + +const WritableStream = require('node:stream').Writable +const { inherits } = require('node:util') +const Dicer = require('../deps/dicer/lib/Dicer') + +const MultipartParser = require('./types/multipart') +const UrlencodedParser = require('./types/urlencoded') +const parseParams = require('./utils/parseParams') + +function Busboy (opts) { + if (!(this instanceof Busboy)) { return new Busboy(opts) } + + if (typeof opts !== 'object') { + throw new TypeError('Busboy expected an options-Object.') + } + if (typeof opts.headers !== 'object') { + throw new TypeError('Busboy expected an options-Object with headers-attribute.') + } + if (typeof opts.headers['content-type'] !== 'string') { + throw new TypeError('Missing Content-Type-header.') + } + + const { + headers, + ...streamOptions + } = opts + + this.opts = { + autoDestroy: false, + ...streamOptions + } + WritableStream.call(this, this.opts) + + this._done = false + this._parser = this.getParserByHeaders(headers) + this._finished = false +} +inherits(Busboy, WritableStream) + +Busboy.prototype.emit = function (ev) { + if (ev === 'finish') { + if (!this._done) { + this._parser?.end() + return + } else if (this._finished) { + return + } + this._finished = true + } + WritableStream.prototype.emit.apply(this, arguments) +} + +Busboy.prototype.getParserByHeaders = function (headers) { + const parsed = parseParams(headers['content-type']) + + const cfg = { + defCharset: this.opts.defCharset, + fileHwm: this.opts.fileHwm, + headers, + highWaterMark: this.opts.highWaterMark, + isPartAFile: this.opts.isPartAFile, + limits: this.opts.limits, + parsedConType: parsed, + preservePath: this.opts.preservePath + } + + if (MultipartParser.detect.test(parsed[0])) { + return new MultipartParser(this, cfg) + } + if (UrlencodedParser.detect.test(parsed[0])) { + return new UrlencodedParser(this, cfg) + } + throw new Error('Unsupported Content-Type.') +} + +Busboy.prototype._write = function (chunk, encoding, cb) { + this._parser.write(chunk, cb) +} + +module.exports = Busboy +module.exports.default = Busboy +module.exports.Busboy = Busboy + +module.exports.Dicer = Dicer diff --git a/node_modules/@fastify/busboy/lib/types/multipart.js b/node_modules/@fastify/busboy/lib/types/multipart.js new file mode 100644 index 0000000..d691eca --- /dev/null +++ b/node_modules/@fastify/busboy/lib/types/multipart.js @@ -0,0 +1,306 @@ +'use strict' + +// TODO: +// * support 1 nested multipart level +// (see second multipart example here: +// http://www.w3.org/TR/html401/interact/forms.html#didx-multipartform-data) +// * support limits.fieldNameSize +// -- this will require modifications to utils.parseParams + +const { Readable } = require('node:stream') +const { inherits } = require('node:util') + +const Dicer = require('../../deps/dicer/lib/Dicer') + +const parseParams = require('../utils/parseParams') +const decodeText = require('../utils/decodeText') +const basename = require('../utils/basename') +const getLimit = require('../utils/getLimit') + +const RE_BOUNDARY = /^boundary$/i +const RE_FIELD = /^form-data$/i +const RE_CHARSET = /^charset$/i +const RE_FILENAME = /^filename$/i +const RE_NAME = /^name$/i + +Multipart.detect = /^multipart\/form-data/i +function Multipart (boy, cfg) { + let i + let len + const self = this + let boundary + const limits = cfg.limits + const isPartAFile = cfg.isPartAFile || ((fieldName, contentType, fileName) => (contentType === 'application/octet-stream' || fileName !== undefined)) + const parsedConType = cfg.parsedConType || [] + const defCharset = cfg.defCharset || 'utf8' + const preservePath = cfg.preservePath + const fileOpts = { highWaterMark: cfg.fileHwm } + + for (i = 0, len = parsedConType.length; i < len; ++i) { + if (Array.isArray(parsedConType[i]) && + RE_BOUNDARY.test(parsedConType[i][0])) { + boundary = parsedConType[i][1] + break + } + } + + function checkFinished () { + if (nends === 0 && finished && !boy._done) { + finished = false + self.end() + } + } + + if (typeof boundary !== 'string') { throw new Error('Multipart: Boundary not found') } + + const fieldSizeLimit = getLimit(limits, 'fieldSize', 1 * 1024 * 1024) + const fileSizeLimit = getLimit(limits, 'fileSize', Infinity) + const filesLimit = getLimit(limits, 'files', Infinity) + const fieldsLimit = getLimit(limits, 'fields', Infinity) + const partsLimit = getLimit(limits, 'parts', Infinity) + const headerPairsLimit = getLimit(limits, 'headerPairs', 2000) + const headerSizeLimit = getLimit(limits, 'headerSize', 80 * 1024) + + let nfiles = 0 + let nfields = 0 + let nends = 0 + let curFile + let curField + let finished = false + + this._needDrain = false + this._pause = false + this._cb = undefined + this._nparts = 0 + this._boy = boy + + const parserCfg = { + boundary, + maxHeaderPairs: headerPairsLimit, + maxHeaderSize: headerSizeLimit, + partHwm: fileOpts.highWaterMark, + highWaterMark: cfg.highWaterMark + } + + this.parser = new Dicer(parserCfg) + this.parser.on('drain', function () { + self._needDrain = false + if (self._cb && !self._pause) { + const cb = self._cb + self._cb = undefined + cb() + } + }).on('part', function onPart (part) { + if (++self._nparts > partsLimit) { + self.parser.removeListener('part', onPart) + self.parser.on('part', skipPart) + boy.hitPartsLimit = true + boy.emit('partsLimit') + return skipPart(part) + } + + // hack because streams2 _always_ doesn't emit 'end' until nextTick, so let + // us emit 'end' early since we know the part has ended if we are already + // seeing the next part + if (curField) { + const field = curField + field.emit('end') + field.removeAllListeners('end') + } + + part.on('header', function (header) { + let contype + let fieldname + let parsed + let charset + let encoding + let filename + let nsize = 0 + + if (header['content-type']) { + parsed = parseParams(header['content-type'][0]) + if (parsed[0]) { + contype = parsed[0].toLowerCase() + for (i = 0, len = parsed.length; i < len; ++i) { + if (RE_CHARSET.test(parsed[i][0])) { + charset = parsed[i][1].toLowerCase() + break + } + } + } + } + + if (contype === undefined) { contype = 'text/plain' } + if (charset === undefined) { charset = defCharset } + + if (header['content-disposition']) { + parsed = parseParams(header['content-disposition'][0]) + if (!RE_FIELD.test(parsed[0])) { return skipPart(part) } + for (i = 0, len = parsed.length; i < len; ++i) { + if (RE_NAME.test(parsed[i][0])) { + fieldname = parsed[i][1] + } else if (RE_FILENAME.test(parsed[i][0])) { + filename = parsed[i][1] + if (!preservePath) { filename = basename(filename) } + } + } + } else { return skipPart(part) } + + if (header['content-transfer-encoding']) { encoding = header['content-transfer-encoding'][0].toLowerCase() } else { encoding = '7bit' } + + let onData, + onEnd + + if (isPartAFile(fieldname, contype, filename)) { + // file/binary field + if (nfiles === filesLimit) { + if (!boy.hitFilesLimit) { + boy.hitFilesLimit = true + boy.emit('filesLimit') + } + return skipPart(part) + } + + ++nfiles + + if (boy.listenerCount('file') === 0) { + self.parser._ignore() + return + } + + ++nends + const file = new FileStream(fileOpts) + curFile = file + file.on('end', function () { + --nends + self._pause = false + checkFinished() + if (self._cb && !self._needDrain) { + const cb = self._cb + self._cb = undefined + cb() + } + }) + file._read = function (n) { + if (!self._pause) { return } + self._pause = false + if (self._cb && !self._needDrain) { + const cb = self._cb + self._cb = undefined + cb() + } + } + boy.emit('file', fieldname, file, filename, encoding, contype) + + onData = function (data) { + if ((nsize += data.length) > fileSizeLimit) { + const extralen = fileSizeLimit - nsize + data.length + if (extralen > 0) { file.push(data.slice(0, extralen)) } + file.truncated = true + file.bytesRead = fileSizeLimit + part.removeAllListeners('data') + file.emit('limit') + return + } else if (!file.push(data)) { self._pause = true } + + file.bytesRead = nsize + } + + onEnd = function () { + curFile = undefined + file.push(null) + } + } else { + // non-file field + if (nfields === fieldsLimit) { + if (!boy.hitFieldsLimit) { + boy.hitFieldsLimit = true + boy.emit('fieldsLimit') + } + return skipPart(part) + } + + ++nfields + ++nends + let buffer = '' + let truncated = false + curField = part + + onData = function (data) { + if ((nsize += data.length) > fieldSizeLimit) { + const extralen = (fieldSizeLimit - (nsize - data.length)) + buffer += data.toString('binary', 0, extralen) + truncated = true + part.removeAllListeners('data') + } else { buffer += data.toString('binary') } + } + + onEnd = function () { + curField = undefined + if (buffer.length) { buffer = decodeText(buffer, 'binary', charset) } + boy.emit('field', fieldname, buffer, false, truncated, encoding, contype) + --nends + checkFinished() + } + } + + /* As of node@2efe4ab761666 (v0.10.29+/v0.11.14+), busboy had become + broken. Streams2/streams3 is a huge black box of confusion, but + somehow overriding the sync state seems to fix things again (and still + seems to work for previous node versions). + */ + part._readableState.sync = false + + part.on('data', onData) + part.on('end', onEnd) + }).on('error', function (err) { + if (curFile) { curFile.emit('error', err) } + }) + }).on('error', function (err) { + boy.emit('error', err) + }).on('finish', function () { + finished = true + checkFinished() + }) +} + +Multipart.prototype.write = function (chunk, cb) { + const r = this.parser.write(chunk) + if (r && !this._pause) { + cb() + } else { + this._needDrain = !r + this._cb = cb + } +} + +Multipart.prototype.end = function () { + const self = this + + if (self.parser.writable) { + self.parser.end() + } else if (!self._boy._done) { + process.nextTick(function () { + self._boy._done = true + self._boy.emit('finish') + }) + } +} + +function skipPart (part) { + part.resume() +} + +function FileStream (opts) { + Readable.call(this, opts) + + this.bytesRead = 0 + + this.truncated = false +} + +inherits(FileStream, Readable) + +FileStream.prototype._read = function (n) {} + +module.exports = Multipart diff --git a/node_modules/@fastify/busboy/lib/types/urlencoded.js b/node_modules/@fastify/busboy/lib/types/urlencoded.js new file mode 100644 index 0000000..6f5f784 --- /dev/null +++ b/node_modules/@fastify/busboy/lib/types/urlencoded.js @@ -0,0 +1,190 @@ +'use strict' + +const Decoder = require('../utils/Decoder') +const decodeText = require('../utils/decodeText') +const getLimit = require('../utils/getLimit') + +const RE_CHARSET = /^charset$/i + +UrlEncoded.detect = /^application\/x-www-form-urlencoded/i +function UrlEncoded (boy, cfg) { + const limits = cfg.limits + const parsedConType = cfg.parsedConType + this.boy = boy + + this.fieldSizeLimit = getLimit(limits, 'fieldSize', 1 * 1024 * 1024) + this.fieldNameSizeLimit = getLimit(limits, 'fieldNameSize', 100) + this.fieldsLimit = getLimit(limits, 'fields', Infinity) + + let charset + for (var i = 0, len = parsedConType.length; i < len; ++i) { // eslint-disable-line no-var + if (Array.isArray(parsedConType[i]) && + RE_CHARSET.test(parsedConType[i][0])) { + charset = parsedConType[i][1].toLowerCase() + break + } + } + + if (charset === undefined) { charset = cfg.defCharset || 'utf8' } + + this.decoder = new Decoder() + this.charset = charset + this._fields = 0 + this._state = 'key' + this._checkingBytes = true + this._bytesKey = 0 + this._bytesVal = 0 + this._key = '' + this._val = '' + this._keyTrunc = false + this._valTrunc = false + this._hitLimit = false +} + +UrlEncoded.prototype.write = function (data, cb) { + if (this._fields === this.fieldsLimit) { + if (!this.boy.hitFieldsLimit) { + this.boy.hitFieldsLimit = true + this.boy.emit('fieldsLimit') + } + return cb() + } + + let idxeq; let idxamp; let i; let p = 0; const len = data.length + + while (p < len) { + if (this._state === 'key') { + idxeq = idxamp = undefined + for (i = p; i < len; ++i) { + if (!this._checkingBytes) { ++p } + if (data[i] === 0x3D/* = */) { + idxeq = i + break + } else if (data[i] === 0x26/* & */) { + idxamp = i + break + } + if (this._checkingBytes && this._bytesKey === this.fieldNameSizeLimit) { + this._hitLimit = true + break + } else if (this._checkingBytes) { ++this._bytesKey } + } + + if (idxeq !== undefined) { + // key with assignment + if (idxeq > p) { this._key += this.decoder.write(data.toString('binary', p, idxeq)) } + this._state = 'val' + + this._hitLimit = false + this._checkingBytes = true + this._val = '' + this._bytesVal = 0 + this._valTrunc = false + this.decoder.reset() + + p = idxeq + 1 + } else if (idxamp !== undefined) { + // key with no assignment + ++this._fields + let key; const keyTrunc = this._keyTrunc + if (idxamp > p) { key = (this._key += this.decoder.write(data.toString('binary', p, idxamp))) } else { key = this._key } + + this._hitLimit = false + this._checkingBytes = true + this._key = '' + this._bytesKey = 0 + this._keyTrunc = false + this.decoder.reset() + + if (key.length) { + this.boy.emit('field', decodeText(key, 'binary', this.charset), + '', + keyTrunc, + false) + } + + p = idxamp + 1 + if (this._fields === this.fieldsLimit) { return cb() } + } else if (this._hitLimit) { + // we may not have hit the actual limit if there are encoded bytes... + if (i > p) { this._key += this.decoder.write(data.toString('binary', p, i)) } + p = i + if ((this._bytesKey = this._key.length) === this.fieldNameSizeLimit) { + // yep, we actually did hit the limit + this._checkingBytes = false + this._keyTrunc = true + } + } else { + if (p < len) { this._key += this.decoder.write(data.toString('binary', p)) } + p = len + } + } else { + idxamp = undefined + for (i = p; i < len; ++i) { + if (!this._checkingBytes) { ++p } + if (data[i] === 0x26/* & */) { + idxamp = i + break + } + if (this._checkingBytes && this._bytesVal === this.fieldSizeLimit) { + this._hitLimit = true + break + } else if (this._checkingBytes) { ++this._bytesVal } + } + + if (idxamp !== undefined) { + ++this._fields + if (idxamp > p) { this._val += this.decoder.write(data.toString('binary', p, idxamp)) } + this.boy.emit('field', decodeText(this._key, 'binary', this.charset), + decodeText(this._val, 'binary', this.charset), + this._keyTrunc, + this._valTrunc) + this._state = 'key' + + this._hitLimit = false + this._checkingBytes = true + this._key = '' + this._bytesKey = 0 + this._keyTrunc = false + this.decoder.reset() + + p = idxamp + 1 + if (this._fields === this.fieldsLimit) { return cb() } + } else if (this._hitLimit) { + // we may not have hit the actual limit if there are encoded bytes... + if (i > p) { this._val += this.decoder.write(data.toString('binary', p, i)) } + p = i + if ((this._val === '' && this.fieldSizeLimit === 0) || + (this._bytesVal = this._val.length) === this.fieldSizeLimit) { + // yep, we actually did hit the limit + this._checkingBytes = false + this._valTrunc = true + } + } else { + if (p < len) { this._val += this.decoder.write(data.toString('binary', p)) } + p = len + } + } + } + cb() +} + +UrlEncoded.prototype.end = function () { + if (this.boy._done) { return } + + if (this._state === 'key' && this._key.length > 0) { + this.boy.emit('field', decodeText(this._key, 'binary', this.charset), + '', + this._keyTrunc, + false) + } else if (this._state === 'val') { + this.boy.emit('field', decodeText(this._key, 'binary', this.charset), + decodeText(this._val, 'binary', this.charset), + this._keyTrunc, + this._valTrunc) + } + this.boy._done = true + this.boy.emit('finish') +} + +module.exports = UrlEncoded diff --git a/node_modules/@fastify/busboy/lib/utils/Decoder.js b/node_modules/@fastify/busboy/lib/utils/Decoder.js new file mode 100644 index 0000000..7917678 --- /dev/null +++ b/node_modules/@fastify/busboy/lib/utils/Decoder.js @@ -0,0 +1,54 @@ +'use strict' + +const RE_PLUS = /\+/g + +const HEX = [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +] + +function Decoder () { + this.buffer = undefined +} +Decoder.prototype.write = function (str) { + // Replace '+' with ' ' before decoding + str = str.replace(RE_PLUS, ' ') + let res = '' + let i = 0; let p = 0; const len = str.length + for (; i < len; ++i) { + if (this.buffer !== undefined) { + if (!HEX[str.charCodeAt(i)]) { + res += '%' + this.buffer + this.buffer = undefined + --i // retry character + } else { + this.buffer += str[i] + ++p + if (this.buffer.length === 2) { + res += String.fromCharCode(parseInt(this.buffer, 16)) + this.buffer = undefined + } + } + } else if (str[i] === '%') { + if (i > p) { + res += str.substring(p, i) + p = i + } + this.buffer = '' + ++p + } + } + if (p < len && this.buffer === undefined) { res += str.substring(p) } + return res +} +Decoder.prototype.reset = function () { + this.buffer = undefined +} + +module.exports = Decoder diff --git a/node_modules/@fastify/busboy/lib/utils/basename.js b/node_modules/@fastify/busboy/lib/utils/basename.js new file mode 100644 index 0000000..db58819 --- /dev/null +++ b/node_modules/@fastify/busboy/lib/utils/basename.js @@ -0,0 +1,14 @@ +'use strict' + +module.exports = function basename (path) { + if (typeof path !== 'string') { return '' } + for (var i = path.length - 1; i >= 0; --i) { // eslint-disable-line no-var + switch (path.charCodeAt(i)) { + case 0x2F: // '/' + case 0x5C: // '\' + path = path.slice(i + 1) + return (path === '..' || path === '.' ? '' : path) + } + } + return (path === '..' || path === '.' ? '' : path) +} diff --git a/node_modules/@fastify/busboy/lib/utils/decodeText.js b/node_modules/@fastify/busboy/lib/utils/decodeText.js new file mode 100644 index 0000000..eac7d35 --- /dev/null +++ b/node_modules/@fastify/busboy/lib/utils/decodeText.js @@ -0,0 +1,114 @@ +'use strict' + +// Node has always utf-8 +const utf8Decoder = new TextDecoder('utf-8') +const textDecoders = new Map([ + ['utf-8', utf8Decoder], + ['utf8', utf8Decoder] +]) + +function getDecoder (charset) { + let lc + while (true) { + switch (charset) { + case 'utf-8': + case 'utf8': + return decoders.utf8 + case 'latin1': + case 'ascii': // TODO: Make these a separate, strict decoder? + case 'us-ascii': + case 'iso-8859-1': + case 'iso8859-1': + case 'iso88591': + case 'iso_8859-1': + case 'windows-1252': + case 'iso_8859-1:1987': + case 'cp1252': + case 'x-cp1252': + return decoders.latin1 + case 'utf16le': + case 'utf-16le': + case 'ucs2': + case 'ucs-2': + return decoders.utf16le + case 'base64': + return decoders.base64 + default: + if (lc === undefined) { + lc = true + charset = charset.toLowerCase() + continue + } + return decoders.other.bind(charset) + } + } +} + +const decoders = { + utf8: (data, sourceEncoding) => { + if (data.length === 0) { + return '' + } + if (typeof data === 'string') { + data = Buffer.from(data, sourceEncoding) + } + return data.utf8Slice(0, data.length) + }, + + latin1: (data, sourceEncoding) => { + if (data.length === 0) { + return '' + } + if (typeof data === 'string') { + return data + } + return data.latin1Slice(0, data.length) + }, + + utf16le: (data, sourceEncoding) => { + if (data.length === 0) { + return '' + } + if (typeof data === 'string') { + data = Buffer.from(data, sourceEncoding) + } + return data.ucs2Slice(0, data.length) + }, + + base64: (data, sourceEncoding) => { + if (data.length === 0) { + return '' + } + if (typeof data === 'string') { + data = Buffer.from(data, sourceEncoding) + } + return data.base64Slice(0, data.length) + }, + + other: (data, sourceEncoding) => { + if (data.length === 0) { + return '' + } + if (typeof data === 'string') { + data = Buffer.from(data, sourceEncoding) + } + + if (textDecoders.has(this.toString())) { + try { + return textDecoders.get(this).decode(data) + } catch {} + } + return typeof data === 'string' + ? data + : data.toString() + } +} + +function decodeText (text, sourceEncoding, destEncoding) { + if (text) { + return getDecoder(destEncoding)(text, sourceEncoding) + } + return text +} + +module.exports = decodeText diff --git a/node_modules/@fastify/busboy/lib/utils/getLimit.js b/node_modules/@fastify/busboy/lib/utils/getLimit.js new file mode 100644 index 0000000..cb64fd6 --- /dev/null +++ b/node_modules/@fastify/busboy/lib/utils/getLimit.js @@ -0,0 +1,16 @@ +'use strict' + +module.exports = function getLimit (limits, name, defaultLimit) { + if ( + !limits || + limits[name] === undefined || + limits[name] === null + ) { return defaultLimit } + + if ( + typeof limits[name] !== 'number' || + isNaN(limits[name]) + ) { throw new TypeError('Limit ' + name + ' is not a valid number') } + + return limits[name] +} diff --git a/node_modules/@fastify/busboy/lib/utils/parseParams.js b/node_modules/@fastify/busboy/lib/utils/parseParams.js new file mode 100644 index 0000000..1698e62 --- /dev/null +++ b/node_modules/@fastify/busboy/lib/utils/parseParams.js @@ -0,0 +1,196 @@ +/* eslint-disable object-property-newline */ +'use strict' + +const decodeText = require('./decodeText') + +const RE_ENCODED = /%[a-fA-F0-9][a-fA-F0-9]/g + +const EncodedLookup = { + '%00': '\x00', '%01': '\x01', '%02': '\x02', '%03': '\x03', '%04': '\x04', + '%05': '\x05', '%06': '\x06', '%07': '\x07', '%08': '\x08', '%09': '\x09', + '%0a': '\x0a', '%0A': '\x0a', '%0b': '\x0b', '%0B': '\x0b', '%0c': '\x0c', + '%0C': '\x0c', '%0d': '\x0d', '%0D': '\x0d', '%0e': '\x0e', '%0E': '\x0e', + '%0f': '\x0f', '%0F': '\x0f', '%10': '\x10', '%11': '\x11', '%12': '\x12', + '%13': '\x13', '%14': '\x14', '%15': '\x15', '%16': '\x16', '%17': '\x17', + '%18': '\x18', '%19': '\x19', '%1a': '\x1a', '%1A': '\x1a', '%1b': '\x1b', + '%1B': '\x1b', '%1c': '\x1c', '%1C': '\x1c', '%1d': '\x1d', '%1D': '\x1d', + '%1e': '\x1e', '%1E': '\x1e', '%1f': '\x1f', '%1F': '\x1f', '%20': '\x20', + '%21': '\x21', '%22': '\x22', '%23': '\x23', '%24': '\x24', '%25': '\x25', + '%26': '\x26', '%27': '\x27', '%28': '\x28', '%29': '\x29', '%2a': '\x2a', + '%2A': '\x2a', '%2b': '\x2b', '%2B': '\x2b', '%2c': '\x2c', '%2C': '\x2c', + '%2d': '\x2d', '%2D': '\x2d', '%2e': '\x2e', '%2E': '\x2e', '%2f': '\x2f', + '%2F': '\x2f', '%30': '\x30', '%31': '\x31', '%32': '\x32', '%33': '\x33', + '%34': '\x34', '%35': '\x35', '%36': '\x36', '%37': '\x37', '%38': '\x38', + '%39': '\x39', '%3a': '\x3a', '%3A': '\x3a', '%3b': '\x3b', '%3B': '\x3b', + '%3c': '\x3c', '%3C': '\x3c', '%3d': '\x3d', '%3D': '\x3d', '%3e': '\x3e', + '%3E': '\x3e', '%3f': '\x3f', '%3F': '\x3f', '%40': '\x40', '%41': '\x41', + '%42': '\x42', '%43': '\x43', '%44': '\x44', '%45': '\x45', '%46': '\x46', + '%47': '\x47', '%48': '\x48', '%49': '\x49', '%4a': '\x4a', '%4A': '\x4a', + '%4b': '\x4b', '%4B': '\x4b', '%4c': '\x4c', '%4C': '\x4c', '%4d': '\x4d', + '%4D': '\x4d', '%4e': '\x4e', '%4E': '\x4e', '%4f': '\x4f', '%4F': '\x4f', + '%50': '\x50', '%51': '\x51', '%52': '\x52', '%53': '\x53', '%54': '\x54', + '%55': '\x55', '%56': '\x56', '%57': '\x57', '%58': '\x58', '%59': '\x59', + '%5a': '\x5a', '%5A': '\x5a', '%5b': '\x5b', '%5B': '\x5b', '%5c': '\x5c', + '%5C': '\x5c', '%5d': '\x5d', '%5D': '\x5d', '%5e': '\x5e', '%5E': '\x5e', + '%5f': '\x5f', '%5F': '\x5f', '%60': '\x60', '%61': '\x61', '%62': '\x62', + '%63': '\x63', '%64': '\x64', '%65': '\x65', '%66': '\x66', '%67': '\x67', + '%68': '\x68', '%69': '\x69', '%6a': '\x6a', '%6A': '\x6a', '%6b': '\x6b', + '%6B': '\x6b', '%6c': '\x6c', '%6C': '\x6c', '%6d': '\x6d', '%6D': '\x6d', + '%6e': '\x6e', '%6E': '\x6e', '%6f': '\x6f', '%6F': '\x6f', '%70': '\x70', + '%71': '\x71', '%72': '\x72', '%73': '\x73', '%74': '\x74', '%75': '\x75', + '%76': '\x76', '%77': '\x77', '%78': '\x78', '%79': '\x79', '%7a': '\x7a', + '%7A': '\x7a', '%7b': '\x7b', '%7B': '\x7b', '%7c': '\x7c', '%7C': '\x7c', + '%7d': '\x7d', '%7D': '\x7d', '%7e': '\x7e', '%7E': '\x7e', '%7f': '\x7f', + '%7F': '\x7f', '%80': '\x80', '%81': '\x81', '%82': '\x82', '%83': '\x83', + '%84': '\x84', '%85': '\x85', '%86': '\x86', '%87': '\x87', '%88': '\x88', + '%89': '\x89', '%8a': '\x8a', '%8A': '\x8a', '%8b': '\x8b', '%8B': '\x8b', + '%8c': '\x8c', '%8C': '\x8c', '%8d': '\x8d', '%8D': '\x8d', '%8e': '\x8e', + '%8E': '\x8e', '%8f': '\x8f', '%8F': '\x8f', '%90': '\x90', '%91': '\x91', + '%92': '\x92', '%93': '\x93', '%94': '\x94', '%95': '\x95', '%96': '\x96', + '%97': '\x97', '%98': '\x98', '%99': '\x99', '%9a': '\x9a', '%9A': '\x9a', + '%9b': '\x9b', '%9B': '\x9b', '%9c': '\x9c', '%9C': '\x9c', '%9d': '\x9d', + '%9D': '\x9d', '%9e': '\x9e', '%9E': '\x9e', '%9f': '\x9f', '%9F': '\x9f', + '%a0': '\xa0', '%A0': '\xa0', '%a1': '\xa1', '%A1': '\xa1', '%a2': '\xa2', + '%A2': '\xa2', '%a3': '\xa3', '%A3': '\xa3', '%a4': '\xa4', '%A4': '\xa4', + '%a5': '\xa5', '%A5': '\xa5', '%a6': '\xa6', '%A6': '\xa6', '%a7': '\xa7', + '%A7': '\xa7', '%a8': '\xa8', '%A8': '\xa8', '%a9': '\xa9', '%A9': '\xa9', + '%aa': '\xaa', '%Aa': '\xaa', '%aA': '\xaa', '%AA': '\xaa', '%ab': '\xab', + '%Ab': '\xab', '%aB': '\xab', '%AB': '\xab', '%ac': '\xac', '%Ac': '\xac', + '%aC': '\xac', '%AC': '\xac', '%ad': '\xad', '%Ad': '\xad', '%aD': '\xad', + '%AD': '\xad', '%ae': '\xae', '%Ae': '\xae', '%aE': '\xae', '%AE': '\xae', + '%af': '\xaf', '%Af': '\xaf', '%aF': '\xaf', '%AF': '\xaf', '%b0': '\xb0', + '%B0': '\xb0', '%b1': '\xb1', '%B1': '\xb1', '%b2': '\xb2', '%B2': '\xb2', + '%b3': '\xb3', '%B3': '\xb3', '%b4': '\xb4', '%B4': '\xb4', '%b5': '\xb5', + '%B5': '\xb5', '%b6': '\xb6', '%B6': '\xb6', '%b7': '\xb7', '%B7': '\xb7', + '%b8': '\xb8', '%B8': '\xb8', '%b9': '\xb9', '%B9': '\xb9', '%ba': '\xba', + '%Ba': '\xba', '%bA': '\xba', '%BA': '\xba', '%bb': '\xbb', '%Bb': '\xbb', + '%bB': '\xbb', '%BB': '\xbb', '%bc': '\xbc', '%Bc': '\xbc', '%bC': '\xbc', + '%BC': '\xbc', '%bd': '\xbd', '%Bd': '\xbd', '%bD': '\xbd', '%BD': '\xbd', + '%be': '\xbe', '%Be': '\xbe', '%bE': '\xbe', '%BE': '\xbe', '%bf': '\xbf', + '%Bf': '\xbf', '%bF': '\xbf', '%BF': '\xbf', '%c0': '\xc0', '%C0': '\xc0', + '%c1': '\xc1', '%C1': '\xc1', '%c2': '\xc2', '%C2': '\xc2', '%c3': '\xc3', + '%C3': '\xc3', '%c4': '\xc4', '%C4': '\xc4', '%c5': '\xc5', '%C5': '\xc5', + '%c6': '\xc6', '%C6': '\xc6', '%c7': '\xc7', '%C7': '\xc7', '%c8': '\xc8', + '%C8': '\xc8', '%c9': '\xc9', '%C9': '\xc9', '%ca': '\xca', '%Ca': '\xca', + '%cA': '\xca', '%CA': '\xca', '%cb': '\xcb', '%Cb': '\xcb', '%cB': '\xcb', + '%CB': '\xcb', '%cc': '\xcc', '%Cc': '\xcc', '%cC': '\xcc', '%CC': '\xcc', + '%cd': '\xcd', '%Cd': '\xcd', '%cD': '\xcd', '%CD': '\xcd', '%ce': '\xce', + '%Ce': '\xce', '%cE': '\xce', '%CE': '\xce', '%cf': '\xcf', '%Cf': '\xcf', + '%cF': '\xcf', '%CF': '\xcf', '%d0': '\xd0', '%D0': '\xd0', '%d1': '\xd1', + '%D1': '\xd1', '%d2': '\xd2', '%D2': '\xd2', '%d3': '\xd3', '%D3': '\xd3', + '%d4': '\xd4', '%D4': '\xd4', '%d5': '\xd5', '%D5': '\xd5', '%d6': '\xd6', + '%D6': '\xd6', '%d7': '\xd7', '%D7': '\xd7', '%d8': '\xd8', '%D8': '\xd8', + '%d9': '\xd9', '%D9': '\xd9', '%da': '\xda', '%Da': '\xda', '%dA': '\xda', + '%DA': '\xda', '%db': '\xdb', '%Db': '\xdb', '%dB': '\xdb', '%DB': '\xdb', + '%dc': '\xdc', '%Dc': '\xdc', '%dC': '\xdc', '%DC': '\xdc', '%dd': '\xdd', + '%Dd': '\xdd', '%dD': '\xdd', '%DD': '\xdd', '%de': '\xde', '%De': '\xde', + '%dE': '\xde', '%DE': '\xde', '%df': '\xdf', '%Df': '\xdf', '%dF': '\xdf', + '%DF': '\xdf', '%e0': '\xe0', '%E0': '\xe0', '%e1': '\xe1', '%E1': '\xe1', + '%e2': '\xe2', '%E2': '\xe2', '%e3': '\xe3', '%E3': '\xe3', '%e4': '\xe4', + '%E4': '\xe4', '%e5': '\xe5', '%E5': '\xe5', '%e6': '\xe6', '%E6': '\xe6', + '%e7': '\xe7', '%E7': '\xe7', '%e8': '\xe8', '%E8': '\xe8', '%e9': '\xe9', + '%E9': '\xe9', '%ea': '\xea', '%Ea': '\xea', '%eA': '\xea', '%EA': '\xea', + '%eb': '\xeb', '%Eb': '\xeb', '%eB': '\xeb', '%EB': '\xeb', '%ec': '\xec', + '%Ec': '\xec', '%eC': '\xec', '%EC': '\xec', '%ed': '\xed', '%Ed': '\xed', + '%eD': '\xed', '%ED': '\xed', '%ee': '\xee', '%Ee': '\xee', '%eE': '\xee', + '%EE': '\xee', '%ef': '\xef', '%Ef': '\xef', '%eF': '\xef', '%EF': '\xef', + '%f0': '\xf0', '%F0': '\xf0', '%f1': '\xf1', '%F1': '\xf1', '%f2': '\xf2', + '%F2': '\xf2', '%f3': '\xf3', '%F3': '\xf3', '%f4': '\xf4', '%F4': '\xf4', + '%f5': '\xf5', '%F5': '\xf5', '%f6': '\xf6', '%F6': '\xf6', '%f7': '\xf7', + '%F7': '\xf7', '%f8': '\xf8', '%F8': '\xf8', '%f9': '\xf9', '%F9': '\xf9', + '%fa': '\xfa', '%Fa': '\xfa', '%fA': '\xfa', '%FA': '\xfa', '%fb': '\xfb', + '%Fb': '\xfb', '%fB': '\xfb', '%FB': '\xfb', '%fc': '\xfc', '%Fc': '\xfc', + '%fC': '\xfc', '%FC': '\xfc', '%fd': '\xfd', '%Fd': '\xfd', '%fD': '\xfd', + '%FD': '\xfd', '%fe': '\xfe', '%Fe': '\xfe', '%fE': '\xfe', '%FE': '\xfe', + '%ff': '\xff', '%Ff': '\xff', '%fF': '\xff', '%FF': '\xff' +} + +function encodedReplacer (match) { + return EncodedLookup[match] +} + +const STATE_KEY = 0 +const STATE_VALUE = 1 +const STATE_CHARSET = 2 +const STATE_LANG = 3 + +function parseParams (str) { + const res = [] + let state = STATE_KEY + let charset = '' + let inquote = false + let escaping = false + let p = 0 + let tmp = '' + const len = str.length + + for (var i = 0; i < len; ++i) { // eslint-disable-line no-var + const char = str[i] + if (char === '\\' && inquote) { + if (escaping) { escaping = false } else { + escaping = true + continue + } + } else if (char === '"') { + if (!escaping) { + if (inquote) { + inquote = false + state = STATE_KEY + } else { inquote = true } + continue + } else { escaping = false } + } else { + if (escaping && inquote) { tmp += '\\' } + escaping = false + if ((state === STATE_CHARSET || state === STATE_LANG) && char === "'") { + if (state === STATE_CHARSET) { + state = STATE_LANG + charset = tmp.substring(1) + } else { state = STATE_VALUE } + tmp = '' + continue + } else if (state === STATE_KEY && + (char === '*' || char === '=') && + res.length) { + state = char === '*' + ? STATE_CHARSET + : STATE_VALUE + res[p] = [tmp, undefined] + tmp = '' + continue + } else if (!inquote && char === ';') { + state = STATE_KEY + if (charset) { + if (tmp.length) { + tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer), + 'binary', + charset) + } + charset = '' + } else if (tmp.length) { + tmp = decodeText(tmp, 'binary', 'utf8') + } + if (res[p] === undefined) { res[p] = tmp } else { res[p][1] = tmp } + tmp = '' + ++p + continue + } else if (!inquote && (char === ' ' || char === '\t')) { continue } + } + tmp += char + } + if (charset && tmp.length) { + tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer), + 'binary', + charset) + } else if (tmp) { + tmp = decodeText(tmp, 'binary', 'utf8') + } + + if (res[p] === undefined) { + if (tmp) { res[p] = tmp } + } else { res[p][1] = tmp } + + return res +} + +module.exports = parseParams diff --git a/node_modules/@fastify/busboy/package.json b/node_modules/@fastify/busboy/package.json new file mode 100644 index 0000000..83693ac --- /dev/null +++ b/node_modules/@fastify/busboy/package.json @@ -0,0 +1,86 @@ +{ + "name": "@fastify/busboy", + "version": "2.1.1", + "private": false, + "author": "Brian White ", + "contributors": [ + { + "name": "Igor Savin", + "email": "kibertoad@gmail.com", + "url": "https://github.com/kibertoad" + }, + { + "name": "Aras Abbasi", + "email": "aras.abbasi@gmail.com", + "url": "https://github.com/uzlopak" + } + ], + "description": "A streaming parser for HTML form data for node.js", + "main": "lib/main", + "type": "commonjs", + "types": "lib/main.d.ts", + "scripts": { + "bench:busboy": "cd benchmarks && npm install && npm run benchmark-fastify", + "bench:dicer": "node bench/dicer/dicer-bench-multipart-parser.js", + "coveralls": "nyc report --reporter=lcov", + "lint": "npm run lint:standard", + "lint:everything": "npm run lint && npm run test:types", + "lint:fix": "standard --fix", + "lint:standard": "standard --verbose | snazzy", + "test:mocha": "tap", + "test:types": "tsd", + "test:coverage": "nyc npm run test", + "test": "npm run test:mocha" + }, + "engines": { + "node": ">=14" + }, + "devDependencies": { + "@types/node": "^20.1.0", + "busboy": "^1.0.0", + "photofinish": "^1.8.0", + "snazzy": "^9.0.0", + "standard": "^17.0.0", + "tap": "^16.3.8", + "tinybench": "^2.5.1", + "tsd": "^0.30.0", + "typescript": "^5.0.2" + }, + "keywords": [ + "uploads", + "forms", + "multipart", + "form-data" + ], + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/fastify/busboy.git" + }, + "tsd": { + "directory": "test/types", + "compilerOptions": { + "esModuleInterop": false, + "module": "commonjs", + "target": "ES2017" + } + }, + "standard": { + "globals": [ + "describe", + "it" + ], + "ignore": [ + "bench" + ] + }, + "files": [ + "README.md", + "LICENSE", + "lib/*", + "deps/encoding/*", + "deps/dicer/lib", + "deps/streamsearch/", + "deps/dicer/LICENSE" + ] +} diff --git a/node_modules/@img/sharp-darwin-x64/LICENSE b/node_modules/@img/sharp-darwin-x64/LICENSE new file mode 100644 index 0000000..37ec93a --- /dev/null +++ b/node_modules/@img/sharp-darwin-x64/LICENSE @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@img/sharp-darwin-x64/README.md b/node_modules/@img/sharp-darwin-x64/README.md new file mode 100644 index 0000000..bdc9a07 --- /dev/null +++ b/node_modules/@img/sharp-darwin-x64/README.md @@ -0,0 +1,18 @@ +# `@img/sharp-darwin-x64` + +Prebuilt sharp for use with macOS x64. + +## Licensing + +Copyright 2013 Lovell Fuller and others. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at +[https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0) + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/node_modules/@img/sharp-darwin-x64/lib/sharp-darwin-x64.node b/node_modules/@img/sharp-darwin-x64/lib/sharp-darwin-x64.node new file mode 100755 index 0000000..4957205 Binary files /dev/null and b/node_modules/@img/sharp-darwin-x64/lib/sharp-darwin-x64.node differ diff --git a/node_modules/@img/sharp-darwin-x64/package.json b/node_modules/@img/sharp-darwin-x64/package.json new file mode 100644 index 0000000..15b4afa --- /dev/null +++ b/node_modules/@img/sharp-darwin-x64/package.json @@ -0,0 +1,40 @@ +{ + "name": "@img/sharp-darwin-x64", + "version": "0.33.5", + "description": "Prebuilt sharp for use with macOS x64", + "author": "Lovell Fuller ", + "homepage": "https://sharp.pixelplumbing.com", + "repository": { + "type": "git", + "url": "git+https://github.com/lovell/sharp.git", + "directory": "npm/darwin-x64" + }, + "license": "Apache-2.0", + "funding": { + "url": "https://opencollective.com/libvips" + }, + "preferUnplugged": true, + "optionalDependencies": { + "@img/sharp-libvips-darwin-x64": "1.0.4" + }, + "files": [ + "lib" + ], + "publishConfig": { + "access": "public" + }, + "type": "commonjs", + "exports": { + "./sharp.node": "./lib/sharp-darwin-x64.node", + "./package": "./package.json" + }, + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "os": [ + "darwin" + ], + "cpu": [ + "x64" + ] +} diff --git a/node_modules/@img/sharp-libvips-darwin-x64/README.md b/node_modules/@img/sharp-libvips-darwin-x64/README.md new file mode 100644 index 0000000..42e292e --- /dev/null +++ b/node_modules/@img/sharp-libvips-darwin-x64/README.md @@ -0,0 +1,46 @@ +# `@img/sharp-libvips-darwin-x64` + +Prebuilt libvips and dependencies for use with sharp on macOS x64. + +## Licensing + +This software contains third-party libraries +used under the terms of the following licences: + +| Library | Used under the terms of | +|---------------|-----------------------------------------------------------------------------------------------------------| +| aom | BSD 2-Clause + [Alliance for Open Media Patent License 1.0](https://aomedia.org/license/patent-license/) | +| cairo | Mozilla Public License 2.0 | +| cgif | MIT Licence | +| expat | MIT Licence | +| fontconfig | [fontconfig Licence](https://gitlab.freedesktop.org/fontconfig/fontconfig/blob/main/COPYING) (BSD-like) | +| freetype | [freetype Licence](https://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/docs/FTL.TXT) (BSD-like) | +| fribidi | LGPLv3 | +| glib | LGPLv3 | +| harfbuzz | MIT Licence | +| highway | Apache-2.0 License, BSD 3-Clause | +| lcms | MIT Licence | +| libarchive | BSD 2-Clause | +| libexif | LGPLv3 | +| libffi | MIT Licence | +| libheif | LGPLv3 | +| libimagequant | [BSD 2-Clause](https://github.com/lovell/libimagequant/blob/main/COPYRIGHT) | +| libnsgif | MIT Licence | +| libpng | [libpng License](https://github.com/pnggroup/libpng/blob/master/LICENSE) | +| librsvg | LGPLv3 | +| libspng | [BSD 2-Clause, libpng License](https://github.com/randy408/libspng/blob/master/LICENSE) | +| libtiff | [libtiff License](https://gitlab.com/libtiff/libtiff/blob/master/LICENSE.md) (BSD-like) | +| libvips | LGPLv3 | +| libwebp | New BSD License | +| libxml2 | MIT Licence | +| mozjpeg | [zlib License, IJG License, BSD-3-Clause](https://github.com/mozilla/mozjpeg/blob/master/LICENSE.md) | +| pango | LGPLv3 | +| pixman | MIT Licence | +| proxy-libintl | LGPLv3 | +| zlib-ng | [zlib Licence](https://github.com/zlib-ng/zlib-ng/blob/develop/LICENSE.md) | + +Use of libraries under the terms of the LGPLv3 is via the +"any later version" clause of the LGPLv2 or LGPLv2.1. + +Please report any errors or omissions via +https://github.com/lovell/sharp-libvips/issues/new diff --git a/node_modules/@img/sharp-libvips-darwin-x64/lib/glib-2.0/include/glibconfig.h b/node_modules/@img/sharp-libvips-darwin-x64/lib/glib-2.0/include/glibconfig.h new file mode 100644 index 0000000..5b268c6 --- /dev/null +++ b/node_modules/@img/sharp-libvips-darwin-x64/lib/glib-2.0/include/glibconfig.h @@ -0,0 +1,221 @@ +/* glibconfig.h + * + * This is a generated file. Please modify 'glibconfig.h.in' + */ + +#ifndef __GLIBCONFIG_H__ +#define __GLIBCONFIG_H__ + +#include + +#include +#include +#define GLIB_HAVE_ALLOCA_H + +#define GLIB_STATIC_COMPILATION 1 +#define GOBJECT_STATIC_COMPILATION 1 +#define GIO_STATIC_COMPILATION 1 +#define GMODULE_STATIC_COMPILATION 1 +#define GI_STATIC_COMPILATION 1 +#define G_INTL_STATIC_COMPILATION 1 +#define FFI_STATIC_BUILD 1 + +/* Specifies that GLib's g_print*() functions wrap the + * system printf functions. This is useful to know, for example, + * when using glibc's register_printf_function(). + */ +#define GLIB_USING_SYSTEM_PRINTF + +G_BEGIN_DECLS + +#define G_MINFLOAT FLT_MIN +#define G_MAXFLOAT FLT_MAX +#define G_MINDOUBLE DBL_MIN +#define G_MAXDOUBLE DBL_MAX +#define G_MINSHORT SHRT_MIN +#define G_MAXSHORT SHRT_MAX +#define G_MAXUSHORT USHRT_MAX +#define G_MININT INT_MIN +#define G_MAXINT INT_MAX +#define G_MAXUINT UINT_MAX +#define G_MINLONG LONG_MIN +#define G_MAXLONG LONG_MAX +#define G_MAXULONG ULONG_MAX + +typedef signed char gint8; +typedef unsigned char guint8; + +typedef signed short gint16; +typedef unsigned short guint16; + +#define G_GINT16_MODIFIER "h" +#define G_GINT16_FORMAT "hi" +#define G_GUINT16_FORMAT "hu" + + +typedef signed int gint32; +typedef unsigned int guint32; + +#define G_GINT32_MODIFIER "" +#define G_GINT32_FORMAT "i" +#define G_GUINT32_FORMAT "u" + + +#define G_HAVE_GINT64 1 /* deprecated, always true */ + +G_GNUC_EXTENSION typedef signed long long gint64; +G_GNUC_EXTENSION typedef unsigned long long guint64; + +#define G_GINT64_CONSTANT(val) (G_GNUC_EXTENSION (val##LL)) +#define G_GUINT64_CONSTANT(val) (G_GNUC_EXTENSION (val##ULL)) + +#define G_GINT64_MODIFIER "ll" +#define G_GINT64_FORMAT "lli" +#define G_GUINT64_FORMAT "llu" + + +#define GLIB_SIZEOF_VOID_P 8 +#define GLIB_SIZEOF_LONG 8 +#define GLIB_SIZEOF_SIZE_T 8 +#define GLIB_SIZEOF_SSIZE_T 8 + +typedef signed long gssize; +typedef unsigned long gsize; +#define G_GSIZE_MODIFIER "l" +#define G_GSSIZE_MODIFIER "l" +#define G_GSIZE_FORMAT "lu" +#define G_GSSIZE_FORMAT "li" + +#define G_MAXSIZE G_MAXULONG +#define G_MINSSIZE G_MINLONG +#define G_MAXSSIZE G_MAXLONG + +typedef gint64 goffset; +#define G_MINOFFSET G_MININT64 +#define G_MAXOFFSET G_MAXINT64 + +#define G_GOFFSET_MODIFIER G_GINT64_MODIFIER +#define G_GOFFSET_FORMAT G_GINT64_FORMAT +#define G_GOFFSET_CONSTANT(val) G_GINT64_CONSTANT(val) + +#define G_POLLFD_FORMAT "%d" + +#define GPOINTER_TO_INT(p) ((gint) (glong) (p)) +#define GPOINTER_TO_UINT(p) ((guint) (gulong) (p)) + +#define GINT_TO_POINTER(i) ((gpointer) (glong) (i)) +#define GUINT_TO_POINTER(u) ((gpointer) (gulong) (u)) + +typedef signed long gintptr; +typedef unsigned long guintptr; + +#define G_GINTPTR_MODIFIER "l" +#define G_GINTPTR_FORMAT "li" +#define G_GUINTPTR_FORMAT "lu" + +#define GLIB_MAJOR_VERSION 2 +#define GLIB_MINOR_VERSION 81 +#define GLIB_MICRO_VERSION 1 + +#define G_OS_UNIX + +#define G_VA_COPY va_copy + +#define G_VA_COPY_AS_ARRAY 1 + +#define G_HAVE_ISO_VARARGS 1 + +/* gcc-2.95.x supports both gnu style and ISO varargs, but if -ansi + * is passed ISO vararg support is turned off, and there is no work + * around to turn it on, so we unconditionally turn it off. + */ +#if __GNUC__ == 2 && __GNUC_MINOR__ == 95 +# undef G_HAVE_ISO_VARARGS +#endif + +#define G_HAVE_GROWING_STACK 0 + +#ifndef _MSC_VER +# define G_HAVE_GNUC_VARARGS 1 +#endif + +#if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590) +#define G_GNUC_INTERNAL __attribute__((visibility("hidden"))) +#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) +#define G_GNUC_INTERNAL __hidden +#elif defined (__GNUC__) && defined (G_HAVE_GNUC_VISIBILITY) +#define G_GNUC_INTERNAL __attribute__((visibility("hidden"))) +#else +#define G_GNUC_INTERNAL +#endif + +#define G_THREADS_ENABLED +#define G_THREADS_IMPL_POSIX + +#define G_ATOMIC_LOCK_FREE + +#define GINT16_TO_LE(val) ((gint16) (val)) +#define GUINT16_TO_LE(val) ((guint16) (val)) +#define GINT16_TO_BE(val) ((gint16) GUINT16_SWAP_LE_BE (val)) +#define GUINT16_TO_BE(val) (GUINT16_SWAP_LE_BE (val)) + +#define GINT32_TO_LE(val) ((gint32) (val)) +#define GUINT32_TO_LE(val) ((guint32) (val)) +#define GINT32_TO_BE(val) ((gint32) GUINT32_SWAP_LE_BE (val)) +#define GUINT32_TO_BE(val) (GUINT32_SWAP_LE_BE (val)) + +#define GINT64_TO_LE(val) ((gint64) (val)) +#define GUINT64_TO_LE(val) ((guint64) (val)) +#define GINT64_TO_BE(val) ((gint64) GUINT64_SWAP_LE_BE (val)) +#define GUINT64_TO_BE(val) (GUINT64_SWAP_LE_BE (val)) + +#define GLONG_TO_LE(val) ((glong) GINT64_TO_LE (val)) +#define GULONG_TO_LE(val) ((gulong) GUINT64_TO_LE (val)) +#define GLONG_TO_BE(val) ((glong) GINT64_TO_BE (val)) +#define GULONG_TO_BE(val) ((gulong) GUINT64_TO_BE (val)) +#define GINT_TO_LE(val) ((gint) GINT32_TO_LE (val)) +#define GUINT_TO_LE(val) ((guint) GUINT32_TO_LE (val)) +#define GINT_TO_BE(val) ((gint) GINT32_TO_BE (val)) +#define GUINT_TO_BE(val) ((guint) GUINT32_TO_BE (val)) +#define GSIZE_TO_LE(val) ((gsize) GUINT64_TO_LE (val)) +#define GSSIZE_TO_LE(val) ((gssize) GINT64_TO_LE (val)) +#define GSIZE_TO_BE(val) ((gsize) GUINT64_TO_BE (val)) +#define GSSIZE_TO_BE(val) ((gssize) GINT64_TO_BE (val)) +#define G_BYTE_ORDER G_LITTLE_ENDIAN + +#define GLIB_SYSDEF_POLLIN =1 +#define GLIB_SYSDEF_POLLOUT =4 +#define GLIB_SYSDEF_POLLPRI =2 +#define GLIB_SYSDEF_POLLHUP =16 +#define GLIB_SYSDEF_POLLERR =8 +#define GLIB_SYSDEF_POLLNVAL =32 + +/* No way to disable deprecation warnings for macros, so only emit deprecation + * warnings on platforms where usage of this macro is broken */ +#if defined(__APPLE__) || defined(_MSC_VER) || defined(__CYGWIN__) +#define G_MODULE_SUFFIX "so" GLIB_DEPRECATED_MACRO_IN_2_76 +#else +#define G_MODULE_SUFFIX "so" +#endif + +typedef int GPid; +#define G_PID_FORMAT "i" + +#define GLIB_SYSDEF_AF_UNIX 1 +#define GLIB_SYSDEF_AF_INET 2 +#define GLIB_SYSDEF_AF_INET6 30 + +#define GLIB_SYSDEF_MSG_OOB 1 +#define GLIB_SYSDEF_MSG_PEEK 2 +#define GLIB_SYSDEF_MSG_DONTROUTE 4 + +#define G_DIR_SEPARATOR '/' +#define G_DIR_SEPARATOR_S "/" +#define G_SEARCHPATH_SEPARATOR ':' +#define G_SEARCHPATH_SEPARATOR_S ":" + +#undef G_HAVE_FREE_SIZED + +G_END_DECLS + +#endif /* __GLIBCONFIG_H__ */ diff --git a/node_modules/@img/sharp-libvips-darwin-x64/lib/index.js b/node_modules/@img/sharp-libvips-darwin-x64/lib/index.js new file mode 100644 index 0000000..5092b4d --- /dev/null +++ b/node_modules/@img/sharp-libvips-darwin-x64/lib/index.js @@ -0,0 +1 @@ +module.exports = __dirname; diff --git a/node_modules/@img/sharp-libvips-darwin-x64/lib/libvips-cpp.42.dylib b/node_modules/@img/sharp-libvips-darwin-x64/lib/libvips-cpp.42.dylib new file mode 100644 index 0000000..70cab10 Binary files /dev/null and b/node_modules/@img/sharp-libvips-darwin-x64/lib/libvips-cpp.42.dylib differ diff --git a/node_modules/@img/sharp-libvips-darwin-x64/package.json b/node_modules/@img/sharp-libvips-darwin-x64/package.json new file mode 100644 index 0000000..41f84f4 --- /dev/null +++ b/node_modules/@img/sharp-libvips-darwin-x64/package.json @@ -0,0 +1,36 @@ +{ + "name": "@img/sharp-libvips-darwin-x64", + "version": "1.0.4", + "description": "Prebuilt libvips and dependencies for use with sharp on macOS x64", + "author": "Lovell Fuller ", + "homepage": "https://sharp.pixelplumbing.com", + "repository": { + "type": "git", + "url": "git+https://github.com/lovell/sharp-libvips.git", + "directory": "npm/darwin-x64" + }, + "license": "LGPL-3.0-or-later", + "funding": { + "url": "https://opencollective.com/libvips" + }, + "preferUnplugged": true, + "publishConfig": { + "access": "public" + }, + "files": [ + "lib", + "versions.json" + ], + "type": "commonjs", + "exports": { + "./lib": "./lib/index.js", + "./package": "./package.json", + "./versions": "./versions.json" + }, + "os": [ + "darwin" + ], + "cpu": [ + "x64" + ] +} diff --git a/node_modules/@img/sharp-libvips-darwin-x64/versions.json b/node_modules/@img/sharp-libvips-darwin-x64/versions.json new file mode 100644 index 0000000..0b50c29 --- /dev/null +++ b/node_modules/@img/sharp-libvips-darwin-x64/versions.json @@ -0,0 +1,30 @@ +{ + "aom": "3.9.1", + "archive": "3.7.4", + "cairo": "1.18.0", + "cgif": "0.4.1", + "exif": "0.6.24", + "expat": "2.6.2", + "ffi": "3.4.6", + "fontconfig": "2.15.0", + "freetype": "2.13.2", + "fribidi": "1.0.15", + "glib": "2.81.1", + "harfbuzz": "9.0.0", + "heif": "1.18.2", + "highway": "1.2.0", + "imagequant": "2.4.1", + "lcms": "2.16", + "mozjpeg": "4.1.5", + "pango": "1.54.0", + "pixman": "0.43.4", + "png": "1.6.43", + "proxy-libintl": "0.4", + "rsvg": "2.58.93", + "spng": "0.7.4", + "tiff": "4.6.0", + "vips": "8.15.3", + "webp": "1.4.0", + "xml": "2.13.3", + "zlib-ng": "2.2.1" +} \ No newline at end of file diff --git a/node_modules/@jridgewell/resolve-uri/LICENSE b/node_modules/@jridgewell/resolve-uri/LICENSE new file mode 100644 index 0000000..0a81b2a --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/LICENSE @@ -0,0 +1,19 @@ +Copyright 2019 Justin Ridgewell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/node_modules/@jridgewell/resolve-uri/README.md b/node_modules/@jridgewell/resolve-uri/README.md new file mode 100644 index 0000000..2fe70df --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/README.md @@ -0,0 +1,40 @@ +# @jridgewell/resolve-uri + +> Resolve a URI relative to an optional base URI + +Resolve any combination of absolute URIs, protocol-realtive URIs, absolute paths, or relative paths. + +## Installation + +```sh +npm install @jridgewell/resolve-uri +``` + +## Usage + +```typescript +function resolve(input: string, base?: string): string; +``` + +```js +import resolve from '@jridgewell/resolve-uri'; + +resolve('foo', 'https://example.com'); // => 'https://example.com/foo' +``` + +| Input | Base | Resolution | Explanation | +|-----------------------|-------------------------|--------------------------------|--------------------------------------------------------------| +| `https://example.com` | _any_ | `https://example.com/` | Input is normalized only | +| `//example.com` | `https://base.com/` | `https://example.com/` | Input inherits the base's protocol | +| `//example.com` | _rest_ | `//example.com/` | Input is normalized only | +| `/example` | `https://base.com/` | `https://base.com/example` | Input inherits the base's origin | +| `/example` | `//base.com/` | `//base.com/example` | Input inherits the base's host and remains protocol relative | +| `/example` | _rest_ | `/example` | Input is normalized only | +| `example` | `https://base.com/dir/` | `https://base.com/dir/example` | Input is joined with the base | +| `example` | `https://base.com/file` | `https://base.com/example` | Input is joined with the base without its file | +| `example` | `//base.com/dir/` | `//base.com/dir/example` | Input is joined with the base's last directory | +| `example` | `//base.com/file` | `//base.com/example` | Input is joined with the base without its file | +| `example` | `/base/dir/` | `/base/dir/example` | Input is joined with the base's last directory | +| `example` | `/base/file` | `/base/example` | Input is joined with the base without its file | +| `example` | `base/dir/` | `base/dir/example` | Input is joined with the base's last directory | +| `example` | `base/file` | `base/example` | Input is joined with the base without its file | diff --git a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs new file mode 100644 index 0000000..e958e88 --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs @@ -0,0 +1,232 @@ +// Matches the scheme of a URL, eg "http://" +const schemeRegex = /^[\w+.-]+:\/\//; +/** + * Matches the parts of a URL: + * 1. Scheme, including ":", guaranteed. + * 2. User/password, including "@", optional. + * 3. Host, guaranteed. + * 4. Port, including ":", optional. + * 5. Path, including "/", optional. + * 6. Query, including "?", optional. + * 7. Hash, including "#", optional. + */ +const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/; +/** + * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start + * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive). + * + * 1. Host, optional. + * 2. Path, which may include "/", guaranteed. + * 3. Query, including "?", optional. + * 4. Hash, including "#", optional. + */ +const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i; +function isAbsoluteUrl(input) { + return schemeRegex.test(input); +} +function isSchemeRelativeUrl(input) { + return input.startsWith('//'); +} +function isAbsolutePath(input) { + return input.startsWith('/'); +} +function isFileUrl(input) { + return input.startsWith('file:'); +} +function isRelative(input) { + return /^[.?#]/.test(input); +} +function parseAbsoluteUrl(input) { + const match = urlRegex.exec(input); + return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || ''); +} +function parseFileUrl(input) { + const match = fileRegex.exec(input); + const path = match[2]; + return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || ''); +} +function makeUrl(scheme, user, host, port, path, query, hash) { + return { + scheme, + user, + host, + port, + path, + query, + hash, + type: 7 /* Absolute */, + }; +} +function parseUrl(input) { + if (isSchemeRelativeUrl(input)) { + const url = parseAbsoluteUrl('http:' + input); + url.scheme = ''; + url.type = 6 /* SchemeRelative */; + return url; + } + if (isAbsolutePath(input)) { + const url = parseAbsoluteUrl('http://foo.com' + input); + url.scheme = ''; + url.host = ''; + url.type = 5 /* AbsolutePath */; + return url; + } + if (isFileUrl(input)) + return parseFileUrl(input); + if (isAbsoluteUrl(input)) + return parseAbsoluteUrl(input); + const url = parseAbsoluteUrl('http://foo.com/' + input); + url.scheme = ''; + url.host = ''; + url.type = input + ? input.startsWith('?') + ? 3 /* Query */ + : input.startsWith('#') + ? 2 /* Hash */ + : 4 /* RelativePath */ + : 1 /* Empty */; + return url; +} +function stripPathFilename(path) { + // If a path ends with a parent directory "..", then it's a relative path with excess parent + // paths. It's not a file, so we can't strip it. + if (path.endsWith('/..')) + return path; + const index = path.lastIndexOf('/'); + return path.slice(0, index + 1); +} +function mergePaths(url, base) { + normalizePath(base, base.type); + // If the path is just a "/", then it was an empty path to begin with (remember, we're a relative + // path). + if (url.path === '/') { + url.path = base.path; + } + else { + // Resolution happens relative to the base path's directory, not the file. + url.path = stripPathFilename(base.path) + url.path; + } +} +/** + * The path can have empty directories "//", unneeded parents "foo/..", or current directory + * "foo/.". We need to normalize to a standard representation. + */ +function normalizePath(url, type) { + const rel = type <= 4 /* RelativePath */; + const pieces = url.path.split('/'); + // We need to preserve the first piece always, so that we output a leading slash. The item at + // pieces[0] is an empty string. + let pointer = 1; + // Positive is the number of real directories we've output, used for popping a parent directory. + // Eg, "foo/bar/.." will have a positive 2, and we can decrement to be left with just "foo". + let positive = 0; + // We need to keep a trailing slash if we encounter an empty directory (eg, splitting "foo/" will + // generate `["foo", ""]` pieces). And, if we pop a parent directory. But once we encounter a + // real directory, we won't need to append, unless the other conditions happen again. + let addTrailingSlash = false; + for (let i = 1; i < pieces.length; i++) { + const piece = pieces[i]; + // An empty directory, could be a trailing slash, or just a double "//" in the path. + if (!piece) { + addTrailingSlash = true; + continue; + } + // If we encounter a real directory, then we don't need to append anymore. + addTrailingSlash = false; + // A current directory, which we can always drop. + if (piece === '.') + continue; + // A parent directory, we need to see if there are any real directories we can pop. Else, we + // have an excess of parents, and we'll need to keep the "..". + if (piece === '..') { + if (positive) { + addTrailingSlash = true; + positive--; + pointer--; + } + else if (rel) { + // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute + // URL, protocol relative URL, or an absolute path, we don't need to keep excess. + pieces[pointer++] = piece; + } + continue; + } + // We've encountered a real directory. Move it to the next insertion pointer, which accounts for + // any popped or dropped directories. + pieces[pointer++] = piece; + positive++; + } + let path = ''; + for (let i = 1; i < pointer; i++) { + path += '/' + pieces[i]; + } + if (!path || (addTrailingSlash && !path.endsWith('/..'))) { + path += '/'; + } + url.path = path; +} +/** + * Attempts to resolve `input` URL/path relative to `base`. + */ +function resolve(input, base) { + if (!input && !base) + return ''; + const url = parseUrl(input); + let inputType = url.type; + if (base && inputType !== 7 /* Absolute */) { + const baseUrl = parseUrl(base); + const baseType = baseUrl.type; + switch (inputType) { + case 1 /* Empty */: + url.hash = baseUrl.hash; + // fall through + case 2 /* Hash */: + url.query = baseUrl.query; + // fall through + case 3 /* Query */: + case 4 /* RelativePath */: + mergePaths(url, baseUrl); + // fall through + case 5 /* AbsolutePath */: + // The host, user, and port are joined, you can't copy one without the others. + url.user = baseUrl.user; + url.host = baseUrl.host; + url.port = baseUrl.port; + // fall through + case 6 /* SchemeRelative */: + // The input doesn't have a schema at least, so we need to copy at least that over. + url.scheme = baseUrl.scheme; + } + if (baseType > inputType) + inputType = baseType; + } + normalizePath(url, inputType); + const queryHash = url.query + url.hash; + switch (inputType) { + // This is impossible, because of the empty checks at the start of the function. + // case UrlType.Empty: + case 2 /* Hash */: + case 3 /* Query */: + return queryHash; + case 4 /* RelativePath */: { + // The first char is always a "/", and we need it to be relative. + const path = url.path.slice(1); + if (!path) + return queryHash || '.'; + if (isRelative(base || input) && !isRelative(path)) { + // If base started with a leading ".", or there is no base and input started with a ".", + // then we need to ensure that the relative path starts with a ".". We don't know if + // relative starts with a "..", though, so check before prepending. + return './' + path + queryHash; + } + return path + queryHash; + } + case 5 /* AbsolutePath */: + return url.path + queryHash; + default: + return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash; + } +} + +export { resolve as default }; +//# sourceMappingURL=resolve-uri.mjs.map diff --git a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map new file mode 100644 index 0000000..1de97d0 --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"resolve-uri.mjs","sources":["../src/resolve-uri.ts"],"sourcesContent":["// Matches the scheme of a URL, eg \"http://\"\nconst schemeRegex = /^[\\w+.-]+:\\/\\//;\n\n/**\n * Matches the parts of a URL:\n * 1. Scheme, including \":\", guaranteed.\n * 2. User/password, including \"@\", optional.\n * 3. Host, guaranteed.\n * 4. Port, including \":\", optional.\n * 5. Path, including \"/\", optional.\n * 6. Query, including \"?\", optional.\n * 7. Hash, including \"#\", optional.\n */\nconst urlRegex = /^([\\w+.-]+:)\\/\\/([^@/#?]*@)?([^:/#?]*)(:\\d+)?(\\/[^#?]*)?(\\?[^#]*)?(#.*)?/;\n\n/**\n * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start\n * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive).\n *\n * 1. Host, optional.\n * 2. Path, which may include \"/\", guaranteed.\n * 3. Query, including \"?\", optional.\n * 4. Hash, including \"#\", optional.\n */\nconst fileRegex = /^file:(?:\\/\\/((?![a-z]:)[^/#?]*)?)?(\\/?[^#?]*)(\\?[^#]*)?(#.*)?/i;\n\ntype Url = {\n scheme: string;\n user: string;\n host: string;\n port: string;\n path: string;\n query: string;\n hash: string;\n type: UrlType;\n};\n\nconst enum UrlType {\n Empty = 1,\n Hash = 2,\n Query = 3,\n RelativePath = 4,\n AbsolutePath = 5,\n SchemeRelative = 6,\n Absolute = 7,\n}\n\nfunction isAbsoluteUrl(input: string): boolean {\n return schemeRegex.test(input);\n}\n\nfunction isSchemeRelativeUrl(input: string): boolean {\n return input.startsWith('//');\n}\n\nfunction isAbsolutePath(input: string): boolean {\n return input.startsWith('/');\n}\n\nfunction isFileUrl(input: string): boolean {\n return input.startsWith('file:');\n}\n\nfunction isRelative(input: string): boolean {\n return /^[.?#]/.test(input);\n}\n\nfunction parseAbsoluteUrl(input: string): Url {\n const match = urlRegex.exec(input)!;\n return makeUrl(\n match[1],\n match[2] || '',\n match[3],\n match[4] || '',\n match[5] || '/',\n match[6] || '',\n match[7] || '',\n );\n}\n\nfunction parseFileUrl(input: string): Url {\n const match = fileRegex.exec(input)!;\n const path = match[2];\n return makeUrl(\n 'file:',\n '',\n match[1] || '',\n '',\n isAbsolutePath(path) ? path : '/' + path,\n match[3] || '',\n match[4] || '',\n );\n}\n\nfunction makeUrl(\n scheme: string,\n user: string,\n host: string,\n port: string,\n path: string,\n query: string,\n hash: string,\n): Url {\n return {\n scheme,\n user,\n host,\n port,\n path,\n query,\n hash,\n type: UrlType.Absolute,\n };\n}\n\nfunction parseUrl(input: string): Url {\n if (isSchemeRelativeUrl(input)) {\n const url = parseAbsoluteUrl('http:' + input);\n url.scheme = '';\n url.type = UrlType.SchemeRelative;\n return url;\n }\n\n if (isAbsolutePath(input)) {\n const url = parseAbsoluteUrl('http://foo.com' + input);\n url.scheme = '';\n url.host = '';\n url.type = UrlType.AbsolutePath;\n return url;\n }\n\n if (isFileUrl(input)) return parseFileUrl(input);\n\n if (isAbsoluteUrl(input)) return parseAbsoluteUrl(input);\n\n const url = parseAbsoluteUrl('http://foo.com/' + input);\n url.scheme = '';\n url.host = '';\n url.type = input\n ? input.startsWith('?')\n ? UrlType.Query\n : input.startsWith('#')\n ? UrlType.Hash\n : UrlType.RelativePath\n : UrlType.Empty;\n return url;\n}\n\nfunction stripPathFilename(path: string): string {\n // If a path ends with a parent directory \"..\", then it's a relative path with excess parent\n // paths. It's not a file, so we can't strip it.\n if (path.endsWith('/..')) return path;\n const index = path.lastIndexOf('/');\n return path.slice(0, index + 1);\n}\n\nfunction mergePaths(url: Url, base: Url) {\n normalizePath(base, base.type);\n\n // If the path is just a \"/\", then it was an empty path to begin with (remember, we're a relative\n // path).\n if (url.path === '/') {\n url.path = base.path;\n } else {\n // Resolution happens relative to the base path's directory, not the file.\n url.path = stripPathFilename(base.path) + url.path;\n }\n}\n\n/**\n * The path can have empty directories \"//\", unneeded parents \"foo/..\", or current directory\n * \"foo/.\". We need to normalize to a standard representation.\n */\nfunction normalizePath(url: Url, type: UrlType) {\n const rel = type <= UrlType.RelativePath;\n const pieces = url.path.split('/');\n\n // We need to preserve the first piece always, so that we output a leading slash. The item at\n // pieces[0] is an empty string.\n let pointer = 1;\n\n // Positive is the number of real directories we've output, used for popping a parent directory.\n // Eg, \"foo/bar/..\" will have a positive 2, and we can decrement to be left with just \"foo\".\n let positive = 0;\n\n // We need to keep a trailing slash if we encounter an empty directory (eg, splitting \"foo/\" will\n // generate `[\"foo\", \"\"]` pieces). And, if we pop a parent directory. But once we encounter a\n // real directory, we won't need to append, unless the other conditions happen again.\n let addTrailingSlash = false;\n\n for (let i = 1; i < pieces.length; i++) {\n const piece = pieces[i];\n\n // An empty directory, could be a trailing slash, or just a double \"//\" in the path.\n if (!piece) {\n addTrailingSlash = true;\n continue;\n }\n\n // If we encounter a real directory, then we don't need to append anymore.\n addTrailingSlash = false;\n\n // A current directory, which we can always drop.\n if (piece === '.') continue;\n\n // A parent directory, we need to see if there are any real directories we can pop. Else, we\n // have an excess of parents, and we'll need to keep the \"..\".\n if (piece === '..') {\n if (positive) {\n addTrailingSlash = true;\n positive--;\n pointer--;\n } else if (rel) {\n // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute\n // URL, protocol relative URL, or an absolute path, we don't need to keep excess.\n pieces[pointer++] = piece;\n }\n continue;\n }\n\n // We've encountered a real directory. Move it to the next insertion pointer, which accounts for\n // any popped or dropped directories.\n pieces[pointer++] = piece;\n positive++;\n }\n\n let path = '';\n for (let i = 1; i < pointer; i++) {\n path += '/' + pieces[i];\n }\n if (!path || (addTrailingSlash && !path.endsWith('/..'))) {\n path += '/';\n }\n url.path = path;\n}\n\n/**\n * Attempts to resolve `input` URL/path relative to `base`.\n */\nexport default function resolve(input: string, base: string | undefined): string {\n if (!input && !base) return '';\n\n const url = parseUrl(input);\n let inputType = url.type;\n\n if (base && inputType !== UrlType.Absolute) {\n const baseUrl = parseUrl(base);\n const baseType = baseUrl.type;\n\n switch (inputType) {\n case UrlType.Empty:\n url.hash = baseUrl.hash;\n // fall through\n\n case UrlType.Hash:\n url.query = baseUrl.query;\n // fall through\n\n case UrlType.Query:\n case UrlType.RelativePath:\n mergePaths(url, baseUrl);\n // fall through\n\n case UrlType.AbsolutePath:\n // The host, user, and port are joined, you can't copy one without the others.\n url.user = baseUrl.user;\n url.host = baseUrl.host;\n url.port = baseUrl.port;\n // fall through\n\n case UrlType.SchemeRelative:\n // The input doesn't have a schema at least, so we need to copy at least that over.\n url.scheme = baseUrl.scheme;\n }\n if (baseType > inputType) inputType = baseType;\n }\n\n normalizePath(url, inputType);\n\n const queryHash = url.query + url.hash;\n switch (inputType) {\n // This is impossible, because of the empty checks at the start of the function.\n // case UrlType.Empty:\n\n case UrlType.Hash:\n case UrlType.Query:\n return queryHash;\n\n case UrlType.RelativePath: {\n // The first char is always a \"/\", and we need it to be relative.\n const path = url.path.slice(1);\n\n if (!path) return queryHash || '.';\n\n if (isRelative(base || input) && !isRelative(path)) {\n // If base started with a leading \".\", or there is no base and input started with a \".\",\n // then we need to ensure that the relative path starts with a \".\". We don't know if\n // relative starts with a \"..\", though, so check before prepending.\n return './' + path + queryHash;\n }\n\n return path + queryHash;\n }\n\n case UrlType.AbsolutePath:\n return url.path + queryHash;\n\n default:\n return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash;\n }\n}\n"],"names":[],"mappings":"AAAA;AACA,MAAM,WAAW,GAAG,gBAAgB,CAAC;AAErC;;;;;;;;;;AAUA,MAAM,QAAQ,GAAG,0EAA0E,CAAC;AAE5F;;;;;;;;;AASA,MAAM,SAAS,GAAG,iEAAiE,CAAC;AAuBpF,SAAS,aAAa,CAAC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dist/resolve-uri.umd.js new file mode 100644 index 0000000..a783049 --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js @@ -0,0 +1,240 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.resolveURI = factory()); +})(this, (function () { 'use strict'; + + // Matches the scheme of a URL, eg "http://" + const schemeRegex = /^[\w+.-]+:\/\//; + /** + * Matches the parts of a URL: + * 1. Scheme, including ":", guaranteed. + * 2. User/password, including "@", optional. + * 3. Host, guaranteed. + * 4. Port, including ":", optional. + * 5. Path, including "/", optional. + * 6. Query, including "?", optional. + * 7. Hash, including "#", optional. + */ + const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/; + /** + * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start + * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive). + * + * 1. Host, optional. + * 2. Path, which may include "/", guaranteed. + * 3. Query, including "?", optional. + * 4. Hash, including "#", optional. + */ + const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i; + function isAbsoluteUrl(input) { + return schemeRegex.test(input); + } + function isSchemeRelativeUrl(input) { + return input.startsWith('//'); + } + function isAbsolutePath(input) { + return input.startsWith('/'); + } + function isFileUrl(input) { + return input.startsWith('file:'); + } + function isRelative(input) { + return /^[.?#]/.test(input); + } + function parseAbsoluteUrl(input) { + const match = urlRegex.exec(input); + return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || ''); + } + function parseFileUrl(input) { + const match = fileRegex.exec(input); + const path = match[2]; + return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || ''); + } + function makeUrl(scheme, user, host, port, path, query, hash) { + return { + scheme, + user, + host, + port, + path, + query, + hash, + type: 7 /* Absolute */, + }; + } + function parseUrl(input) { + if (isSchemeRelativeUrl(input)) { + const url = parseAbsoluteUrl('http:' + input); + url.scheme = ''; + url.type = 6 /* SchemeRelative */; + return url; + } + if (isAbsolutePath(input)) { + const url = parseAbsoluteUrl('http://foo.com' + input); + url.scheme = ''; + url.host = ''; + url.type = 5 /* AbsolutePath */; + return url; + } + if (isFileUrl(input)) + return parseFileUrl(input); + if (isAbsoluteUrl(input)) + return parseAbsoluteUrl(input); + const url = parseAbsoluteUrl('http://foo.com/' + input); + url.scheme = ''; + url.host = ''; + url.type = input + ? input.startsWith('?') + ? 3 /* Query */ + : input.startsWith('#') + ? 2 /* Hash */ + : 4 /* RelativePath */ + : 1 /* Empty */; + return url; + } + function stripPathFilename(path) { + // If a path ends with a parent directory "..", then it's a relative path with excess parent + // paths. It's not a file, so we can't strip it. + if (path.endsWith('/..')) + return path; + const index = path.lastIndexOf('/'); + return path.slice(0, index + 1); + } + function mergePaths(url, base) { + normalizePath(base, base.type); + // If the path is just a "/", then it was an empty path to begin with (remember, we're a relative + // path). + if (url.path === '/') { + url.path = base.path; + } + else { + // Resolution happens relative to the base path's directory, not the file. + url.path = stripPathFilename(base.path) + url.path; + } + } + /** + * The path can have empty directories "//", unneeded parents "foo/..", or current directory + * "foo/.". We need to normalize to a standard representation. + */ + function normalizePath(url, type) { + const rel = type <= 4 /* RelativePath */; + const pieces = url.path.split('/'); + // We need to preserve the first piece always, so that we output a leading slash. The item at + // pieces[0] is an empty string. + let pointer = 1; + // Positive is the number of real directories we've output, used for popping a parent directory. + // Eg, "foo/bar/.." will have a positive 2, and we can decrement to be left with just "foo". + let positive = 0; + // We need to keep a trailing slash if we encounter an empty directory (eg, splitting "foo/" will + // generate `["foo", ""]` pieces). And, if we pop a parent directory. But once we encounter a + // real directory, we won't need to append, unless the other conditions happen again. + let addTrailingSlash = false; + for (let i = 1; i < pieces.length; i++) { + const piece = pieces[i]; + // An empty directory, could be a trailing slash, or just a double "//" in the path. + if (!piece) { + addTrailingSlash = true; + continue; + } + // If we encounter a real directory, then we don't need to append anymore. + addTrailingSlash = false; + // A current directory, which we can always drop. + if (piece === '.') + continue; + // A parent directory, we need to see if there are any real directories we can pop. Else, we + // have an excess of parents, and we'll need to keep the "..". + if (piece === '..') { + if (positive) { + addTrailingSlash = true; + positive--; + pointer--; + } + else if (rel) { + // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute + // URL, protocol relative URL, or an absolute path, we don't need to keep excess. + pieces[pointer++] = piece; + } + continue; + } + // We've encountered a real directory. Move it to the next insertion pointer, which accounts for + // any popped or dropped directories. + pieces[pointer++] = piece; + positive++; + } + let path = ''; + for (let i = 1; i < pointer; i++) { + path += '/' + pieces[i]; + } + if (!path || (addTrailingSlash && !path.endsWith('/..'))) { + path += '/'; + } + url.path = path; + } + /** + * Attempts to resolve `input` URL/path relative to `base`. + */ + function resolve(input, base) { + if (!input && !base) + return ''; + const url = parseUrl(input); + let inputType = url.type; + if (base && inputType !== 7 /* Absolute */) { + const baseUrl = parseUrl(base); + const baseType = baseUrl.type; + switch (inputType) { + case 1 /* Empty */: + url.hash = baseUrl.hash; + // fall through + case 2 /* Hash */: + url.query = baseUrl.query; + // fall through + case 3 /* Query */: + case 4 /* RelativePath */: + mergePaths(url, baseUrl); + // fall through + case 5 /* AbsolutePath */: + // The host, user, and port are joined, you can't copy one without the others. + url.user = baseUrl.user; + url.host = baseUrl.host; + url.port = baseUrl.port; + // fall through + case 6 /* SchemeRelative */: + // The input doesn't have a schema at least, so we need to copy at least that over. + url.scheme = baseUrl.scheme; + } + if (baseType > inputType) + inputType = baseType; + } + normalizePath(url, inputType); + const queryHash = url.query + url.hash; + switch (inputType) { + // This is impossible, because of the empty checks at the start of the function. + // case UrlType.Empty: + case 2 /* Hash */: + case 3 /* Query */: + return queryHash; + case 4 /* RelativePath */: { + // The first char is always a "/", and we need it to be relative. + const path = url.path.slice(1); + if (!path) + return queryHash || '.'; + if (isRelative(base || input) && !isRelative(path)) { + // If base started with a leading ".", or there is no base and input started with a ".", + // then we need to ensure that the relative path starts with a ".". We don't know if + // relative starts with a "..", though, so check before prepending. + return './' + path + queryHash; + } + return path + queryHash; + } + case 5 /* AbsolutePath */: + return url.path + queryHash; + default: + return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash; + } + } + + return resolve; + +})); +//# sourceMappingURL=resolve-uri.umd.js.map diff --git a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map new file mode 100644 index 0000000..70a37f2 --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"resolve-uri.umd.js","sources":["../src/resolve-uri.ts"],"sourcesContent":["// Matches the scheme of a URL, eg \"http://\"\nconst schemeRegex = /^[\\w+.-]+:\\/\\//;\n\n/**\n * Matches the parts of a URL:\n * 1. Scheme, including \":\", guaranteed.\n * 2. User/password, including \"@\", optional.\n * 3. Host, guaranteed.\n * 4. Port, including \":\", optional.\n * 5. Path, including \"/\", optional.\n * 6. Query, including \"?\", optional.\n * 7. Hash, including \"#\", optional.\n */\nconst urlRegex = /^([\\w+.-]+:)\\/\\/([^@/#?]*@)?([^:/#?]*)(:\\d+)?(\\/[^#?]*)?(\\?[^#]*)?(#.*)?/;\n\n/**\n * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start\n * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive).\n *\n * 1. Host, optional.\n * 2. Path, which may include \"/\", guaranteed.\n * 3. Query, including \"?\", optional.\n * 4. Hash, including \"#\", optional.\n */\nconst fileRegex = /^file:(?:\\/\\/((?![a-z]:)[^/#?]*)?)?(\\/?[^#?]*)(\\?[^#]*)?(#.*)?/i;\n\ntype Url = {\n scheme: string;\n user: string;\n host: string;\n port: string;\n path: string;\n query: string;\n hash: string;\n type: UrlType;\n};\n\nconst enum UrlType {\n Empty = 1,\n Hash = 2,\n Query = 3,\n RelativePath = 4,\n AbsolutePath = 5,\n SchemeRelative = 6,\n Absolute = 7,\n}\n\nfunction isAbsoluteUrl(input: string): boolean {\n return schemeRegex.test(input);\n}\n\nfunction isSchemeRelativeUrl(input: string): boolean {\n return input.startsWith('//');\n}\n\nfunction isAbsolutePath(input: string): boolean {\n return input.startsWith('/');\n}\n\nfunction isFileUrl(input: string): boolean {\n return input.startsWith('file:');\n}\n\nfunction isRelative(input: string): boolean {\n return /^[.?#]/.test(input);\n}\n\nfunction parseAbsoluteUrl(input: string): Url {\n const match = urlRegex.exec(input)!;\n return makeUrl(\n match[1],\n match[2] || '',\n match[3],\n match[4] || '',\n match[5] || '/',\n match[6] || '',\n match[7] || '',\n );\n}\n\nfunction parseFileUrl(input: string): Url {\n const match = fileRegex.exec(input)!;\n const path = match[2];\n return makeUrl(\n 'file:',\n '',\n match[1] || '',\n '',\n isAbsolutePath(path) ? path : '/' + path,\n match[3] || '',\n match[4] || '',\n );\n}\n\nfunction makeUrl(\n scheme: string,\n user: string,\n host: string,\n port: string,\n path: string,\n query: string,\n hash: string,\n): Url {\n return {\n scheme,\n user,\n host,\n port,\n path,\n query,\n hash,\n type: UrlType.Absolute,\n };\n}\n\nfunction parseUrl(input: string): Url {\n if (isSchemeRelativeUrl(input)) {\n const url = parseAbsoluteUrl('http:' + input);\n url.scheme = '';\n url.type = UrlType.SchemeRelative;\n return url;\n }\n\n if (isAbsolutePath(input)) {\n const url = parseAbsoluteUrl('http://foo.com' + input);\n url.scheme = '';\n url.host = '';\n url.type = UrlType.AbsolutePath;\n return url;\n }\n\n if (isFileUrl(input)) return parseFileUrl(input);\n\n if (isAbsoluteUrl(input)) return parseAbsoluteUrl(input);\n\n const url = parseAbsoluteUrl('http://foo.com/' + input);\n url.scheme = '';\n url.host = '';\n url.type = input\n ? input.startsWith('?')\n ? UrlType.Query\n : input.startsWith('#')\n ? UrlType.Hash\n : UrlType.RelativePath\n : UrlType.Empty;\n return url;\n}\n\nfunction stripPathFilename(path: string): string {\n // If a path ends with a parent directory \"..\", then it's a relative path with excess parent\n // paths. It's not a file, so we can't strip it.\n if (path.endsWith('/..')) return path;\n const index = path.lastIndexOf('/');\n return path.slice(0, index + 1);\n}\n\nfunction mergePaths(url: Url, base: Url) {\n normalizePath(base, base.type);\n\n // If the path is just a \"/\", then it was an empty path to begin with (remember, we're a relative\n // path).\n if (url.path === '/') {\n url.path = base.path;\n } else {\n // Resolution happens relative to the base path's directory, not the file.\n url.path = stripPathFilename(base.path) + url.path;\n }\n}\n\n/**\n * The path can have empty directories \"//\", unneeded parents \"foo/..\", or current directory\n * \"foo/.\". We need to normalize to a standard representation.\n */\nfunction normalizePath(url: Url, type: UrlType) {\n const rel = type <= UrlType.RelativePath;\n const pieces = url.path.split('/');\n\n // We need to preserve the first piece always, so that we output a leading slash. The item at\n // pieces[0] is an empty string.\n let pointer = 1;\n\n // Positive is the number of real directories we've output, used for popping a parent directory.\n // Eg, \"foo/bar/..\" will have a positive 2, and we can decrement to be left with just \"foo\".\n let positive = 0;\n\n // We need to keep a trailing slash if we encounter an empty directory (eg, splitting \"foo/\" will\n // generate `[\"foo\", \"\"]` pieces). And, if we pop a parent directory. But once we encounter a\n // real directory, we won't need to append, unless the other conditions happen again.\n let addTrailingSlash = false;\n\n for (let i = 1; i < pieces.length; i++) {\n const piece = pieces[i];\n\n // An empty directory, could be a trailing slash, or just a double \"//\" in the path.\n if (!piece) {\n addTrailingSlash = true;\n continue;\n }\n\n // If we encounter a real directory, then we don't need to append anymore.\n addTrailingSlash = false;\n\n // A current directory, which we can always drop.\n if (piece === '.') continue;\n\n // A parent directory, we need to see if there are any real directories we can pop. Else, we\n // have an excess of parents, and we'll need to keep the \"..\".\n if (piece === '..') {\n if (positive) {\n addTrailingSlash = true;\n positive--;\n pointer--;\n } else if (rel) {\n // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute\n // URL, protocol relative URL, or an absolute path, we don't need to keep excess.\n pieces[pointer++] = piece;\n }\n continue;\n }\n\n // We've encountered a real directory. Move it to the next insertion pointer, which accounts for\n // any popped or dropped directories.\n pieces[pointer++] = piece;\n positive++;\n }\n\n let path = '';\n for (let i = 1; i < pointer; i++) {\n path += '/' + pieces[i];\n }\n if (!path || (addTrailingSlash && !path.endsWith('/..'))) {\n path += '/';\n }\n url.path = path;\n}\n\n/**\n * Attempts to resolve `input` URL/path relative to `base`.\n */\nexport default function resolve(input: string, base: string | undefined): string {\n if (!input && !base) return '';\n\n const url = parseUrl(input);\n let inputType = url.type;\n\n if (base && inputType !== UrlType.Absolute) {\n const baseUrl = parseUrl(base);\n const baseType = baseUrl.type;\n\n switch (inputType) {\n case UrlType.Empty:\n url.hash = baseUrl.hash;\n // fall through\n\n case UrlType.Hash:\n url.query = baseUrl.query;\n // fall through\n\n case UrlType.Query:\n case UrlType.RelativePath:\n mergePaths(url, baseUrl);\n // fall through\n\n case UrlType.AbsolutePath:\n // The host, user, and port are joined, you can't copy one without the others.\n url.user = baseUrl.user;\n url.host = baseUrl.host;\n url.port = baseUrl.port;\n // fall through\n\n case UrlType.SchemeRelative:\n // The input doesn't have a schema at least, so we need to copy at least that over.\n url.scheme = baseUrl.scheme;\n }\n if (baseType > inputType) inputType = baseType;\n }\n\n normalizePath(url, inputType);\n\n const queryHash = url.query + url.hash;\n switch (inputType) {\n // This is impossible, because of the empty checks at the start of the function.\n // case UrlType.Empty:\n\n case UrlType.Hash:\n case UrlType.Query:\n return queryHash;\n\n case UrlType.RelativePath: {\n // The first char is always a \"/\", and we need it to be relative.\n const path = url.path.slice(1);\n\n if (!path) return queryHash || '.';\n\n if (isRelative(base || input) && !isRelative(path)) {\n // If base started with a leading \".\", or there is no base and input started with a \".\",\n // then we need to ensure that the relative path starts with a \".\". We don't know if\n // relative starts with a \"..\", though, so check before prepending.\n return './' + path + queryHash;\n }\n\n return path + queryHash;\n }\n\n case UrlType.AbsolutePath:\n return url.path + queryHash;\n\n default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AAG,SAAS,CAAC;YAE9B;gBACE,OAAO,GAAG,CAAC,MAAM,GAAG,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC;SACpF;IACH;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts b/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts new file mode 100644 index 0000000..b7f0b3b --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts @@ -0,0 +1,4 @@ +/** + * Attempts to resolve `input` URL/path relative to `base`. + */ +export default function resolve(input: string, base: string | undefined): string; diff --git a/node_modules/@jridgewell/resolve-uri/package.json b/node_modules/@jridgewell/resolve-uri/package.json new file mode 100644 index 0000000..02a4c51 --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/package.json @@ -0,0 +1,69 @@ +{ + "name": "@jridgewell/resolve-uri", + "version": "3.1.2", + "description": "Resolve a URI relative to an optional base URI", + "keywords": [ + "resolve", + "uri", + "url", + "path" + ], + "author": "Justin Ridgewell ", + "license": "MIT", + "repository": "https://github.com/jridgewell/resolve-uri", + "main": "dist/resolve-uri.umd.js", + "module": "dist/resolve-uri.mjs", + "types": "dist/types/resolve-uri.d.ts", + "exports": { + ".": [ + { + "types": "./dist/types/resolve-uri.d.ts", + "browser": "./dist/resolve-uri.umd.js", + "require": "./dist/resolve-uri.umd.js", + "import": "./dist/resolve-uri.mjs" + }, + "./dist/resolve-uri.umd.js" + ], + "./package.json": "./package.json" + }, + "files": [ + "dist" + ], + "engines": { + "node": ">=6.0.0" + }, + "scripts": { + "prebuild": "rm -rf dist", + "build": "run-s -n build:*", + "build:rollup": "rollup -c rollup.config.js", + "build:ts": "tsc --project tsconfig.build.json", + "lint": "run-s -n lint:*", + "lint:prettier": "npm run test:lint:prettier -- --write", + "lint:ts": "npm run test:lint:ts -- --fix", + "pretest": "run-s build:rollup", + "test": "run-s -n test:lint test:only", + "test:debug": "mocha --inspect-brk", + "test:lint": "run-s -n test:lint:*", + "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'", + "test:lint:ts": "eslint '{src,test}/**/*.ts'", + "test:only": "mocha", + "test:coverage": "c8 mocha", + "test:watch": "mocha --watch", + "prepublishOnly": "npm run preversion", + "preversion": "run-s test build" + }, + "devDependencies": { + "@jridgewell/resolve-uri-latest": "npm:@jridgewell/resolve-uri@*", + "@rollup/plugin-typescript": "8.3.0", + "@typescript-eslint/eslint-plugin": "5.10.0", + "@typescript-eslint/parser": "5.10.0", + "c8": "7.11.0", + "eslint": "8.7.0", + "eslint-config-prettier": "8.3.0", + "mocha": "9.2.0", + "npm-run-all": "4.1.5", + "prettier": "2.5.1", + "rollup": "2.66.0", + "typescript": "4.5.5" + } +} diff --git a/node_modules/@jridgewell/sourcemap-codec/LICENSE b/node_modules/@jridgewell/sourcemap-codec/LICENSE new file mode 100644 index 0000000..a331065 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2015 Rich Harris + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/@jridgewell/sourcemap-codec/README.md b/node_modules/@jridgewell/sourcemap-codec/README.md new file mode 100644 index 0000000..b3e0708 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/README.md @@ -0,0 +1,264 @@ +# @jridgewell/sourcemap-codec + +Encode/decode the `mappings` property of a [sourcemap](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit). + + +## Why? + +Sourcemaps are difficult to generate and manipulate, because the `mappings` property – the part that actually links the generated code back to the original source – is encoded using an obscure method called [Variable-length quantity](https://en.wikipedia.org/wiki/Variable-length_quantity). On top of that, each segment in the mapping contains offsets rather than absolute indices, which means that you can't look at a segment in isolation – you have to understand the whole sourcemap. + +This package makes the process slightly easier. + + +## Installation + +```bash +npm install @jridgewell/sourcemap-codec +``` + + +## Usage + +```js +import { encode, decode } from '@jridgewell/sourcemap-codec'; + +var decoded = decode( ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' ); + +assert.deepEqual( decoded, [ + // the first line (of the generated code) has no mappings, + // as shown by the starting semi-colon (which separates lines) + [], + + // the second line contains four (comma-separated) segments + [ + // segments are encoded as you'd expect: + // [ generatedCodeColumn, sourceIndex, sourceCodeLine, sourceCodeColumn, nameIndex ] + + // i.e. the first segment begins at column 2, and maps back to the second column + // of the second line (both zero-based) of the 0th source, and uses the 0th + // name in the `map.names` array + [ 2, 0, 2, 2, 0 ], + + // the remaining segments are 4-length rather than 5-length, + // because they don't map a name + [ 4, 0, 2, 4 ], + [ 6, 0, 2, 5 ], + [ 7, 0, 2, 7 ] + ], + + // the final line contains two segments + [ + [ 2, 1, 10, 19 ], + [ 12, 1, 11, 20 ] + ] +]); + +var encoded = encode( decoded ); +assert.equal( encoded, ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' ); +``` + +## Benchmarks + +``` +node v20.10.0 + +amp.js.map - 45120 segments + +Decode Memory Usage: +local code 5815135 bytes +@jridgewell/sourcemap-codec 1.4.15 5868160 bytes +sourcemap-codec 5492584 bytes +source-map-0.6.1 13569984 bytes +source-map-0.8.0 6390584 bytes +chrome dev tools 8011136 bytes +Smallest memory usage is sourcemap-codec + +Decode speed: +decode: local code x 492 ops/sec ±1.22% (90 runs sampled) +decode: @jridgewell/sourcemap-codec 1.4.15 x 499 ops/sec ±1.16% (89 runs sampled) +decode: sourcemap-codec x 376 ops/sec ±1.66% (89 runs sampled) +decode: source-map-0.6.1 x 34.99 ops/sec ±0.94% (48 runs sampled) +decode: source-map-0.8.0 x 351 ops/sec ±0.07% (95 runs sampled) +chrome dev tools x 165 ops/sec ±0.91% (86 runs sampled) +Fastest is decode: @jridgewell/sourcemap-codec 1.4.15 + +Encode Memory Usage: +local code 444248 bytes +@jridgewell/sourcemap-codec 1.4.15 623024 bytes +sourcemap-codec 8696280 bytes +source-map-0.6.1 8745176 bytes +source-map-0.8.0 8736624 bytes +Smallest memory usage is local code + +Encode speed: +encode: local code x 796 ops/sec ±0.11% (97 runs sampled) +encode: @jridgewell/sourcemap-codec 1.4.15 x 795 ops/sec ±0.25% (98 runs sampled) +encode: sourcemap-codec x 231 ops/sec ±0.83% (86 runs sampled) +encode: source-map-0.6.1 x 166 ops/sec ±0.57% (86 runs sampled) +encode: source-map-0.8.0 x 203 ops/sec ±0.45% (88 runs sampled) +Fastest is encode: local code,encode: @jridgewell/sourcemap-codec 1.4.15 + + +*** + + +babel.min.js.map - 347793 segments + +Decode Memory Usage: +local code 35424960 bytes +@jridgewell/sourcemap-codec 1.4.15 35424696 bytes +sourcemap-codec 36033464 bytes +source-map-0.6.1 62253704 bytes +source-map-0.8.0 43843920 bytes +chrome dev tools 45111400 bytes +Smallest memory usage is @jridgewell/sourcemap-codec 1.4.15 + +Decode speed: +decode: local code x 38.18 ops/sec ±5.44% (52 runs sampled) +decode: @jridgewell/sourcemap-codec 1.4.15 x 38.36 ops/sec ±5.02% (52 runs sampled) +decode: sourcemap-codec x 34.05 ops/sec ±4.45% (47 runs sampled) +decode: source-map-0.6.1 x 4.31 ops/sec ±2.76% (15 runs sampled) +decode: source-map-0.8.0 x 55.60 ops/sec ±0.13% (73 runs sampled) +chrome dev tools x 16.94 ops/sec ±3.78% (46 runs sampled) +Fastest is decode: source-map-0.8.0 + +Encode Memory Usage: +local code 2606016 bytes +@jridgewell/sourcemap-codec 1.4.15 2626440 bytes +sourcemap-codec 21152576 bytes +source-map-0.6.1 25023928 bytes +source-map-0.8.0 25256448 bytes +Smallest memory usage is local code + +Encode speed: +encode: local code x 127 ops/sec ±0.18% (83 runs sampled) +encode: @jridgewell/sourcemap-codec 1.4.15 x 128 ops/sec ±0.26% (83 runs sampled) +encode: sourcemap-codec x 29.31 ops/sec ±2.55% (53 runs sampled) +encode: source-map-0.6.1 x 18.85 ops/sec ±3.19% (36 runs sampled) +encode: source-map-0.8.0 x 19.34 ops/sec ±1.97% (36 runs sampled) +Fastest is encode: @jridgewell/sourcemap-codec 1.4.15 + + +*** + + +preact.js.map - 1992 segments + +Decode Memory Usage: +local code 261696 bytes +@jridgewell/sourcemap-codec 1.4.15 244296 bytes +sourcemap-codec 302816 bytes +source-map-0.6.1 939176 bytes +source-map-0.8.0 336 bytes +chrome dev tools 587368 bytes +Smallest memory usage is source-map-0.8.0 + +Decode speed: +decode: local code x 17,782 ops/sec ±0.32% (97 runs sampled) +decode: @jridgewell/sourcemap-codec 1.4.15 x 17,863 ops/sec ±0.40% (100 runs sampled) +decode: sourcemap-codec x 12,453 ops/sec ±0.27% (101 runs sampled) +decode: source-map-0.6.1 x 1,288 ops/sec ±1.05% (96 runs sampled) +decode: source-map-0.8.0 x 9,289 ops/sec ±0.27% (101 runs sampled) +chrome dev tools x 4,769 ops/sec ±0.18% (100 runs sampled) +Fastest is decode: @jridgewell/sourcemap-codec 1.4.15 + +Encode Memory Usage: +local code 262944 bytes +@jridgewell/sourcemap-codec 1.4.15 25544 bytes +sourcemap-codec 323048 bytes +source-map-0.6.1 507808 bytes +source-map-0.8.0 507480 bytes +Smallest memory usage is @jridgewell/sourcemap-codec 1.4.15 + +Encode speed: +encode: local code x 24,207 ops/sec ±0.79% (95 runs sampled) +encode: @jridgewell/sourcemap-codec 1.4.15 x 24,288 ops/sec ±0.48% (96 runs sampled) +encode: sourcemap-codec x 6,761 ops/sec ±0.21% (100 runs sampled) +encode: source-map-0.6.1 x 5,374 ops/sec ±0.17% (99 runs sampled) +encode: source-map-0.8.0 x 5,633 ops/sec ±0.32% (99 runs sampled) +Fastest is encode: @jridgewell/sourcemap-codec 1.4.15,encode: local code + + +*** + + +react.js.map - 5726 segments + +Decode Memory Usage: +local code 678816 bytes +@jridgewell/sourcemap-codec 1.4.15 678816 bytes +sourcemap-codec 816400 bytes +source-map-0.6.1 2288864 bytes +source-map-0.8.0 721360 bytes +chrome dev tools 1012512 bytes +Smallest memory usage is local code + +Decode speed: +decode: local code x 6,178 ops/sec ±0.19% (98 runs sampled) +decode: @jridgewell/sourcemap-codec 1.4.15 x 6,261 ops/sec ±0.22% (100 runs sampled) +decode: sourcemap-codec x 4,472 ops/sec ±0.90% (99 runs sampled) +decode: source-map-0.6.1 x 449 ops/sec ±0.31% (95 runs sampled) +decode: source-map-0.8.0 x 3,219 ops/sec ±0.13% (100 runs sampled) +chrome dev tools x 1,743 ops/sec ±0.20% (99 runs sampled) +Fastest is decode: @jridgewell/sourcemap-codec 1.4.15 + +Encode Memory Usage: +local code 140960 bytes +@jridgewell/sourcemap-codec 1.4.15 159808 bytes +sourcemap-codec 969304 bytes +source-map-0.6.1 930520 bytes +source-map-0.8.0 930248 bytes +Smallest memory usage is local code + +Encode speed: +encode: local code x 8,013 ops/sec ±0.19% (100 runs sampled) +encode: @jridgewell/sourcemap-codec 1.4.15 x 7,989 ops/sec ±0.20% (101 runs sampled) +encode: sourcemap-codec x 2,472 ops/sec ±0.21% (99 runs sampled) +encode: source-map-0.6.1 x 2,200 ops/sec ±0.17% (99 runs sampled) +encode: source-map-0.8.0 x 2,220 ops/sec ±0.37% (99 runs sampled) +Fastest is encode: local code + + +*** + + +vscode.map - 2141001 segments + +Decode Memory Usage: +local code 198955264 bytes +@jridgewell/sourcemap-codec 1.4.15 199175352 bytes +sourcemap-codec 199102688 bytes +source-map-0.6.1 386323432 bytes +source-map-0.8.0 244116432 bytes +chrome dev tools 293734280 bytes +Smallest memory usage is local code + +Decode speed: +decode: local code x 3.90 ops/sec ±22.21% (15 runs sampled) +decode: @jridgewell/sourcemap-codec 1.4.15 x 3.95 ops/sec ±23.53% (15 runs sampled) +decode: sourcemap-codec x 3.82 ops/sec ±17.94% (14 runs sampled) +decode: source-map-0.6.1 x 0.61 ops/sec ±7.81% (6 runs sampled) +decode: source-map-0.8.0 x 9.54 ops/sec ±0.28% (28 runs sampled) +chrome dev tools x 2.18 ops/sec ±10.58% (10 runs sampled) +Fastest is decode: source-map-0.8.0 + +Encode Memory Usage: +local code 13509880 bytes +@jridgewell/sourcemap-codec 1.4.15 13537648 bytes +sourcemap-codec 32540104 bytes +source-map-0.6.1 127531040 bytes +source-map-0.8.0 127535312 bytes +Smallest memory usage is local code + +Encode speed: +encode: local code x 20.10 ops/sec ±0.19% (38 runs sampled) +encode: @jridgewell/sourcemap-codec 1.4.15 x 20.26 ops/sec ±0.32% (38 runs sampled) +encode: sourcemap-codec x 5.44 ops/sec ±1.64% (18 runs sampled) +encode: source-map-0.6.1 x 2.30 ops/sec ±4.79% (10 runs sampled) +encode: source-map-0.8.0 x 2.46 ops/sec ±6.53% (10 runs sampled) +Fastest is encode: @jridgewell/sourcemap-codec 1.4.15 +``` + +# License + +MIT diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs new file mode 100644 index 0000000..60e17b3 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs @@ -0,0 +1,424 @@ +const comma = ','.charCodeAt(0); +const semicolon = ';'.charCodeAt(0); +const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; +const intToChar = new Uint8Array(64); // 64 possible chars. +const charToInt = new Uint8Array(128); // z is 122 in ASCII +for (let i = 0; i < chars.length; i++) { + const c = chars.charCodeAt(i); + intToChar[i] = c; + charToInt[c] = i; +} +function decodeInteger(reader, relative) { + let value = 0; + let shift = 0; + let integer = 0; + do { + const c = reader.next(); + integer = charToInt[c]; + value |= (integer & 31) << shift; + shift += 5; + } while (integer & 32); + const shouldNegate = value & 1; + value >>>= 1; + if (shouldNegate) { + value = -0x80000000 | -value; + } + return relative + value; +} +function encodeInteger(builder, num, relative) { + let delta = num - relative; + delta = delta < 0 ? (-delta << 1) | 1 : delta << 1; + do { + let clamped = delta & 0b011111; + delta >>>= 5; + if (delta > 0) + clamped |= 0b100000; + builder.write(intToChar[clamped]); + } while (delta > 0); + return num; +} +function hasMoreVlq(reader, max) { + if (reader.pos >= max) + return false; + return reader.peek() !== comma; +} + +const bufLength = 1024 * 16; +// Provide a fallback for older environments. +const td = typeof TextDecoder !== 'undefined' + ? /* #__PURE__ */ new TextDecoder() + : typeof Buffer !== 'undefined' + ? { + decode(buf) { + const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); + return out.toString(); + }, + } + : { + decode(buf) { + let out = ''; + for (let i = 0; i < buf.length; i++) { + out += String.fromCharCode(buf[i]); + } + return out; + }, + }; +class StringWriter { + constructor() { + this.pos = 0; + this.out = ''; + this.buffer = new Uint8Array(bufLength); + } + write(v) { + const { buffer } = this; + buffer[this.pos++] = v; + if (this.pos === bufLength) { + this.out += td.decode(buffer); + this.pos = 0; + } + } + flush() { + const { buffer, out, pos } = this; + return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out; + } +} +class StringReader { + constructor(buffer) { + this.pos = 0; + this.buffer = buffer; + } + next() { + return this.buffer.charCodeAt(this.pos++); + } + peek() { + return this.buffer.charCodeAt(this.pos); + } + indexOf(char) { + const { buffer, pos } = this; + const idx = buffer.indexOf(char, pos); + return idx === -1 ? buffer.length : idx; + } +} + +const EMPTY = []; +function decodeOriginalScopes(input) { + const { length } = input; + const reader = new StringReader(input); + const scopes = []; + const stack = []; + let line = 0; + for (; reader.pos < length; reader.pos++) { + line = decodeInteger(reader, line); + const column = decodeInteger(reader, 0); + if (!hasMoreVlq(reader, length)) { + const last = stack.pop(); + last[2] = line; + last[3] = column; + continue; + } + const kind = decodeInteger(reader, 0); + const fields = decodeInteger(reader, 0); + const hasName = fields & 0b0001; + const scope = (hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind]); + let vars = EMPTY; + if (hasMoreVlq(reader, length)) { + vars = []; + do { + const varsIndex = decodeInteger(reader, 0); + vars.push(varsIndex); + } while (hasMoreVlq(reader, length)); + } + scope.vars = vars; + scopes.push(scope); + stack.push(scope); + } + return scopes; +} +function encodeOriginalScopes(scopes) { + const writer = new StringWriter(); + for (let i = 0; i < scopes.length;) { + i = _encodeOriginalScopes(scopes, i, writer, [0]); + } + return writer.flush(); +} +function _encodeOriginalScopes(scopes, index, writer, state) { + const scope = scopes[index]; + const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope; + if (index > 0) + writer.write(comma); + state[0] = encodeInteger(writer, startLine, state[0]); + encodeInteger(writer, startColumn, 0); + encodeInteger(writer, kind, 0); + const fields = scope.length === 6 ? 0b0001 : 0; + encodeInteger(writer, fields, 0); + if (scope.length === 6) + encodeInteger(writer, scope[5], 0); + for (const v of vars) { + encodeInteger(writer, v, 0); + } + for (index++; index < scopes.length;) { + const next = scopes[index]; + const { 0: l, 1: c } = next; + if (l > endLine || (l === endLine && c >= endColumn)) { + break; + } + index = _encodeOriginalScopes(scopes, index, writer, state); + } + writer.write(comma); + state[0] = encodeInteger(writer, endLine, state[0]); + encodeInteger(writer, endColumn, 0); + return index; +} +function decodeGeneratedRanges(input) { + const { length } = input; + const reader = new StringReader(input); + const ranges = []; + const stack = []; + let genLine = 0; + let definitionSourcesIndex = 0; + let definitionScopeIndex = 0; + let callsiteSourcesIndex = 0; + let callsiteLine = 0; + let callsiteColumn = 0; + let bindingLine = 0; + let bindingColumn = 0; + do { + const semi = reader.indexOf(';'); + let genColumn = 0; + for (; reader.pos < semi; reader.pos++) { + genColumn = decodeInteger(reader, genColumn); + if (!hasMoreVlq(reader, semi)) { + const last = stack.pop(); + last[2] = genLine; + last[3] = genColumn; + continue; + } + const fields = decodeInteger(reader, 0); + const hasDefinition = fields & 0b0001; + const hasCallsite = fields & 0b0010; + const hasScope = fields & 0b0100; + let callsite = null; + let bindings = EMPTY; + let range; + if (hasDefinition) { + const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex); + definitionScopeIndex = decodeInteger(reader, definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0); + definitionSourcesIndex = defSourcesIndex; + range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex]; + } + else { + range = [genLine, genColumn, 0, 0]; + } + range.isScope = !!hasScope; + if (hasCallsite) { + const prevCsi = callsiteSourcesIndex; + const prevLine = callsiteLine; + callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex); + const sameSource = prevCsi === callsiteSourcesIndex; + callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0); + callsiteColumn = decodeInteger(reader, sameSource && prevLine === callsiteLine ? callsiteColumn : 0); + callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn]; + } + range.callsite = callsite; + if (hasMoreVlq(reader, semi)) { + bindings = []; + do { + bindingLine = genLine; + bindingColumn = genColumn; + const expressionsCount = decodeInteger(reader, 0); + let expressionRanges; + if (expressionsCount < -1) { + expressionRanges = [[decodeInteger(reader, 0)]]; + for (let i = -1; i > expressionsCount; i--) { + const prevBl = bindingLine; + bindingLine = decodeInteger(reader, bindingLine); + bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0); + const expression = decodeInteger(reader, 0); + expressionRanges.push([expression, bindingLine, bindingColumn]); + } + } + else { + expressionRanges = [[expressionsCount]]; + } + bindings.push(expressionRanges); + } while (hasMoreVlq(reader, semi)); + } + range.bindings = bindings; + ranges.push(range); + stack.push(range); + } + genLine++; + reader.pos = semi + 1; + } while (reader.pos < length); + return ranges; +} +function encodeGeneratedRanges(ranges) { + if (ranges.length === 0) + return ''; + const writer = new StringWriter(); + for (let i = 0; i < ranges.length;) { + i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]); + } + return writer.flush(); +} +function _encodeGeneratedRanges(ranges, index, writer, state) { + const range = ranges[index]; + const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, isScope, callsite, bindings, } = range; + if (state[0] < startLine) { + catchupLine(writer, state[0], startLine); + state[0] = startLine; + state[1] = 0; + } + else if (index > 0) { + writer.write(comma); + } + state[1] = encodeInteger(writer, range[1], state[1]); + const fields = (range.length === 6 ? 0b0001 : 0) | (callsite ? 0b0010 : 0) | (isScope ? 0b0100 : 0); + encodeInteger(writer, fields, 0); + if (range.length === 6) { + const { 4: sourcesIndex, 5: scopesIndex } = range; + if (sourcesIndex !== state[2]) { + state[3] = 0; + } + state[2] = encodeInteger(writer, sourcesIndex, state[2]); + state[3] = encodeInteger(writer, scopesIndex, state[3]); + } + if (callsite) { + const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite; + if (sourcesIndex !== state[4]) { + state[5] = 0; + state[6] = 0; + } + else if (callLine !== state[5]) { + state[6] = 0; + } + state[4] = encodeInteger(writer, sourcesIndex, state[4]); + state[5] = encodeInteger(writer, callLine, state[5]); + state[6] = encodeInteger(writer, callColumn, state[6]); + } + if (bindings) { + for (const binding of bindings) { + if (binding.length > 1) + encodeInteger(writer, -binding.length, 0); + const expression = binding[0][0]; + encodeInteger(writer, expression, 0); + let bindingStartLine = startLine; + let bindingStartColumn = startColumn; + for (let i = 1; i < binding.length; i++) { + const expRange = binding[i]; + bindingStartLine = encodeInteger(writer, expRange[1], bindingStartLine); + bindingStartColumn = encodeInteger(writer, expRange[2], bindingStartColumn); + encodeInteger(writer, expRange[0], 0); + } + } + } + for (index++; index < ranges.length;) { + const next = ranges[index]; + const { 0: l, 1: c } = next; + if (l > endLine || (l === endLine && c >= endColumn)) { + break; + } + index = _encodeGeneratedRanges(ranges, index, writer, state); + } + if (state[0] < endLine) { + catchupLine(writer, state[0], endLine); + state[0] = endLine; + state[1] = 0; + } + else { + writer.write(comma); + } + state[1] = encodeInteger(writer, endColumn, state[1]); + return index; +} +function catchupLine(writer, lastLine, line) { + do { + writer.write(semicolon); + } while (++lastLine < line); +} + +function decode(mappings) { + const { length } = mappings; + const reader = new StringReader(mappings); + const decoded = []; + let genColumn = 0; + let sourcesIndex = 0; + let sourceLine = 0; + let sourceColumn = 0; + let namesIndex = 0; + do { + const semi = reader.indexOf(';'); + const line = []; + let sorted = true; + let lastCol = 0; + genColumn = 0; + while (reader.pos < semi) { + let seg; + genColumn = decodeInteger(reader, genColumn); + if (genColumn < lastCol) + sorted = false; + lastCol = genColumn; + if (hasMoreVlq(reader, semi)) { + sourcesIndex = decodeInteger(reader, sourcesIndex); + sourceLine = decodeInteger(reader, sourceLine); + sourceColumn = decodeInteger(reader, sourceColumn); + if (hasMoreVlq(reader, semi)) { + namesIndex = decodeInteger(reader, namesIndex); + seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]; + } + else { + seg = [genColumn, sourcesIndex, sourceLine, sourceColumn]; + } + } + else { + seg = [genColumn]; + } + line.push(seg); + reader.pos++; + } + if (!sorted) + sort(line); + decoded.push(line); + reader.pos = semi + 1; + } while (reader.pos <= length); + return decoded; +} +function sort(line) { + line.sort(sortComparator); +} +function sortComparator(a, b) { + return a[0] - b[0]; +} +function encode(decoded) { + const writer = new StringWriter(); + let sourcesIndex = 0; + let sourceLine = 0; + let sourceColumn = 0; + let namesIndex = 0; + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + if (i > 0) + writer.write(semicolon); + if (line.length === 0) + continue; + let genColumn = 0; + for (let j = 0; j < line.length; j++) { + const segment = line[j]; + if (j > 0) + writer.write(comma); + genColumn = encodeInteger(writer, segment[0], genColumn); + if (segment.length === 1) + continue; + sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex); + sourceLine = encodeInteger(writer, segment[2], sourceLine); + sourceColumn = encodeInteger(writer, segment[3], sourceColumn); + if (segment.length === 4) + continue; + namesIndex = encodeInteger(writer, segment[4], namesIndex); + } + } + return writer.flush(); +} + +export { decode, decodeGeneratedRanges, decodeOriginalScopes, encode, encodeGeneratedRanges, encodeOriginalScopes }; +//# sourceMappingURL=sourcemap-codec.mjs.map diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map new file mode 100644 index 0000000..7388228 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"sourcemap-codec.mjs","sources":["../src/vlq.ts","../src/strings.ts","../src/scopes.ts","../src/sourcemap-codec.ts"],"sourcesContent":["import type { StringReader, StringWriter } from './strings';\n\nexport const comma = ','.charCodeAt(0);\nexport const semicolon = ';'.charCodeAt(0);\n\nconst chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nconst intToChar = new Uint8Array(64); // 64 possible chars.\nconst charToInt = new Uint8Array(128); // z is 122 in ASCII\n\nfor (let i = 0; i < chars.length; i++) {\n const c = chars.charCodeAt(i);\n intToChar[i] = c;\n charToInt[c] = i;\n}\n\nexport function decodeInteger(reader: StringReader, relative: number): number {\n let value = 0;\n let shift = 0;\n let integer = 0;\n\n do {\n const c = reader.next();\n integer = charToInt[c];\n value |= (integer & 31) << shift;\n shift += 5;\n } while (integer & 32);\n\n const shouldNegate = value & 1;\n value >>>= 1;\n\n if (shouldNegate) {\n value = -0x80000000 | -value;\n }\n\n return relative + value;\n}\n\nexport function encodeInteger(builder: StringWriter, num: number, relative: number): number {\n let delta = num - relative;\n\n delta = delta < 0 ? (-delta << 1) | 1 : delta << 1;\n do {\n let clamped = delta & 0b011111;\n delta >>>= 5;\n if (delta > 0) clamped |= 0b100000;\n builder.write(intToChar[clamped]);\n } while (delta > 0);\n\n return num;\n}\n\nexport function hasMoreVlq(reader: StringReader, max: number) {\n if (reader.pos >= max) return false;\n return reader.peek() !== comma;\n}\n","const bufLength = 1024 * 16;\n\n// Provide a fallback for older environments.\nconst td =\n typeof TextDecoder !== 'undefined'\n ? /* #__PURE__ */ new TextDecoder()\n : typeof Buffer !== 'undefined'\n ? {\n decode(buf: Uint8Array): string {\n const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);\n return out.toString();\n },\n }\n : {\n decode(buf: Uint8Array): string {\n let out = '';\n for (let i = 0; i < buf.length; i++) {\n out += String.fromCharCode(buf[i]);\n }\n return out;\n },\n };\n\nexport class StringWriter {\n pos = 0;\n private out = '';\n private buffer = new Uint8Array(bufLength);\n\n write(v: number): void {\n const { buffer } = this;\n buffer[this.pos++] = v;\n if (this.pos === bufLength) {\n this.out += td.decode(buffer);\n this.pos = 0;\n }\n }\n\n flush(): string {\n const { buffer, out, pos } = this;\n return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;\n }\n}\n\nexport class StringReader {\n pos = 0;\n private declare buffer: string;\n\n constructor(buffer: string) {\n this.buffer = buffer;\n }\n\n next(): number {\n return this.buffer.charCodeAt(this.pos++);\n }\n\n peek(): number {\n return this.buffer.charCodeAt(this.pos);\n }\n\n indexOf(char: string): number {\n const { buffer, pos } = this;\n const idx = buffer.indexOf(char, pos);\n return idx === -1 ? buffer.length : idx;\n }\n}\n","import { StringReader, StringWriter } from './strings';\nimport { comma, decodeInteger, encodeInteger, hasMoreVlq, semicolon } from './vlq';\n\nconst EMPTY: any[] = [];\n\ntype Line = number;\ntype Column = number;\ntype Kind = number;\ntype Name = number;\ntype Var = number;\ntype SourcesIndex = number;\ntype ScopesIndex = number;\n\ntype Mix = (A & O) | (B & O);\n\nexport type OriginalScope = Mix<\n [Line, Column, Line, Column, Kind],\n [Line, Column, Line, Column, Kind, Name],\n { vars: Var[] }\n>;\n\nexport type GeneratedRange = Mix<\n [Line, Column, Line, Column],\n [Line, Column, Line, Column, SourcesIndex, ScopesIndex],\n {\n callsite: CallSite | null;\n bindings: Binding[];\n isScope: boolean;\n }\n>;\nexport type CallSite = [SourcesIndex, Line, Column];\ntype Binding = BindingExpressionRange[];\nexport type BindingExpressionRange = [Name] | [Name, Line, Column];\n\nexport function decodeOriginalScopes(input: string): OriginalScope[] {\n const { length } = input;\n const reader = new StringReader(input);\n const scopes: OriginalScope[] = [];\n const stack: OriginalScope[] = [];\n let line = 0;\n\n for (; reader.pos < length; reader.pos++) {\n line = decodeInteger(reader, line);\n const column = decodeInteger(reader, 0);\n\n if (!hasMoreVlq(reader, length)) {\n const last = stack.pop()!;\n last[2] = line;\n last[3] = column;\n continue;\n }\n\n const kind = decodeInteger(reader, 0);\n const fields = decodeInteger(reader, 0);\n const hasName = fields & 0b0001;\n\n const scope: OriginalScope = (\n hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind]\n ) as OriginalScope;\n\n let vars: Var[] = EMPTY;\n if (hasMoreVlq(reader, length)) {\n vars = [];\n do {\n const varsIndex = decodeInteger(reader, 0);\n vars.push(varsIndex);\n } while (hasMoreVlq(reader, length));\n }\n scope.vars = vars;\n\n scopes.push(scope);\n stack.push(scope);\n }\n\n return scopes;\n}\n\nexport function encodeOriginalScopes(scopes: OriginalScope[]): string {\n const writer = new StringWriter();\n\n for (let i = 0; i < scopes.length; ) {\n i = _encodeOriginalScopes(scopes, i, writer, [0]);\n }\n\n return writer.flush();\n}\n\nfunction _encodeOriginalScopes(\n scopes: OriginalScope[],\n index: number,\n writer: StringWriter,\n state: [\n number, // GenColumn\n ],\n): number {\n const scope = scopes[index];\n const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope;\n\n if (index > 0) writer.write(comma);\n\n state[0] = encodeInteger(writer, startLine, state[0]);\n encodeInteger(writer, startColumn, 0);\n encodeInteger(writer, kind, 0);\n\n const fields = scope.length === 6 ? 0b0001 : 0;\n encodeInteger(writer, fields, 0);\n if (scope.length === 6) encodeInteger(writer, scope[5], 0);\n\n for (const v of vars) {\n encodeInteger(writer, v, 0);\n }\n\n for (index++; index < scopes.length; ) {\n const next = scopes[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || (l === endLine && c >= endColumn)) {\n break;\n }\n index = _encodeOriginalScopes(scopes, index, writer, state);\n }\n\n writer.write(comma);\n state[0] = encodeInteger(writer, endLine, state[0]);\n encodeInteger(writer, endColumn, 0);\n\n return index;\n}\n\nexport function decodeGeneratedRanges(input: string): GeneratedRange[] {\n const { length } = input;\n const reader = new StringReader(input);\n const ranges: GeneratedRange[] = [];\n const stack: GeneratedRange[] = [];\n\n let genLine = 0;\n let definitionSourcesIndex = 0;\n let definitionScopeIndex = 0;\n let callsiteSourcesIndex = 0;\n let callsiteLine = 0;\n let callsiteColumn = 0;\n let bindingLine = 0;\n let bindingColumn = 0;\n\n do {\n const semi = reader.indexOf(';');\n let genColumn = 0;\n\n for (; reader.pos < semi; reader.pos++) {\n genColumn = decodeInteger(reader, genColumn);\n\n if (!hasMoreVlq(reader, semi)) {\n const last = stack.pop()!;\n last[2] = genLine;\n last[3] = genColumn;\n continue;\n }\n\n const fields = decodeInteger(reader, 0);\n const hasDefinition = fields & 0b0001;\n const hasCallsite = fields & 0b0010;\n const hasScope = fields & 0b0100;\n\n let callsite: CallSite | null = null;\n let bindings: Binding[] = EMPTY;\n let range: GeneratedRange;\n if (hasDefinition) {\n const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex);\n definitionScopeIndex = decodeInteger(\n reader,\n definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0,\n );\n\n definitionSourcesIndex = defSourcesIndex;\n range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex] as GeneratedRange;\n } else {\n range = [genLine, genColumn, 0, 0] as GeneratedRange;\n }\n\n range.isScope = !!hasScope;\n\n if (hasCallsite) {\n const prevCsi = callsiteSourcesIndex;\n const prevLine = callsiteLine;\n callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex);\n const sameSource = prevCsi === callsiteSourcesIndex;\n callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0);\n callsiteColumn = decodeInteger(\n reader,\n sameSource && prevLine === callsiteLine ? callsiteColumn : 0,\n );\n\n callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn];\n }\n range.callsite = callsite;\n\n if (hasMoreVlq(reader, semi)) {\n bindings = [];\n do {\n bindingLine = genLine;\n bindingColumn = genColumn;\n const expressionsCount = decodeInteger(reader, 0);\n let expressionRanges: BindingExpressionRange[];\n if (expressionsCount < -1) {\n expressionRanges = [[decodeInteger(reader, 0)]];\n for (let i = -1; i > expressionsCount; i--) {\n const prevBl = bindingLine;\n bindingLine = decodeInteger(reader, bindingLine);\n bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0);\n const expression = decodeInteger(reader, 0);\n expressionRanges.push([expression, bindingLine, bindingColumn]);\n }\n } else {\n expressionRanges = [[expressionsCount]];\n }\n bindings.push(expressionRanges);\n } while (hasMoreVlq(reader, semi));\n }\n range.bindings = bindings;\n\n ranges.push(range);\n stack.push(range);\n }\n\n genLine++;\n reader.pos = semi + 1;\n } while (reader.pos < length);\n\n return ranges;\n}\n\nexport function encodeGeneratedRanges(ranges: GeneratedRange[]): string {\n if (ranges.length === 0) return '';\n\n const writer = new StringWriter();\n\n for (let i = 0; i < ranges.length; ) {\n i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]);\n }\n\n return writer.flush();\n}\n\nfunction _encodeGeneratedRanges(\n ranges: GeneratedRange[],\n index: number,\n writer: StringWriter,\n state: [\n number, // GenLine\n number, // GenColumn\n number, // DefSourcesIndex\n number, // DefScopesIndex\n number, // CallSourcesIndex\n number, // CallLine\n number, // CallColumn\n ],\n): number {\n const range = ranges[index];\n const {\n 0: startLine,\n 1: startColumn,\n 2: endLine,\n 3: endColumn,\n isScope,\n callsite,\n bindings,\n } = range;\n\n if (state[0] < startLine) {\n catchupLine(writer, state[0], startLine);\n state[0] = startLine;\n state[1] = 0;\n } else if (index > 0) {\n writer.write(comma);\n }\n\n state[1] = encodeInteger(writer, range[1], state[1]);\n\n const fields =\n (range.length === 6 ? 0b0001 : 0) | (callsite ? 0b0010 : 0) | (isScope ? 0b0100 : 0);\n encodeInteger(writer, fields, 0);\n\n if (range.length === 6) {\n const { 4: sourcesIndex, 5: scopesIndex } = range;\n if (sourcesIndex !== state[2]) {\n state[3] = 0;\n }\n state[2] = encodeInteger(writer, sourcesIndex, state[2]);\n state[3] = encodeInteger(writer, scopesIndex, state[3]);\n }\n\n if (callsite) {\n const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite!;\n if (sourcesIndex !== state[4]) {\n state[5] = 0;\n state[6] = 0;\n } else if (callLine !== state[5]) {\n state[6] = 0;\n }\n state[4] = encodeInteger(writer, sourcesIndex, state[4]);\n state[5] = encodeInteger(writer, callLine, state[5]);\n state[6] = encodeInteger(writer, callColumn, state[6]);\n }\n\n if (bindings) {\n for (const binding of bindings) {\n if (binding.length > 1) encodeInteger(writer, -binding.length, 0);\n const expression = binding[0][0];\n encodeInteger(writer, expression, 0);\n let bindingStartLine = startLine;\n let bindingStartColumn = startColumn;\n for (let i = 1; i < binding.length; i++) {\n const expRange = binding[i];\n bindingStartLine = encodeInteger(writer, expRange[1]!, bindingStartLine);\n bindingStartColumn = encodeInteger(writer, expRange[2]!, bindingStartColumn);\n encodeInteger(writer, expRange[0]!, 0);\n }\n }\n }\n\n for (index++; index < ranges.length; ) {\n const next = ranges[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || (l === endLine && c >= endColumn)) {\n break;\n }\n index = _encodeGeneratedRanges(ranges, index, writer, state);\n }\n\n if (state[0] < endLine) {\n catchupLine(writer, state[0], endLine);\n state[0] = endLine;\n state[1] = 0;\n } else {\n writer.write(comma);\n }\n state[1] = encodeInteger(writer, endColumn, state[1]);\n\n return index;\n}\n\nfunction catchupLine(writer: StringWriter, lastLine: number, line: number) {\n do {\n writer.write(semicolon);\n } while (++lastLine < line);\n}\n","import { comma, decodeInteger, encodeInteger, hasMoreVlq, semicolon } from './vlq';\nimport { StringWriter, StringReader } from './strings';\n\nexport {\n decodeOriginalScopes,\n encodeOriginalScopes,\n decodeGeneratedRanges,\n encodeGeneratedRanges,\n} from './scopes';\nexport type { OriginalScope, GeneratedRange, CallSite, BindingExpressionRange } from './scopes';\n\nexport type SourceMapSegment =\n | [number]\n | [number, number, number, number]\n | [number, number, number, number, number];\nexport type SourceMapLine = SourceMapSegment[];\nexport type SourceMapMappings = SourceMapLine[];\n\nexport function decode(mappings: string): SourceMapMappings {\n const { length } = mappings;\n const reader = new StringReader(mappings);\n const decoded: SourceMapMappings = [];\n let genColumn = 0;\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n\n do {\n const semi = reader.indexOf(';');\n const line: SourceMapLine = [];\n let sorted = true;\n let lastCol = 0;\n genColumn = 0;\n\n while (reader.pos < semi) {\n let seg: SourceMapSegment;\n\n genColumn = decodeInteger(reader, genColumn);\n if (genColumn < lastCol) sorted = false;\n lastCol = genColumn;\n\n if (hasMoreVlq(reader, semi)) {\n sourcesIndex = decodeInteger(reader, sourcesIndex);\n sourceLine = decodeInteger(reader, sourceLine);\n sourceColumn = decodeInteger(reader, sourceColumn);\n\n if (hasMoreVlq(reader, semi)) {\n namesIndex = decodeInteger(reader, namesIndex);\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex];\n } else {\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn];\n }\n } else {\n seg = [genColumn];\n }\n\n line.push(seg);\n reader.pos++;\n }\n\n if (!sorted) sort(line);\n decoded.push(line);\n reader.pos = semi + 1;\n } while (reader.pos <= length);\n\n return decoded;\n}\n\nfunction sort(line: SourceMapSegment[]) {\n line.sort(sortComparator);\n}\n\nfunction sortComparator(a: SourceMapSegment, b: SourceMapSegment): number {\n return a[0] - b[0];\n}\n\nexport function encode(decoded: SourceMapMappings): string;\nexport function encode(decoded: Readonly): string;\nexport function encode(decoded: Readonly): string {\n const writer = new StringWriter();\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n if (i > 0) writer.write(semicolon);\n if (line.length === 0) continue;\n\n let genColumn = 0;\n\n for (let j = 0; j < line.length; j++) {\n const segment = line[j];\n if (j > 0) writer.write(comma);\n\n genColumn = encodeInteger(writer, segment[0], genColumn);\n\n if (segment.length === 1) continue;\n sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);\n sourceLine = encodeInteger(writer, segment[2], sourceLine);\n sourceColumn = encodeInteger(writer, segment[3], sourceColumn);\n\n if (segment.length === 4) continue;\n namesIndex = encodeInteger(writer, segment[4], namesIndex);\n }\n }\n\n return writer.flush();\n}\n"],"names":[],"mappings":"AAEO,MAAM,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAChC,MAAM,SAAS,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAE3C,MAAM,KAAK,GAAG,kEAAkE,CAAC;AACjF,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;AACrC,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC;AAEtC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IACrC,MAAM,CAAC,GAAG,KAAK,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ourcemap-codec.umd.js b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js new file mode 100644 index 0000000..93caf17 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js @@ -0,0 +1,439 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.sourcemapCodec = {})); +})(this, (function (exports) { 'use strict'; + + const comma = ','.charCodeAt(0); + const semicolon = ';'.charCodeAt(0); + const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + const intToChar = new Uint8Array(64); // 64 possible chars. + const charToInt = new Uint8Array(128); // z is 122 in ASCII + for (let i = 0; i < chars.length; i++) { + const c = chars.charCodeAt(i); + intToChar[i] = c; + charToInt[c] = i; + } + function decodeInteger(reader, relative) { + let value = 0; + let shift = 0; + let integer = 0; + do { + const c = reader.next(); + integer = charToInt[c]; + value |= (integer & 31) << shift; + shift += 5; + } while (integer & 32); + const shouldNegate = value & 1; + value >>>= 1; + if (shouldNegate) { + value = -0x80000000 | -value; + } + return relative + value; + } + function encodeInteger(builder, num, relative) { + let delta = num - relative; + delta = delta < 0 ? (-delta << 1) | 1 : delta << 1; + do { + let clamped = delta & 0b011111; + delta >>>= 5; + if (delta > 0) + clamped |= 0b100000; + builder.write(intToChar[clamped]); + } while (delta > 0); + return num; + } + function hasMoreVlq(reader, max) { + if (reader.pos >= max) + return false; + return reader.peek() !== comma; + } + + const bufLength = 1024 * 16; + // Provide a fallback for older environments. + const td = typeof TextDecoder !== 'undefined' + ? /* #__PURE__ */ new TextDecoder() + : typeof Buffer !== 'undefined' + ? { + decode(buf) { + const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); + return out.toString(); + }, + } + : { + decode(buf) { + let out = ''; + for (let i = 0; i < buf.length; i++) { + out += String.fromCharCode(buf[i]); + } + return out; + }, + }; + class StringWriter { + constructor() { + this.pos = 0; + this.out = ''; + this.buffer = new Uint8Array(bufLength); + } + write(v) { + const { buffer } = this; + buffer[this.pos++] = v; + if (this.pos === bufLength) { + this.out += td.decode(buffer); + this.pos = 0; + } + } + flush() { + const { buffer, out, pos } = this; + return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out; + } + } + class StringReader { + constructor(buffer) { + this.pos = 0; + this.buffer = buffer; + } + next() { + return this.buffer.charCodeAt(this.pos++); + } + peek() { + return this.buffer.charCodeAt(this.pos); + } + indexOf(char) { + const { buffer, pos } = this; + const idx = buffer.indexOf(char, pos); + return idx === -1 ? buffer.length : idx; + } + } + + const EMPTY = []; + function decodeOriginalScopes(input) { + const { length } = input; + const reader = new StringReader(input); + const scopes = []; + const stack = []; + let line = 0; + for (; reader.pos < length; reader.pos++) { + line = decodeInteger(reader, line); + const column = decodeInteger(reader, 0); + if (!hasMoreVlq(reader, length)) { + const last = stack.pop(); + last[2] = line; + last[3] = column; + continue; + } + const kind = decodeInteger(reader, 0); + const fields = decodeInteger(reader, 0); + const hasName = fields & 0b0001; + const scope = (hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind]); + let vars = EMPTY; + if (hasMoreVlq(reader, length)) { + vars = []; + do { + const varsIndex = decodeInteger(reader, 0); + vars.push(varsIndex); + } while (hasMoreVlq(reader, length)); + } + scope.vars = vars; + scopes.push(scope); + stack.push(scope); + } + return scopes; + } + function encodeOriginalScopes(scopes) { + const writer = new StringWriter(); + for (let i = 0; i < scopes.length;) { + i = _encodeOriginalScopes(scopes, i, writer, [0]); + } + return writer.flush(); + } + function _encodeOriginalScopes(scopes, index, writer, state) { + const scope = scopes[index]; + const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope; + if (index > 0) + writer.write(comma); + state[0] = encodeInteger(writer, startLine, state[0]); + encodeInteger(writer, startColumn, 0); + encodeInteger(writer, kind, 0); + const fields = scope.length === 6 ? 0b0001 : 0; + encodeInteger(writer, fields, 0); + if (scope.length === 6) + encodeInteger(writer, scope[5], 0); + for (const v of vars) { + encodeInteger(writer, v, 0); + } + for (index++; index < scopes.length;) { + const next = scopes[index]; + const { 0: l, 1: c } = next; + if (l > endLine || (l === endLine && c >= endColumn)) { + break; + } + index = _encodeOriginalScopes(scopes, index, writer, state); + } + writer.write(comma); + state[0] = encodeInteger(writer, endLine, state[0]); + encodeInteger(writer, endColumn, 0); + return index; + } + function decodeGeneratedRanges(input) { + const { length } = input; + const reader = new StringReader(input); + const ranges = []; + const stack = []; + let genLine = 0; + let definitionSourcesIndex = 0; + let definitionScopeIndex = 0; + let callsiteSourcesIndex = 0; + let callsiteLine = 0; + let callsiteColumn = 0; + let bindingLine = 0; + let bindingColumn = 0; + do { + const semi = reader.indexOf(';'); + let genColumn = 0; + for (; reader.pos < semi; reader.pos++) { + genColumn = decodeInteger(reader, genColumn); + if (!hasMoreVlq(reader, semi)) { + const last = stack.pop(); + last[2] = genLine; + last[3] = genColumn; + continue; + } + const fields = decodeInteger(reader, 0); + const hasDefinition = fields & 0b0001; + const hasCallsite = fields & 0b0010; + const hasScope = fields & 0b0100; + let callsite = null; + let bindings = EMPTY; + let range; + if (hasDefinition) { + const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex); + definitionScopeIndex = decodeInteger(reader, definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0); + definitionSourcesIndex = defSourcesIndex; + range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex]; + } + else { + range = [genLine, genColumn, 0, 0]; + } + range.isScope = !!hasScope; + if (hasCallsite) { + const prevCsi = callsiteSourcesIndex; + const prevLine = callsiteLine; + callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex); + const sameSource = prevCsi === callsiteSourcesIndex; + callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0); + callsiteColumn = decodeInteger(reader, sameSource && prevLine === callsiteLine ? callsiteColumn : 0); + callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn]; + } + range.callsite = callsite; + if (hasMoreVlq(reader, semi)) { + bindings = []; + do { + bindingLine = genLine; + bindingColumn = genColumn; + const expressionsCount = decodeInteger(reader, 0); + let expressionRanges; + if (expressionsCount < -1) { + expressionRanges = [[decodeInteger(reader, 0)]]; + for (let i = -1; i > expressionsCount; i--) { + const prevBl = bindingLine; + bindingLine = decodeInteger(reader, bindingLine); + bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0); + const expression = decodeInteger(reader, 0); + expressionRanges.push([expression, bindingLine, bindingColumn]); + } + } + else { + expressionRanges = [[expressionsCount]]; + } + bindings.push(expressionRanges); + } while (hasMoreVlq(reader, semi)); + } + range.bindings = bindings; + ranges.push(range); + stack.push(range); + } + genLine++; + reader.pos = semi + 1; + } while (reader.pos < length); + return ranges; + } + function encodeGeneratedRanges(ranges) { + if (ranges.length === 0) + return ''; + const writer = new StringWriter(); + for (let i = 0; i < ranges.length;) { + i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]); + } + return writer.flush(); + } + function _encodeGeneratedRanges(ranges, index, writer, state) { + const range = ranges[index]; + const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, isScope, callsite, bindings, } = range; + if (state[0] < startLine) { + catchupLine(writer, state[0], startLine); + state[0] = startLine; + state[1] = 0; + } + else if (index > 0) { + writer.write(comma); + } + state[1] = encodeInteger(writer, range[1], state[1]); + const fields = (range.length === 6 ? 0b0001 : 0) | (callsite ? 0b0010 : 0) | (isScope ? 0b0100 : 0); + encodeInteger(writer, fields, 0); + if (range.length === 6) { + const { 4: sourcesIndex, 5: scopesIndex } = range; + if (sourcesIndex !== state[2]) { + state[3] = 0; + } + state[2] = encodeInteger(writer, sourcesIndex, state[2]); + state[3] = encodeInteger(writer, scopesIndex, state[3]); + } + if (callsite) { + const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite; + if (sourcesIndex !== state[4]) { + state[5] = 0; + state[6] = 0; + } + else if (callLine !== state[5]) { + state[6] = 0; + } + state[4] = encodeInteger(writer, sourcesIndex, state[4]); + state[5] = encodeInteger(writer, callLine, state[5]); + state[6] = encodeInteger(writer, callColumn, state[6]); + } + if (bindings) { + for (const binding of bindings) { + if (binding.length > 1) + encodeInteger(writer, -binding.length, 0); + const expression = binding[0][0]; + encodeInteger(writer, expression, 0); + let bindingStartLine = startLine; + let bindingStartColumn = startColumn; + for (let i = 1; i < binding.length; i++) { + const expRange = binding[i]; + bindingStartLine = encodeInteger(writer, expRange[1], bindingStartLine); + bindingStartColumn = encodeInteger(writer, expRange[2], bindingStartColumn); + encodeInteger(writer, expRange[0], 0); + } + } + } + for (index++; index < ranges.length;) { + const next = ranges[index]; + const { 0: l, 1: c } = next; + if (l > endLine || (l === endLine && c >= endColumn)) { + break; + } + index = _encodeGeneratedRanges(ranges, index, writer, state); + } + if (state[0] < endLine) { + catchupLine(writer, state[0], endLine); + state[0] = endLine; + state[1] = 0; + } + else { + writer.write(comma); + } + state[1] = encodeInteger(writer, endColumn, state[1]); + return index; + } + function catchupLine(writer, lastLine, line) { + do { + writer.write(semicolon); + } while (++lastLine < line); + } + + function decode(mappings) { + const { length } = mappings; + const reader = new StringReader(mappings); + const decoded = []; + let genColumn = 0; + let sourcesIndex = 0; + let sourceLine = 0; + let sourceColumn = 0; + let namesIndex = 0; + do { + const semi = reader.indexOf(';'); + const line = []; + let sorted = true; + let lastCol = 0; + genColumn = 0; + while (reader.pos < semi) { + let seg; + genColumn = decodeInteger(reader, genColumn); + if (genColumn < lastCol) + sorted = false; + lastCol = genColumn; + if (hasMoreVlq(reader, semi)) { + sourcesIndex = decodeInteger(reader, sourcesIndex); + sourceLine = decodeInteger(reader, sourceLine); + sourceColumn = decodeInteger(reader, sourceColumn); + if (hasMoreVlq(reader, semi)) { + namesIndex = decodeInteger(reader, namesIndex); + seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]; + } + else { + seg = [genColumn, sourcesIndex, sourceLine, sourceColumn]; + } + } + else { + seg = [genColumn]; + } + line.push(seg); + reader.pos++; + } + if (!sorted) + sort(line); + decoded.push(line); + reader.pos = semi + 1; + } while (reader.pos <= length); + return decoded; + } + function sort(line) { + line.sort(sortComparator); + } + function sortComparator(a, b) { + return a[0] - b[0]; + } + function encode(decoded) { + const writer = new StringWriter(); + let sourcesIndex = 0; + let sourceLine = 0; + let sourceColumn = 0; + let namesIndex = 0; + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + if (i > 0) + writer.write(semicolon); + if (line.length === 0) + continue; + let genColumn = 0; + for (let j = 0; j < line.length; j++) { + const segment = line[j]; + if (j > 0) + writer.write(comma); + genColumn = encodeInteger(writer, segment[0], genColumn); + if (segment.length === 1) + continue; + sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex); + sourceLine = encodeInteger(writer, segment[2], sourceLine); + sourceColumn = encodeInteger(writer, segment[3], sourceColumn); + if (segment.length === 4) + continue; + namesIndex = encodeInteger(writer, segment[4], namesIndex); + } + } + return writer.flush(); + } + + exports.decode = decode; + exports.decodeGeneratedRanges = decodeGeneratedRanges; + exports.decodeOriginalScopes = decodeOriginalScopes; + exports.encode = encode; + exports.encodeGeneratedRanges = encodeGeneratedRanges; + exports.encodeOriginalScopes = encodeOriginalScopes; + + Object.defineProperty(exports, '__esModule', { value: true }); + +})); +//# sourceMappingURL=sourcemap-codec.umd.js.map diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map new file mode 100644 index 0000000..65b3674 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sourcemap-codec.umd.js","sources":["../src/vlq.ts","../src/strings.ts","../src/scopes.ts","../src/sourcemap-codec.ts"],"sourcesContent":["import type { StringReader, StringWriter } from './strings';\n\nexport const comma = ','.charCodeAt(0);\nexport const semicolon = ';'.charCodeAt(0);\n\nconst chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nconst intToChar = new Uint8Array(64); // 64 possible chars.\nconst charToInt = new Uint8Array(128); // z is 122 in ASCII\n\nfor (let i = 0; i < chars.length; i++) {\n const c = chars.charCodeAt(i);\n intToChar[i] = c;\n charToInt[c] = i;\n}\n\nexport function decodeInteger(reader: StringReader, relative: number): number {\n let value = 0;\n let shift = 0;\n let integer = 0;\n\n do {\n const c = reader.next();\n integer = charToInt[c];\n value |= (integer & 31) << shift;\n shift += 5;\n } while (integer & 32);\n\n const shouldNegate = value & 1;\n value >>>= 1;\n\n if (shouldNegate) {\n value = -0x80000000 | -value;\n }\n\n return relative + value;\n}\n\nexport function encodeInteger(builder: StringWriter, num: number, relative: number): number {\n let delta = num - relative;\n\n delta = delta < 0 ? (-delta << 1) | 1 : delta << 1;\n do {\n let clamped = delta & 0b011111;\n delta >>>= 5;\n if (delta > 0) clamped |= 0b100000;\n builder.write(intToChar[clamped]);\n } while (delta > 0);\n\n return num;\n}\n\nexport function hasMoreVlq(reader: StringReader, max: number) {\n if (reader.pos >= max) return false;\n return reader.peek() !== comma;\n}\n","const bufLength = 1024 * 16;\n\n// Provide a fallback for older environments.\nconst td =\n typeof TextDecoder !== 'undefined'\n ? /* #__PURE__ */ new TextDecoder()\n : typeof Buffer !== 'undefined'\n ? {\n decode(buf: Uint8Array): string {\n const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);\n return out.toString();\n },\n }\n : {\n decode(buf: Uint8Array): string {\n let out = '';\n for (let i = 0; i < buf.length; i++) {\n out += String.fromCharCode(buf[i]);\n }\n return out;\n },\n };\n\nexport class StringWriter {\n pos = 0;\n private out = '';\n private buffer = new Uint8Array(bufLength);\n\n write(v: number): void {\n const { buffer } = this;\n buffer[this.pos++] = v;\n if (this.pos === bufLength) {\n this.out += td.decode(buffer);\n this.pos = 0;\n }\n }\n\n flush(): string {\n const { buffer, out, pos } = this;\n return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;\n }\n}\n\nexport class StringReader {\n pos = 0;\n private declare buffer: string;\n\n constructor(buffer: string) {\n this.buffer = buffer;\n }\n\n next(): number {\n return this.buffer.charCodeAt(this.pos++);\n }\n\n peek(): number {\n return this.buffer.charCodeAt(this.pos);\n }\n\n indexOf(char: string): number {\n const { buffer, pos } = this;\n const idx = buffer.indexOf(char, pos);\n return idx === -1 ? buffer.length : idx;\n }\n}\n","import { StringReader, StringWriter } from './strings';\nimport { comma, decodeInteger, encodeInteger, hasMoreVlq, semicolon } from './vlq';\n\nconst EMPTY: any[] = [];\n\ntype Line = number;\ntype Column = number;\ntype Kind = number;\ntype Name = number;\ntype Var = number;\ntype SourcesIndex = number;\ntype ScopesIndex = number;\n\ntype Mix = (A & O) | (B & O);\n\nexport type OriginalScope = Mix<\n [Line, Column, Line, Column, Kind],\n [Line, Column, Line, Column, Kind, Name],\n { vars: Var[] }\n>;\n\nexport type GeneratedRange = Mix<\n [Line, Column, Line, Column],\n [Line, Column, Line, Column, SourcesIndex, ScopesIndex],\n {\n callsite: CallSite | null;\n bindings: Binding[];\n isScope: boolean;\n }\n>;\nexport type CallSite = [SourcesIndex, Line, Column];\ntype Binding = BindingExpressionRange[];\nexport type BindingExpressionRange = [Name] | [Name, Line, Column];\n\nexport function decodeOriginalScopes(input: string): OriginalScope[] {\n const { length } = input;\n const reader = new StringReader(input);\n const scopes: OriginalScope[] = [];\n const stack: OriginalScope[] = [];\n let line = 0;\n\n for (; reader.pos < length; reader.pos++) {\n line = decodeInteger(reader, line);\n const column = decodeInteger(reader, 0);\n\n if (!hasMoreVlq(reader, length)) {\n const last = stack.pop()!;\n last[2] = line;\n last[3] = column;\n continue;\n }\n\n const kind = decodeInteger(reader, 0);\n const fields = decodeInteger(reader, 0);\n const hasName = fields & 0b0001;\n\n const scope: OriginalScope = (\n hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind]\n ) as OriginalScope;\n\n let vars: Var[] = EMPTY;\n if (hasMoreVlq(reader, length)) {\n vars = [];\n do {\n const varsIndex = decodeInteger(reader, 0);\n vars.push(varsIndex);\n } while (hasMoreVlq(reader, length));\n }\n scope.vars = vars;\n\n scopes.push(scope);\n stack.push(scope);\n }\n\n return scopes;\n}\n\nexport function encodeOriginalScopes(scopes: OriginalScope[]): string {\n const writer = new StringWriter();\n\n for (let i = 0; i < scopes.length; ) {\n i = _encodeOriginalScopes(scopes, i, writer, [0]);\n }\n\n return writer.flush();\n}\n\nfunction _encodeOriginalScopes(\n scopes: OriginalScope[],\n index: number,\n writer: StringWriter,\n state: [\n number, // GenColumn\n ],\n): number {\n const scope = scopes[index];\n const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope;\n\n if (index > 0) writer.write(comma);\n\n state[0] = encodeInteger(writer, startLine, state[0]);\n encodeInteger(writer, startColumn, 0);\n encodeInteger(writer, kind, 0);\n\n const fields = scope.length === 6 ? 0b0001 : 0;\n encodeInteger(writer, fields, 0);\n if (scope.length === 6) encodeInteger(writer, scope[5], 0);\n\n for (const v of vars) {\n encodeInteger(writer, v, 0);\n }\n\n for (index++; index < scopes.length; ) {\n const next = scopes[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || (l === endLine && c >= endColumn)) {\n break;\n }\n index = _encodeOriginalScopes(scopes, index, writer, state);\n }\n\n writer.write(comma);\n state[0] = encodeInteger(writer, endLine, state[0]);\n encodeInteger(writer, endColumn, 0);\n\n return index;\n}\n\nexport function decodeGeneratedRanges(input: string): GeneratedRange[] {\n const { length } = input;\n const reader = new StringReader(input);\n const ranges: GeneratedRange[] = [];\n const stack: GeneratedRange[] = [];\n\n let genLine = 0;\n let definitionSourcesIndex = 0;\n let definitionScopeIndex = 0;\n let callsiteSourcesIndex = 0;\n let callsiteLine = 0;\n let callsiteColumn = 0;\n let bindingLine = 0;\n let bindingColumn = 0;\n\n do {\n const semi = reader.indexOf(';');\n let genColumn = 0;\n\n for (; reader.pos < semi; reader.pos++) {\n genColumn = decodeInteger(reader, genColumn);\n\n if (!hasMoreVlq(reader, semi)) {\n const last = stack.pop()!;\n last[2] = genLine;\n last[3] = genColumn;\n continue;\n }\n\n const fields = decodeInteger(reader, 0);\n const hasDefinition = fields & 0b0001;\n const hasCallsite = fields & 0b0010;\n const hasScope = fields & 0b0100;\n\n let callsite: CallSite | null = null;\n let bindings: Binding[] = EMPTY;\n let range: GeneratedRange;\n if (hasDefinition) {\n const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex);\n definitionScopeIndex = decodeInteger(\n reader,\n definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0,\n );\n\n definitionSourcesIndex = defSourcesIndex;\n range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex] as GeneratedRange;\n } else {\n range = [genLine, genColumn, 0, 0] as GeneratedRange;\n }\n\n range.isScope = !!hasScope;\n\n if (hasCallsite) {\n const prevCsi = callsiteSourcesIndex;\n const prevLine = callsiteLine;\n callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex);\n const sameSource = prevCsi === callsiteSourcesIndex;\n callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0);\n callsiteColumn = decodeInteger(\n reader,\n sameSource && prevLine === callsiteLine ? callsiteColumn : 0,\n );\n\n callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn];\n }\n range.callsite = callsite;\n\n if (hasMoreVlq(reader, semi)) {\n bindings = [];\n do {\n bindingLine = genLine;\n bindingColumn = genColumn;\n const expressionsCount = decodeInteger(reader, 0);\n let expressionRanges: BindingExpressionRange[];\n if (expressionsCount < -1) {\n expressionRanges = [[decodeInteger(reader, 0)]];\n for (let i = -1; i > expressionsCount; i--) {\n const prevBl = bindingLine;\n bindingLine = decodeInteger(reader, bindingLine);\n bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0);\n const expression = decodeInteger(reader, 0);\n expressionRanges.push([expression, bindingLine, bindingColumn]);\n }\n } else {\n expressionRanges = [[expressionsCount]];\n }\n bindings.push(expressionRanges);\n } while (hasMoreVlq(reader, semi));\n }\n range.bindings = bindings;\n\n ranges.push(range);\n stack.push(range);\n }\n\n genLine++;\n reader.pos = semi + 1;\n } while (reader.pos < length);\n\n return ranges;\n}\n\nexport function encodeGeneratedRanges(ranges: GeneratedRange[]): string {\n if (ranges.length === 0) return '';\n\n const writer = new StringWriter();\n\n for (let i = 0; i < ranges.length; ) {\n i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]);\n }\n\n return writer.flush();\n}\n\nfunction _encodeGeneratedRanges(\n ranges: GeneratedRange[],\n index: number,\n writer: StringWriter,\n state: [\n number, // GenLine\n number, // GenColumn\n number, // DefSourcesIndex\n number, // DefScopesIndex\n number, // CallSourcesIndex\n number, // CallLine\n number, // CallColumn\n ],\n): number {\n const range = ranges[index];\n const {\n 0: startLine,\n 1: startColumn,\n 2: endLine,\n 3: endColumn,\n isScope,\n callsite,\n bindings,\n } = range;\n\n if (state[0] < startLine) {\n catchupLine(writer, state[0], startLine);\n state[0] = startLine;\n state[1] = 0;\n } else if (index > 0) {\n writer.write(comma);\n }\n\n state[1] = encodeInteger(writer, range[1], state[1]);\n\n const fields =\n (range.length === 6 ? 0b0001 : 0) | (callsite ? 0b0010 : 0) | (isScope ? 0b0100 : 0);\n encodeInteger(writer, fields, 0);\n\n if (range.length === 6) {\n const { 4: sourcesIndex, 5: scopesIndex } = range;\n if (sourcesIndex !== state[2]) {\n state[3] = 0;\n }\n state[2] = encodeInteger(writer, sourcesIndex, state[2]);\n state[3] = encodeInteger(writer, scopesIndex, state[3]);\n }\n\n if (callsite) {\n const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite!;\n if (sourcesIndex !== state[4]) {\n state[5] = 0;\n state[6] = 0;\n } else if (callLine !== state[5]) {\n state[6] = 0;\n }\n state[4] = encodeInteger(writer, sourcesIndex, state[4]);\n state[5] = encodeInteger(writer, callLine, state[5]);\n state[6] = encodeInteger(writer, callColumn, state[6]);\n }\n\n if (bindings) {\n for (const binding of bindings) {\n if (binding.length > 1) encodeInteger(writer, -binding.length, 0);\n const expression = binding[0][0];\n encodeInteger(writer, expression, 0);\n let bindingStartLine = startLine;\n let bindingStartColumn = startColumn;\n for (let i = 1; i < binding.length; i++) {\n const expRange = binding[i];\n bindingStartLine = encodeInteger(writer, expRange[1]!, bindingStartLine);\n bindingStartColumn = encodeInteger(writer, expRange[2]!, bindingStartColumn);\n encodeInteger(writer, expRange[0]!, 0);\n }\n }\n }\n\n for (index++; index < ranges.length; ) {\n const next = ranges[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || (l === endLine && c >= endColumn)) {\n break;\n }\n index = _encodeGeneratedRanges(ranges, index, writer, state);\n }\n\n if (state[0] < endLine) {\n catchupLine(writer, state[0], endLine);\n state[0] = endLine;\n state[1] = 0;\n } else {\n writer.write(comma);\n }\n state[1] = encodeInteger(writer, endColumn, state[1]);\n\n return index;\n}\n\nfunction catchupLine(writer: StringWriter, lastLine: number, line: number) {\n do {\n writer.write(semicolon);\n } while (++lastLine < line);\n}\n","import { comma, decodeInteger, encodeInteger, hasMoreVlq, semicolon } from './vlq';\nimport { StringWriter, StringReader } from './strings';\n\nexport {\n decodeOriginalScopes,\n encodeOriginalScopes,\n decodeGeneratedRanges,\n encodeGeneratedRanges,\n} from './scopes';\nexport type { OriginalScope, GeneratedRange, CallSite, BindingExpressionRange } from './scopes';\n\nexport type SourceMapSegment =\n | [number]\n | [number, number, number, number]\n | [number, number, number, number, number];\nexport type SourceMapLine = SourceMapSegment[];\nexport type SourceMapMappings = SourceMapLine[];\n\nexport function decode(mappings: string): SourceMapMappings {\n const { length } = mappings;\n const reader = new StringReader(mappings);\n const decoded: SourceMapMappings = [];\n let genColumn = 0;\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n\n do {\n const semi = reader.indexOf(';');\n const line: SourceMapLine = [];\n let sorted = true;\n let lastCol = 0;\n genColumn = 0;\n\n while (reader.pos < semi) {\n let seg: SourceMapSegment;\n\n genColumn = decodeInteger(reader, genColumn);\n if (genColumn < lastCol) sorted = false;\n lastCol = genColumn;\n\n if (hasMoreVlq(reader, semi)) {\n sourcesIndex = decodeInteger(reader, sourcesIndex);\n sourceLine = decodeInteger(reader, sourceLine);\n sourceColumn = decodeInteger(reader, sourceColumn);\n\n if (hasMoreVlq(reader, semi)) {\n namesIndex = decodeInteger(reader, namesIndex);\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex];\n } else {\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn];\n }\n } else {\n seg = [genColumn];\n }\n\n line.push(seg);\n reader.pos++;\n }\n\n if (!sorted) sort(line);\n decoded.push(line);\n reader.pos = semi + 1;\n } while (reader.pos <= length);\n\n return decoded;\n}\n\nfunction sort(line: SourceMapSegment[]) {\n line.sort(sortComparator);\n}\n\nfunction sortComparator(a: SourceMapSegment, b: SourceMapSegment): number {\n return a[0] - b[0];\n}\n\nexport function encode(decoded: SourceMapMappings): string;\nexport function encode(decoded: Readonly): string;\nexport function encode(decoded: Readonly): string {\n const writer = new StringWriter();\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n if (i > 0) writer.write(semicolon);\n if (line.length === 0) continue;\n\n let genColumn = 0;\n\n for (let j = 0; j < line.length; j++) {\n const segment = line[j];\n if (j > 0) writer.write(comma);\n\n genColumn = encodeInteger(writer, segment[0], genColumn);\n\n if (segment.length === 1) continue;\n sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);\n sourceLine = encodeInteger(writer, segment[2], sourceLine);\n sourceColumn = encodeInteger(writer, segment[3], sourceColumn);\n\n if (segment.length === 4) continue;\n namesIndex = encodeInteger(writer, segment[4], namesIndex);\n }\n }\n\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AS;gBACnC,YAAY,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;gBAC/D,UAAU,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;gBAC3D,YAAY,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;gBAE/D,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;oBAAE,SAAS;gBACnC,UAAU,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;aAC5D;SACF;QAED,OAAO,MAAM,CAAC,KAAK,EAAE,CAAC;IACxB;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/types/scopes.d.ts b/node_modules/@jridgewell/sourcemap-codec/dist/types/scopes.d.ts new file mode 100644 index 0000000..d156fab --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/types/scopes.d.ts @@ -0,0 +1,49 @@ +declare type Line = number; +declare type Column = number; +declare type Kind = number; +declare type Name = number; +declare type Var = number; +declare type SourcesIndex = number; +declare type ScopesIndex = number; +declare type Mix = (A & O) | (B & O); +export declare type OriginalScope = Mix<[ + Line, + Column, + Line, + Column, + Kind +], [ + Line, + Column, + Line, + Column, + Kind, + Name +], { + vars: Var[]; +}>; +export declare type GeneratedRange = Mix<[ + Line, + Column, + Line, + Column +], [ + Line, + Column, + Line, + Column, + SourcesIndex, + ScopesIndex +], { + callsite: CallSite | null; + bindings: Binding[]; + isScope: boolean; +}>; +export declare type CallSite = [SourcesIndex, Line, Column]; +declare type Binding = BindingExpressionRange[]; +export declare type BindingExpressionRange = [Name] | [Name, Line, Column]; +export declare function decodeOriginalScopes(input: string): OriginalScope[]; +export declare function encodeOriginalScopes(scopes: OriginalScope[]): string; +export declare function decodeGeneratedRanges(input: string): GeneratedRange[]; +export declare function encodeGeneratedRanges(ranges: GeneratedRange[]): string; +export {}; diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/types/sourcemap-codec.d.ts b/node_modules/@jridgewell/sourcemap-codec/dist/types/sourcemap-codec.d.ts new file mode 100644 index 0000000..336e658 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/types/sourcemap-codec.d.ts @@ -0,0 +1,8 @@ +export { decodeOriginalScopes, encodeOriginalScopes, decodeGeneratedRanges, encodeGeneratedRanges, } from './scopes'; +export type { OriginalScope, GeneratedRange, CallSite, BindingExpressionRange } from './scopes'; +export declare type SourceMapSegment = [number] | [number, number, number, number] | [number, number, number, number, number]; +export declare type SourceMapLine = SourceMapSegment[]; +export declare type SourceMapMappings = SourceMapLine[]; +export declare function decode(mappings: string): SourceMapMappings; +export declare function encode(decoded: SourceMapMappings): string; +export declare function encode(decoded: Readonly): string; diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/types/strings.d.ts b/node_modules/@jridgewell/sourcemap-codec/dist/types/strings.d.ts new file mode 100644 index 0000000..78bd88e --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/types/strings.d.ts @@ -0,0 +1,15 @@ +export declare class StringWriter { + pos: number; + private out; + private buffer; + write(v: number): void; + flush(): string; +} +export declare class StringReader { + pos: number; + private buffer; + constructor(buffer: string); + next(): number; + peek(): number; + indexOf(char: string): number; +} diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/types/vlq.d.ts b/node_modules/@jridgewell/sourcemap-codec/dist/types/vlq.d.ts new file mode 100644 index 0000000..450ee57 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/types/vlq.d.ts @@ -0,0 +1,6 @@ +import type { StringReader, StringWriter } from './strings'; +export declare const comma: number; +export declare const semicolon: number; +export declare function decodeInteger(reader: StringReader, relative: number): number; +export declare function encodeInteger(builder: StringWriter, num: number, relative: number): number; +export declare function hasMoreVlq(reader: StringReader, max: number): boolean; diff --git a/node_modules/@jridgewell/sourcemap-codec/package.json b/node_modules/@jridgewell/sourcemap-codec/package.json new file mode 100644 index 0000000..7168efc --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/package.json @@ -0,0 +1,75 @@ +{ + "name": "@jridgewell/sourcemap-codec", + "version": "1.5.0", + "description": "Encode/decode sourcemap mappings", + "keywords": [ + "sourcemap", + "vlq" + ], + "main": "dist/sourcemap-codec.umd.js", + "module": "dist/sourcemap-codec.mjs", + "types": "dist/types/sourcemap-codec.d.ts", + "files": [ + "dist" + ], + "exports": { + ".": [ + { + "types": "./dist/types/sourcemap-codec.d.ts", + "browser": "./dist/sourcemap-codec.umd.js", + "require": "./dist/sourcemap-codec.umd.js", + "import": "./dist/sourcemap-codec.mjs" + }, + "./dist/sourcemap-codec.umd.js" + ], + "./package.json": "./package.json" + }, + "scripts": { + "benchmark": "run-s build:rollup benchmark:*", + "benchmark:install": "cd benchmark && npm install", + "benchmark:only": "node --expose-gc benchmark/index.js", + "build": "run-s -n build:*", + "build:rollup": "rollup -c rollup.config.js", + "build:ts": "tsc --project tsconfig.build.json", + "lint": "run-s -n lint:*", + "lint:prettier": "npm run test:lint:prettier -- --write", + "lint:ts": "npm run test:lint:ts -- --fix", + "prebuild": "rm -rf dist", + "prepublishOnly": "npm run preversion", + "preversion": "run-s test build", + "test": "run-s -n test:lint test:only", + "test:debug": "mocha --inspect-brk", + "test:lint": "run-s -n test:lint:*", + "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'", + "test:lint:ts": "eslint '{src,test}/**/*.ts'", + "test:only": "mocha", + "test:coverage": "c8 mocha", + "test:watch": "mocha --watch" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/jridgewell/sourcemap-codec.git" + }, + "author": "Rich Harris", + "license": "MIT", + "devDependencies": { + "@rollup/plugin-typescript": "8.3.0", + "@types/mocha": "10.0.6", + "@types/node": "17.0.15", + "@typescript-eslint/eslint-plugin": "5.10.0", + "@typescript-eslint/parser": "5.10.0", + "benchmark": "2.1.4", + "c8": "7.11.2", + "eslint": "8.7.0", + "eslint-config-prettier": "8.3.0", + "mocha": "9.2.0", + "npm-run-all": "4.1.5", + "prettier": "2.5.1", + "rollup": "2.64.0", + "source-map": "0.6.1", + "source-map-js": "1.0.2", + "sourcemap-codec": "1.4.8", + "tsx": "4.7.1", + "typescript": "4.5.4" + } +} diff --git a/node_modules/@jridgewell/trace-mapping/LICENSE b/node_modules/@jridgewell/trace-mapping/LICENSE new file mode 100644 index 0000000..37bb488 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/LICENSE @@ -0,0 +1,19 @@ +Copyright 2022 Justin Ridgewell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@jridgewell/trace-mapping/README.md b/node_modules/@jridgewell/trace-mapping/README.md new file mode 100644 index 0000000..8286cee --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/README.md @@ -0,0 +1,193 @@ +# @jridgewell/trace-mapping + +> Trace the original position through a source map + +`trace-mapping` allows you to take the line and column of an output file and trace it to the +original location in the source file through a source map. + +You may already be familiar with the [`source-map`][source-map] package's `SourceMapConsumer`. This +provides the same `originalPositionFor` and `generatedPositionFor` API, without requiring WASM. + +## Installation + +```sh +npm install @jridgewell/trace-mapping +``` + +## Usage + +```typescript +import { TraceMap, originalPositionFor, generatedPositionFor } from '@jridgewell/trace-mapping'; + +const tracer = new TraceMap({ + version: 3, + sources: ['input.js'], + names: ['foo'], + mappings: 'KAyCIA', +}); + +// Lines start at line 1, columns at column 0. +const traced = originalPositionFor(tracer, { line: 1, column: 5 }); +assert.deepEqual(traced, { + source: 'input.js', + line: 42, + column: 4, + name: 'foo', +}); + +const generated = generatedPositionFor(tracer, { + source: 'input.js', + line: 42, + column: 4, +}); +assert.deepEqual(generated, { + line: 1, + column: 5, +}); +``` + +We also provide a lower level API to get the actual segment that matches our line and column. Unlike +`originalPositionFor`, `traceSegment` uses a 0-base for `line`: + +```typescript +import { traceSegment } from '@jridgewell/trace-mapping'; + +// line is 0-base. +const traced = traceSegment(tracer, /* line */ 0, /* column */ 5); + +// Segments are [outputColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex] +// Again, line is 0-base and so is sourceLine +assert.deepEqual(traced, [5, 0, 41, 4, 0]); +``` + +### SectionedSourceMaps + +The sourcemap spec defines a special `sections` field that's designed to handle concatenation of +output code with associated sourcemaps. This type of sourcemap is rarely used (no major build tool +produces it), but if you are hand coding a concatenation you may need it. We provide an `AnyMap` +helper that can receive either a regular sourcemap or a `SectionedSourceMap` and returns a +`TraceMap` instance: + +```typescript +import { AnyMap } from '@jridgewell/trace-mapping'; +const fooOutput = 'foo'; +const barOutput = 'bar'; +const output = [fooOutput, barOutput].join('\n'); + +const sectioned = new AnyMap({ + version: 3, + sections: [ + { + // 0-base line and column + offset: { line: 0, column: 0 }, + // fooOutput's sourcemap + map: { + version: 3, + sources: ['foo.js'], + names: ['foo'], + mappings: 'AAAAA', + }, + }, + { + // barOutput's sourcemap will not affect the first line, only the second + offset: { line: 1, column: 0 }, + map: { + version: 3, + sources: ['bar.js'], + names: ['bar'], + mappings: 'AAAAA', + }, + }, + ], +}); + +const traced = originalPositionFor(sectioned, { + line: 2, + column: 0, +}); + +assert.deepEqual(traced, { + source: 'bar.js', + line: 1, + column: 0, + name: 'bar', +}); +``` + +## Benchmarks + +``` +node v18.0.0 + +amp.js.map +trace-mapping: decoded JSON input x 183 ops/sec ±0.41% (87 runs sampled) +trace-mapping: encoded JSON input x 384 ops/sec ±0.89% (89 runs sampled) +trace-mapping: decoded Object input x 3,085 ops/sec ±0.24% (100 runs sampled) +trace-mapping: encoded Object input x 452 ops/sec ±0.80% (84 runs sampled) +source-map-js: encoded Object input x 88.82 ops/sec ±0.45% (77 runs sampled) +source-map-0.6.1: encoded Object input x 38.39 ops/sec ±1.88% (52 runs sampled) +Fastest is trace-mapping: decoded Object input + +trace-mapping: decoded originalPositionFor x 4,025,347 ops/sec ±0.15% (97 runs sampled) +trace-mapping: encoded originalPositionFor x 3,333,136 ops/sec ±1.26% (90 runs sampled) +source-map-js: encoded originalPositionFor x 824,978 ops/sec ±1.06% (94 runs sampled) +source-map-0.6.1: encoded originalPositionFor x 741,300 ops/sec ±0.93% (92 runs sampled) +source-map-0.8.0: encoded originalPositionFor x 2,587,603 ops/sec ±0.75% (97 runs sampled) +Fastest is trace-mapping: decoded originalPositionFor + +*** + +babel.min.js.map +trace-mapping: decoded JSON input x 17.43 ops/sec ±8.81% (33 runs sampled) +trace-mapping: encoded JSON input x 34.18 ops/sec ±4.67% (50 runs sampled) +trace-mapping: decoded Object input x 1,010 ops/sec ±0.41% (98 runs sampled) +trace-mapping: encoded Object input x 39.45 ops/sec ±4.01% (52 runs sampled) +source-map-js: encoded Object input x 6.57 ops/sec ±3.04% (21 runs sampled) +source-map-0.6.1: encoded Object input x 4.23 ops/sec ±2.93% (15 runs sampled) +Fastest is trace-mapping: decoded Object input + +trace-mapping: decoded originalPositionFor x 7,576,265 ops/sec ±0.74% (96 runs sampled) +trace-mapping: encoded originalPositionFor x 5,019,743 ops/sec ±0.74% (94 runs sampled) +source-map-js: encoded originalPositionFor x 3,396,137 ops/sec ±42.32% (95 runs sampled) +source-map-0.6.1: encoded originalPositionFor x 3,753,176 ops/sec ±0.72% (95 runs sampled) +source-map-0.8.0: encoded originalPositionFor x 6,423,633 ops/sec ±0.74% (95 runs sampled) +Fastest is trace-mapping: decoded originalPositionFor + +*** + +preact.js.map +trace-mapping: decoded JSON input x 3,499 ops/sec ±0.18% (98 runs sampled) +trace-mapping: encoded JSON input x 6,078 ops/sec ±0.25% (99 runs sampled) +trace-mapping: decoded Object input x 254,788 ops/sec ±0.13% (100 runs sampled) +trace-mapping: encoded Object input x 14,063 ops/sec ±0.27% (94 runs sampled) +source-map-js: encoded Object input x 2,465 ops/sec ±0.25% (98 runs sampled) +source-map-0.6.1: encoded Object input x 1,174 ops/sec ±1.90% (95 runs sampled) +Fastest is trace-mapping: decoded Object input + +trace-mapping: decoded originalPositionFor x 7,720,171 ops/sec ±0.14% (97 runs sampled) +trace-mapping: encoded originalPositionFor x 6,864,485 ops/sec ±0.16% (101 runs sampled) +source-map-js: encoded originalPositionFor x 2,387,219 ops/sec ±0.28% (98 runs sampled) +source-map-0.6.1: encoded originalPositionFor x 1,565,339 ops/sec ±0.32% (101 runs sampled) +source-map-0.8.0: encoded originalPositionFor x 3,819,732 ops/sec ±0.38% (98 runs sampled) +Fastest is trace-mapping: decoded originalPositionFor + +*** + +react.js.map +trace-mapping: decoded JSON input x 1,719 ops/sec ±0.19% (99 runs sampled) +trace-mapping: encoded JSON input x 4,284 ops/sec ±0.51% (99 runs sampled) +trace-mapping: decoded Object input x 94,668 ops/sec ±0.08% (99 runs sampled) +trace-mapping: encoded Object input x 5,287 ops/sec ±0.24% (99 runs sampled) +source-map-js: encoded Object input x 814 ops/sec ±0.20% (98 runs sampled) +source-map-0.6.1: encoded Object input x 429 ops/sec ±0.24% (94 runs sampled) +Fastest is trace-mapping: decoded Object input + +trace-mapping: decoded originalPositionFor x 28,927,989 ops/sec ±0.61% (94 runs sampled) +trace-mapping: encoded originalPositionFor x 27,394,475 ops/sec ±0.55% (97 runs sampled) +source-map-js: encoded originalPositionFor x 16,856,730 ops/sec ±0.45% (96 runs sampled) +source-map-0.6.1: encoded originalPositionFor x 12,258,950 ops/sec ±0.41% (97 runs sampled) +source-map-0.8.0: encoded originalPositionFor x 22,272,990 ops/sec ±0.58% (95 runs sampled) +Fastest is trace-mapping: decoded originalPositionFor +``` + +[source-map]: https://www.npmjs.com/package/source-map diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs new file mode 100644 index 0000000..8fce400 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs @@ -0,0 +1,514 @@ +import { encode, decode } from '@jridgewell/sourcemap-codec'; +import resolveUri from '@jridgewell/resolve-uri'; + +function resolve(input, base) { + // The base is always treated as a directory, if it's not empty. + // https://github.com/mozilla/source-map/blob/8cb3ee57/lib/util.js#L327 + // https://github.com/chromium/chromium/blob/da4adbb3/third_party/blink/renderer/devtools/front_end/sdk/SourceMap.js#L400-L401 + if (base && !base.endsWith('/')) + base += '/'; + return resolveUri(input, base); +} + +/** + * Removes everything after the last "/", but leaves the slash. + */ +function stripFilename(path) { + if (!path) + return ''; + const index = path.lastIndexOf('/'); + return path.slice(0, index + 1); +} + +const COLUMN = 0; +const SOURCES_INDEX = 1; +const SOURCE_LINE = 2; +const SOURCE_COLUMN = 3; +const NAMES_INDEX = 4; +const REV_GENERATED_LINE = 1; +const REV_GENERATED_COLUMN = 2; + +function maybeSort(mappings, owned) { + const unsortedIndex = nextUnsortedSegmentLine(mappings, 0); + if (unsortedIndex === mappings.length) + return mappings; + // If we own the array (meaning we parsed it from JSON), then we're free to directly mutate it. If + // not, we do not want to modify the consumer's input array. + if (!owned) + mappings = mappings.slice(); + for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) { + mappings[i] = sortSegments(mappings[i], owned); + } + return mappings; +} +function nextUnsortedSegmentLine(mappings, start) { + for (let i = start; i < mappings.length; i++) { + if (!isSorted(mappings[i])) + return i; + } + return mappings.length; +} +function isSorted(line) { + for (let j = 1; j < line.length; j++) { + if (line[j][COLUMN] < line[j - 1][COLUMN]) { + return false; + } + } + return true; +} +function sortSegments(line, owned) { + if (!owned) + line = line.slice(); + return line.sort(sortComparator); +} +function sortComparator(a, b) { + return a[COLUMN] - b[COLUMN]; +} + +let found = false; +/** + * A binary search implementation that returns the index if a match is found. + * If no match is found, then the left-index (the index associated with the item that comes just + * before the desired index) is returned. To maintain proper sort order, a splice would happen at + * the next index: + * + * ```js + * const array = [1, 3]; + * const needle = 2; + * const index = binarySearch(array, needle, (item, needle) => item - needle); + * + * assert.equal(index, 0); + * array.splice(index + 1, 0, needle); + * assert.deepEqual(array, [1, 2, 3]); + * ``` + */ +function binarySearch(haystack, needle, low, high) { + while (low <= high) { + const mid = low + ((high - low) >> 1); + const cmp = haystack[mid][COLUMN] - needle; + if (cmp === 0) { + found = true; + return mid; + } + if (cmp < 0) { + low = mid + 1; + } + else { + high = mid - 1; + } + } + found = false; + return low - 1; +} +function upperBound(haystack, needle, index) { + for (let i = index + 1; i < haystack.length; i++, index++) { + if (haystack[i][COLUMN] !== needle) + break; + } + return index; +} +function lowerBound(haystack, needle, index) { + for (let i = index - 1; i >= 0; i--, index--) { + if (haystack[i][COLUMN] !== needle) + break; + } + return index; +} +function memoizedState() { + return { + lastKey: -1, + lastNeedle: -1, + lastIndex: -1, + }; +} +/** + * This overly complicated beast is just to record the last tested line/column and the resulting + * index, allowing us to skip a few tests if mappings are monotonically increasing. + */ +function memoizedBinarySearch(haystack, needle, state, key) { + const { lastKey, lastNeedle, lastIndex } = state; + let low = 0; + let high = haystack.length - 1; + if (key === lastKey) { + if (needle === lastNeedle) { + found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle; + return lastIndex; + } + if (needle >= lastNeedle) { + // lastIndex may be -1 if the previous needle was not found. + low = lastIndex === -1 ? 0 : lastIndex; + } + else { + high = lastIndex; + } + } + state.lastKey = key; + state.lastNeedle = needle; + return (state.lastIndex = binarySearch(haystack, needle, low, high)); +} + +// Rebuilds the original source files, with mappings that are ordered by source line/column instead +// of generated line/column. +function buildBySources(decoded, memos) { + const sources = memos.map(buildNullArray); + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + if (seg.length === 1) + continue; + const sourceIndex = seg[SOURCES_INDEX]; + const sourceLine = seg[SOURCE_LINE]; + const sourceColumn = seg[SOURCE_COLUMN]; + const originalSource = sources[sourceIndex]; + const originalLine = (originalSource[sourceLine] || (originalSource[sourceLine] = [])); + const memo = memos[sourceIndex]; + // The binary search either found a match, or it found the left-index just before where the + // segment should go. Either way, we want to insert after that. And there may be multiple + // generated segments associated with an original location, so there may need to move several + // indexes before we find where we need to insert. + const index = upperBound(originalLine, sourceColumn, memoizedBinarySearch(originalLine, sourceColumn, memo, sourceLine)); + insert(originalLine, (memo.lastIndex = index + 1), [sourceColumn, i, seg[COLUMN]]); + } + } + return sources; +} +function insert(array, index, value) { + for (let i = array.length; i > index; i--) { + array[i] = array[i - 1]; + } + array[index] = value; +} +// Null arrays allow us to use ordered index keys without actually allocating contiguous memory like +// a real array. We use a null-prototype object to avoid prototype pollution and deoptimizations. +// Numeric properties on objects are magically sorted in ascending order by the engine regardless of +// the insertion order. So, by setting any numeric keys, even out of order, we'll get ascending +// order when iterating with for-in. +function buildNullArray() { + return { __proto__: null }; +} + +const AnyMap = function (map, mapUrl) { + const parsed = typeof map === 'string' ? JSON.parse(map) : map; + if (!('sections' in parsed)) + return new TraceMap(parsed, mapUrl); + const mappings = []; + const sources = []; + const sourcesContent = []; + const names = []; + const { sections } = parsed; + let i = 0; + for (; i < sections.length - 1; i++) { + const no = sections[i + 1].offset; + addSection(sections[i], mapUrl, mappings, sources, sourcesContent, names, no.line, no.column); + } + if (sections.length > 0) { + addSection(sections[i], mapUrl, mappings, sources, sourcesContent, names, Infinity, Infinity); + } + const joined = { + version: 3, + file: parsed.file, + names, + sources, + sourcesContent, + mappings, + }; + return presortedDecodedMap(joined); +}; +function addSection(section, mapUrl, mappings, sources, sourcesContent, names, stopLine, stopColumn) { + const map = AnyMap(section.map, mapUrl); + const { line: lineOffset, column: columnOffset } = section.offset; + const sourcesOffset = sources.length; + const namesOffset = names.length; + const decoded = decodedMappings(map); + const { resolvedSources } = map; + append(sources, resolvedSources); + append(sourcesContent, map.sourcesContent || fillSourcesContent(resolvedSources.length)); + append(names, map.names); + // If this section jumps forwards several lines, we need to add lines to the output mappings catch up. + for (let i = mappings.length; i <= lineOffset; i++) + mappings.push([]); + // We can only add so many lines before we step into the range that the next section's map + // controls. When we get to the last line, then we'll start checking the segments to see if + // they've crossed into the column range. + const stopI = stopLine - lineOffset; + const len = Math.min(decoded.length, stopI + 1); + for (let i = 0; i < len; i++) { + const line = decoded[i]; + // On the 0th loop, the line will already exist due to a previous section, or the line catch up + // loop above. + const out = i === 0 ? mappings[lineOffset] : (mappings[lineOffset + i] = []); + // On the 0th loop, the section's column offset shifts us forward. On all other lines (since the + // map can be multiple lines), it doesn't. + const cOffset = i === 0 ? columnOffset : 0; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + const column = cOffset + seg[COLUMN]; + // If this segment steps into the column range that the next section's map controls, we need + // to stop early. + if (i === stopI && column >= stopColumn) + break; + if (seg.length === 1) { + out.push([column]); + continue; + } + const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX]; + const sourceLine = seg[SOURCE_LINE]; + const sourceColumn = seg[SOURCE_COLUMN]; + if (seg.length === 4) { + out.push([column, sourcesIndex, sourceLine, sourceColumn]); + continue; + } + out.push([column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]]); + } + } +} +function append(arr, other) { + for (let i = 0; i < other.length; i++) + arr.push(other[i]); +} +// Sourcemaps don't need to have sourcesContent, and if they don't, we need to create an array of +// equal length to the sources. This is because the sources and sourcesContent are paired arrays, +// where `sourcesContent[i]` is the content of the `sources[i]` file. If we didn't, then joined +// sourcemap would desynchronize the sources/contents. +function fillSourcesContent(len) { + const sourcesContent = []; + for (let i = 0; i < len; i++) + sourcesContent[i] = null; + return sourcesContent; +} + +const INVALID_ORIGINAL_MAPPING = Object.freeze({ + source: null, + line: null, + column: null, + name: null, +}); +const INVALID_GENERATED_MAPPING = Object.freeze({ + line: null, + column: null, +}); +const LINE_GTR_ZERO = '`line` must be greater than 0 (lines start at line 1)'; +const COL_GTR_EQ_ZERO = '`column` must be greater than or equal to 0 (columns start at column 0)'; +const LEAST_UPPER_BOUND = -1; +const GREATEST_LOWER_BOUND = 1; +/** + * Returns the encoded (VLQ string) form of the SourceMap's mappings field. + */ +let encodedMappings; +/** + * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field. + */ +let decodedMappings; +/** + * A low-level API to find the segment associated with a generated line/column (think, from a + * stack trace). Line and column here are 0-based, unlike `originalPositionFor`. + */ +let traceSegment; +/** + * A higher-level API to find the source/line/column associated with a generated line/column + * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in + * `source-map` library. + */ +let originalPositionFor; +/** + * Finds the source/line/column directly after the mapping returned by originalPositionFor, provided + * the found mapping is from the same source and line as the originalPositionFor mapping. + * + * Eg, in the code `let id = 1`, `originalPositionAfter` could find the mapping associated with `1` + * using the same needle that would return `id` when calling `originalPositionFor`. + */ +let generatedPositionFor; +/** + * Iterates each mapping in generated position order. + */ +let eachMapping; +/** + * A helper that skips sorting of the input map's mappings array, which can be expensive for larger + * maps. + */ +let presortedDecodedMap; +/** + * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +let decodedMap; +/** + * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +let encodedMap; +class TraceMap { + constructor(map, mapUrl) { + this._decodedMemo = memoizedState(); + this._bySources = undefined; + this._bySourceMemos = undefined; + const isString = typeof map === 'string'; + if (!isString && map.constructor === TraceMap) + return map; + const parsed = (isString ? JSON.parse(map) : map); + const { version, file, names, sourceRoot, sources, sourcesContent } = parsed; + this.version = version; + this.file = file; + this.names = names; + this.sourceRoot = sourceRoot; + this.sources = sources; + this.sourcesContent = sourcesContent; + if (sourceRoot || mapUrl) { + const from = resolve(sourceRoot || '', stripFilename(mapUrl)); + this.resolvedSources = sources.map((s) => resolve(s || '', from)); + } + else { + this.resolvedSources = sources.map((s) => s || ''); + } + const { mappings } = parsed; + if (typeof mappings === 'string') { + this._encoded = mappings; + this._decoded = undefined; + } + else { + this._encoded = undefined; + this._decoded = maybeSort(mappings, isString); + } + } +} +(() => { + encodedMappings = (map) => { + var _a; + return ((_a = map._encoded) !== null && _a !== void 0 ? _a : (map._encoded = encode(map._decoded))); + }; + decodedMappings = (map) => { + return (map._decoded || (map._decoded = decode(map._encoded))); + }; + traceSegment = (map, line, column) => { + const decoded = decodedMappings(map); + // It's common for parent source maps to have pointers to lines that have no + // mapping (like a "//# sourceMappingURL=") at the end of the child file. + if (line >= decoded.length) + return null; + return traceSegmentInternal(decoded[line], map._decodedMemo, line, column, GREATEST_LOWER_BOUND); + }; + originalPositionFor = (map, { line, column, bias }) => { + line--; + if (line < 0) + throw new Error(LINE_GTR_ZERO); + if (column < 0) + throw new Error(COL_GTR_EQ_ZERO); + const decoded = decodedMappings(map); + // It's common for parent source maps to have pointers to lines that have no + // mapping (like a "//# sourceMappingURL=") at the end of the child file. + if (line >= decoded.length) + return INVALID_ORIGINAL_MAPPING; + const segment = traceSegmentInternal(decoded[line], map._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND); + if (segment == null) + return INVALID_ORIGINAL_MAPPING; + if (segment.length == 1) + return INVALID_ORIGINAL_MAPPING; + const { names, resolvedSources } = map; + return { + source: resolvedSources[segment[SOURCES_INDEX]], + line: segment[SOURCE_LINE] + 1, + column: segment[SOURCE_COLUMN], + name: segment.length === 5 ? names[segment[NAMES_INDEX]] : null, + }; + }; + generatedPositionFor = (map, { source, line, column, bias }) => { + line--; + if (line < 0) + throw new Error(LINE_GTR_ZERO); + if (column < 0) + throw new Error(COL_GTR_EQ_ZERO); + const { sources, resolvedSources } = map; + let sourceIndex = sources.indexOf(source); + if (sourceIndex === -1) + sourceIndex = resolvedSources.indexOf(source); + if (sourceIndex === -1) + return INVALID_GENERATED_MAPPING; + const generated = (map._bySources || (map._bySources = buildBySources(decodedMappings(map), (map._bySourceMemos = sources.map(memoizedState))))); + const memos = map._bySourceMemos; + const segments = generated[sourceIndex][line]; + if (segments == null) + return INVALID_GENERATED_MAPPING; + const segment = traceSegmentInternal(segments, memos[sourceIndex], line, column, bias || GREATEST_LOWER_BOUND); + if (segment == null) + return INVALID_GENERATED_MAPPING; + return { + line: segment[REV_GENERATED_LINE] + 1, + column: segment[REV_GENERATED_COLUMN], + }; + }; + eachMapping = (map, cb) => { + const decoded = decodedMappings(map); + const { names, resolvedSources } = map; + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + const generatedLine = i + 1; + const generatedColumn = seg[0]; + let source = null; + let originalLine = null; + let originalColumn = null; + let name = null; + if (seg.length !== 1) { + source = resolvedSources[seg[1]]; + originalLine = seg[2] + 1; + originalColumn = seg[3]; + } + if (seg.length === 5) + name = names[seg[4]]; + cb({ + generatedLine, + generatedColumn, + source, + originalLine, + originalColumn, + name, + }); + } + } + }; + presortedDecodedMap = (map, mapUrl) => { + const clone = Object.assign({}, map); + clone.mappings = []; + const tracer = new TraceMap(clone, mapUrl); + tracer._decoded = map.mappings; + return tracer; + }; + decodedMap = (map) => { + return { + version: 3, + file: map.file, + names: map.names, + sourceRoot: map.sourceRoot, + sources: map.sources, + sourcesContent: map.sourcesContent, + mappings: decodedMappings(map), + }; + }; + encodedMap = (map) => { + return { + version: 3, + file: map.file, + names: map.names, + sourceRoot: map.sourceRoot, + sources: map.sources, + sourcesContent: map.sourcesContent, + mappings: encodedMappings(map), + }; + }; +})(); +function traceSegmentInternal(segments, memo, line, column, bias) { + let index = memoizedBinarySearch(segments, column, memo, line); + if (found) { + index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index); + } + else if (bias === LEAST_UPPER_BOUND) + index++; + if (index === -1 || index === segments.length) + return null; + return segments[index]; +} + +export { AnyMap, GREATEST_LOWER_BOUND, LEAST_UPPER_BOUND, TraceMap, decodedMap, decodedMappings, eachMapping, encodedMap, encodedMappings, generatedPositionFor, originalPositionFor, presortedDecodedMap, traceSegment }; +//# sourceMappingURL=trace-mapping.mjs.map diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map new file mode 100644 index 0000000..fec7769 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"trace-mapping.mjs","sources":["../../src/resolve.ts","../../src/strip-filename.ts","../../src/sourcemap-segment.ts","../../src/sort.ts","../../src/binary-search.ts","../../src/by-source.ts","../../src/any-map.ts","../../src/trace-mapping.ts"],"sourcesContent":[null,null,null,null,null,null,null,null],"names":["bsFound"],"mappings":";;;SAEwB,OAAO,CAAC,KAAa,EAAE,IAAwB;;;;IAIrE,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,IAAI,IAAI,GAAG,CAAC;IAE7C,OAAO,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AACjC;;ACTA;;;SAGwB,aAAa,CAAC,IAA+B;IACnE,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IACrB,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACpC,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;AAClC;;ACQO,MAAM,MAAM,GAAG,CAAC,CAA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AAI,EAAE,GAAG,CAAC,IAAI;YACd,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,UAAU,EAAE,GAAG,CAAC,UAAU;YAC1B,OAAO,EAAE,GAAG,CAAC,OAAO;YACpB,cAAc,EAAE,GAAG,CAAC,cAAc;YAClC,QAAQ,EAAE,eAAe,CAAC,GAAG,CAAC;SAC/B,CAAC;KACH,CAAC;IAEF,UAAU,GAAG,CAAC,GAAG;QACf,OAAO;YACL,OAAO,EAAE,CAAC;YACV,IAAI,EAAE,GAAG,CAAC,IAAI;YACd,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,UAAU,EAAE,GAAG,CAAC,UAAU;YAC1B,OAAO,EAAE,GAAG,CAAC,OAAO;YACpB,cAAc,EAAE,GAAG,CAAC,cAAc;YAClC,QAAQ,EAAE,eAAe,CAAC,GAAG,CAAC;SAC/B,CAAC;KACH,CAAC;AACJ,CAAC,GAAA,CAAA;AAiBH,SAAS,oBAAoB,CAC3B,QAA+C,EAC/C,IAAe,EACf,IAAY,EACZ,MAAc,EACd,IAA4D;IAE5D,IAAI,KAAK,GAAG,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAC/D,IAAIA,KAAO,EAAE;QACX,KAAK,GAAG,CAAC,IAAI,KAAK,iBAAiB,GAAG,UAAU,GAAG,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;KACzF;SAAM,IAAI,IAAI,KAAK,iBAAiB;QAAE,KAAK,EAAE,CAAC;IAE/C,IAAI,KAAK,KAAK,CAAC,CAAC,IAAI,KAAK,KAAK,QAAQ,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IAC3D,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC;AACzB;;;;"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js new file mode 100644 index 0000000..8b755bd --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js @@ -0,0 +1,528 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@jridgewell/sourcemap-codec'), require('@jridgewell/resolve-uri')) : + typeof define === 'function' && define.amd ? define(['exports', '@jridgewell/sourcemap-codec', '@jridgewell/resolve-uri'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.traceMapping = {}, global.sourcemapCodec, global.resolveURI)); +})(this, (function (exports, sourcemapCodec, resolveUri) { 'use strict'; + + function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + + var resolveUri__default = /*#__PURE__*/_interopDefaultLegacy(resolveUri); + + function resolve(input, base) { + // The base is always treated as a directory, if it's not empty. + // https://github.com/mozilla/source-map/blob/8cb3ee57/lib/util.js#L327 + // https://github.com/chromium/chromium/blob/da4adbb3/third_party/blink/renderer/devtools/front_end/sdk/SourceMap.js#L400-L401 + if (base && !base.endsWith('/')) + base += '/'; + return resolveUri__default["default"](input, base); + } + + /** + * Removes everything after the last "/", but leaves the slash. + */ + function stripFilename(path) { + if (!path) + return ''; + const index = path.lastIndexOf('/'); + return path.slice(0, index + 1); + } + + const COLUMN = 0; + const SOURCES_INDEX = 1; + const SOURCE_LINE = 2; + const SOURCE_COLUMN = 3; + const NAMES_INDEX = 4; + const REV_GENERATED_LINE = 1; + const REV_GENERATED_COLUMN = 2; + + function maybeSort(mappings, owned) { + const unsortedIndex = nextUnsortedSegmentLine(mappings, 0); + if (unsortedIndex === mappings.length) + return mappings; + // If we own the array (meaning we parsed it from JSON), then we're free to directly mutate it. If + // not, we do not want to modify the consumer's input array. + if (!owned) + mappings = mappings.slice(); + for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) { + mappings[i] = sortSegments(mappings[i], owned); + } + return mappings; + } + function nextUnsortedSegmentLine(mappings, start) { + for (let i = start; i < mappings.length; i++) { + if (!isSorted(mappings[i])) + return i; + } + return mappings.length; + } + function isSorted(line) { + for (let j = 1; j < line.length; j++) { + if (line[j][COLUMN] < line[j - 1][COLUMN]) { + return false; + } + } + return true; + } + function sortSegments(line, owned) { + if (!owned) + line = line.slice(); + return line.sort(sortComparator); + } + function sortComparator(a, b) { + return a[COLUMN] - b[COLUMN]; + } + + let found = false; + /** + * A binary search implementation that returns the index if a match is found. + * If no match is found, then the left-index (the index associated with the item that comes just + * before the desired index) is returned. To maintain proper sort order, a splice would happen at + * the next index: + * + * ```js + * const array = [1, 3]; + * const needle = 2; + * const index = binarySearch(array, needle, (item, needle) => item - needle); + * + * assert.equal(index, 0); + * array.splice(index + 1, 0, needle); + * assert.deepEqual(array, [1, 2, 3]); + * ``` + */ + function binarySearch(haystack, needle, low, high) { + while (low <= high) { + const mid = low + ((high - low) >> 1); + const cmp = haystack[mid][COLUMN] - needle; + if (cmp === 0) { + found = true; + return mid; + } + if (cmp < 0) { + low = mid + 1; + } + else { + high = mid - 1; + } + } + found = false; + return low - 1; + } + function upperBound(haystack, needle, index) { + for (let i = index + 1; i < haystack.length; i++, index++) { + if (haystack[i][COLUMN] !== needle) + break; + } + return index; + } + function lowerBound(haystack, needle, index) { + for (let i = index - 1; i >= 0; i--, index--) { + if (haystack[i][COLUMN] !== needle) + break; + } + return index; + } + function memoizedState() { + return { + lastKey: -1, + lastNeedle: -1, + lastIndex: -1, + }; + } + /** + * This overly complicated beast is just to record the last tested line/column and the resulting + * index, allowing us to skip a few tests if mappings are monotonically increasing. + */ + function memoizedBinarySearch(haystack, needle, state, key) { + const { lastKey, lastNeedle, lastIndex } = state; + let low = 0; + let high = haystack.length - 1; + if (key === lastKey) { + if (needle === lastNeedle) { + found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle; + return lastIndex; + } + if (needle >= lastNeedle) { + // lastIndex may be -1 if the previous needle was not found. + low = lastIndex === -1 ? 0 : lastIndex; + } + else { + high = lastIndex; + } + } + state.lastKey = key; + state.lastNeedle = needle; + return (state.lastIndex = binarySearch(haystack, needle, low, high)); + } + + // Rebuilds the original source files, with mappings that are ordered by source line/column instead + // of generated line/column. + function buildBySources(decoded, memos) { + const sources = memos.map(buildNullArray); + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + if (seg.length === 1) + continue; + const sourceIndex = seg[SOURCES_INDEX]; + const sourceLine = seg[SOURCE_LINE]; + const sourceColumn = seg[SOURCE_COLUMN]; + const originalSource = sources[sourceIndex]; + const originalLine = (originalSource[sourceLine] || (originalSource[sourceLine] = [])); + const memo = memos[sourceIndex]; + // The binary search either found a match, or it found the left-index just before where the + // segment should go. Either way, we want to insert after that. And there may be multiple + // generated segments associated with an original location, so there may need to move several + // indexes before we find where we need to insert. + const index = upperBound(originalLine, sourceColumn, memoizedBinarySearch(originalLine, sourceColumn, memo, sourceLine)); + insert(originalLine, (memo.lastIndex = index + 1), [sourceColumn, i, seg[COLUMN]]); + } + } + return sources; + } + function insert(array, index, value) { + for (let i = array.length; i > index; i--) { + array[i] = array[i - 1]; + } + array[index] = value; + } + // Null arrays allow us to use ordered index keys without actually allocating contiguous memory like + // a real array. We use a null-prototype object to avoid prototype pollution and deoptimizations. + // Numeric properties on objects are magically sorted in ascending order by the engine regardless of + // the insertion order. So, by setting any numeric keys, even out of order, we'll get ascending + // order when iterating with for-in. + function buildNullArray() { + return { __proto__: null }; + } + + const AnyMap = function (map, mapUrl) { + const parsed = typeof map === 'string' ? JSON.parse(map) : map; + if (!('sections' in parsed)) + return new TraceMap(parsed, mapUrl); + const mappings = []; + const sources = []; + const sourcesContent = []; + const names = []; + const { sections } = parsed; + let i = 0; + for (; i < sections.length - 1; i++) { + const no = sections[i + 1].offset; + addSection(sections[i], mapUrl, mappings, sources, sourcesContent, names, no.line, no.column); + } + if (sections.length > 0) { + addSection(sections[i], mapUrl, mappings, sources, sourcesContent, names, Infinity, Infinity); + } + const joined = { + version: 3, + file: parsed.file, + names, + sources, + sourcesContent, + mappings, + }; + return exports.presortedDecodedMap(joined); + }; + function addSection(section, mapUrl, mappings, sources, sourcesContent, names, stopLine, stopColumn) { + const map = AnyMap(section.map, mapUrl); + const { line: lineOffset, column: columnOffset } = section.offset; + const sourcesOffset = sources.length; + const namesOffset = names.length; + const decoded = exports.decodedMappings(map); + const { resolvedSources } = map; + append(sources, resolvedSources); + append(sourcesContent, map.sourcesContent || fillSourcesContent(resolvedSources.length)); + append(names, map.names); + // If this section jumps forwards several lines, we need to add lines to the output mappings catch up. + for (let i = mappings.length; i <= lineOffset; i++) + mappings.push([]); + // We can only add so many lines before we step into the range that the next section's map + // controls. When we get to the last line, then we'll start checking the segments to see if + // they've crossed into the column range. + const stopI = stopLine - lineOffset; + const len = Math.min(decoded.length, stopI + 1); + for (let i = 0; i < len; i++) { + const line = decoded[i]; + // On the 0th loop, the line will already exist due to a previous section, or the line catch up + // loop above. + const out = i === 0 ? mappings[lineOffset] : (mappings[lineOffset + i] = []); + // On the 0th loop, the section's column offset shifts us forward. On all other lines (since the + // map can be multiple lines), it doesn't. + const cOffset = i === 0 ? columnOffset : 0; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + const column = cOffset + seg[COLUMN]; + // If this segment steps into the column range that the next section's map controls, we need + // to stop early. + if (i === stopI && column >= stopColumn) + break; + if (seg.length === 1) { + out.push([column]); + continue; + } + const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX]; + const sourceLine = seg[SOURCE_LINE]; + const sourceColumn = seg[SOURCE_COLUMN]; + if (seg.length === 4) { + out.push([column, sourcesIndex, sourceLine, sourceColumn]); + continue; + } + out.push([column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]]); + } + } + } + function append(arr, other) { + for (let i = 0; i < other.length; i++) + arr.push(other[i]); + } + // Sourcemaps don't need to have sourcesContent, and if they don't, we need to create an array of + // equal length to the sources. This is because the sources and sourcesContent are paired arrays, + // where `sourcesContent[i]` is the content of the `sources[i]` file. If we didn't, then joined + // sourcemap would desynchronize the sources/contents. + function fillSourcesContent(len) { + const sourcesContent = []; + for (let i = 0; i < len; i++) + sourcesContent[i] = null; + return sourcesContent; + } + + const INVALID_ORIGINAL_MAPPING = Object.freeze({ + source: null, + line: null, + column: null, + name: null, + }); + const INVALID_GENERATED_MAPPING = Object.freeze({ + line: null, + column: null, + }); + const LINE_GTR_ZERO = '`line` must be greater than 0 (lines start at line 1)'; + const COL_GTR_EQ_ZERO = '`column` must be greater than or equal to 0 (columns start at column 0)'; + const LEAST_UPPER_BOUND = -1; + const GREATEST_LOWER_BOUND = 1; + /** + * Returns the encoded (VLQ string) form of the SourceMap's mappings field. + */ + exports.encodedMappings = void 0; + /** + * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field. + */ + exports.decodedMappings = void 0; + /** + * A low-level API to find the segment associated with a generated line/column (think, from a + * stack trace). Line and column here are 0-based, unlike `originalPositionFor`. + */ + exports.traceSegment = void 0; + /** + * A higher-level API to find the source/line/column associated with a generated line/column + * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in + * `source-map` library. + */ + exports.originalPositionFor = void 0; + /** + * Finds the source/line/column directly after the mapping returned by originalPositionFor, provided + * the found mapping is from the same source and line as the originalPositionFor mapping. + * + * Eg, in the code `let id = 1`, `originalPositionAfter` could find the mapping associated with `1` + * using the same needle that would return `id` when calling `originalPositionFor`. + */ + exports.generatedPositionFor = void 0; + /** + * Iterates each mapping in generated position order. + */ + exports.eachMapping = void 0; + /** + * A helper that skips sorting of the input map's mappings array, which can be expensive for larger + * maps. + */ + exports.presortedDecodedMap = void 0; + /** + * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ + exports.decodedMap = void 0; + /** + * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ + exports.encodedMap = void 0; + class TraceMap { + constructor(map, mapUrl) { + this._decodedMemo = memoizedState(); + this._bySources = undefined; + this._bySourceMemos = undefined; + const isString = typeof map === 'string'; + if (!isString && map.constructor === TraceMap) + return map; + const parsed = (isString ? JSON.parse(map) : map); + const { version, file, names, sourceRoot, sources, sourcesContent } = parsed; + this.version = version; + this.file = file; + this.names = names; + this.sourceRoot = sourceRoot; + this.sources = sources; + this.sourcesContent = sourcesContent; + if (sourceRoot || mapUrl) { + const from = resolve(sourceRoot || '', stripFilename(mapUrl)); + this.resolvedSources = sources.map((s) => resolve(s || '', from)); + } + else { + this.resolvedSources = sources.map((s) => s || ''); + } + const { mappings } = parsed; + if (typeof mappings === 'string') { + this._encoded = mappings; + this._decoded = undefined; + } + else { + this._encoded = undefined; + this._decoded = maybeSort(mappings, isString); + } + } + } + (() => { + exports.encodedMappings = (map) => { + var _a; + return ((_a = map._encoded) !== null && _a !== void 0 ? _a : (map._encoded = sourcemapCodec.encode(map._decoded))); + }; + exports.decodedMappings = (map) => { + return (map._decoded || (map._decoded = sourcemapCodec.decode(map._encoded))); + }; + exports.traceSegment = (map, line, column) => { + const decoded = exports.decodedMappings(map); + // It's common for parent source maps to have pointers to lines that have no + // mapping (like a "//# sourceMappingURL=") at the end of the child file. + if (line >= decoded.length) + return null; + return traceSegmentInternal(decoded[line], map._decodedMemo, line, column, GREATEST_LOWER_BOUND); + }; + exports.originalPositionFor = (map, { line, column, bias }) => { + line--; + if (line < 0) + throw new Error(LINE_GTR_ZERO); + if (column < 0) + throw new Error(COL_GTR_EQ_ZERO); + const decoded = exports.decodedMappings(map); + // It's common for parent source maps to have pointers to lines that have no + // mapping (like a "//# sourceMappingURL=") at the end of the child file. + if (line >= decoded.length) + return INVALID_ORIGINAL_MAPPING; + const segment = traceSegmentInternal(decoded[line], map._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND); + if (segment == null) + return INVALID_ORIGINAL_MAPPING; + if (segment.length == 1) + return INVALID_ORIGINAL_MAPPING; + const { names, resolvedSources } = map; + return { + source: resolvedSources[segment[SOURCES_INDEX]], + line: segment[SOURCE_LINE] + 1, + column: segment[SOURCE_COLUMN], + name: segment.length === 5 ? names[segment[NAMES_INDEX]] : null, + }; + }; + exports.generatedPositionFor = (map, { source, line, column, bias }) => { + line--; + if (line < 0) + throw new Error(LINE_GTR_ZERO); + if (column < 0) + throw new Error(COL_GTR_EQ_ZERO); + const { sources, resolvedSources } = map; + let sourceIndex = sources.indexOf(source); + if (sourceIndex === -1) + sourceIndex = resolvedSources.indexOf(source); + if (sourceIndex === -1) + return INVALID_GENERATED_MAPPING; + const generated = (map._bySources || (map._bySources = buildBySources(exports.decodedMappings(map), (map._bySourceMemos = sources.map(memoizedState))))); + const memos = map._bySourceMemos; + const segments = generated[sourceIndex][line]; + if (segments == null) + return INVALID_GENERATED_MAPPING; + const segment = traceSegmentInternal(segments, memos[sourceIndex], line, column, bias || GREATEST_LOWER_BOUND); + if (segment == null) + return INVALID_GENERATED_MAPPING; + return { + line: segment[REV_GENERATED_LINE] + 1, + column: segment[REV_GENERATED_COLUMN], + }; + }; + exports.eachMapping = (map, cb) => { + const decoded = exports.decodedMappings(map); + const { names, resolvedSources } = map; + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + const generatedLine = i + 1; + const generatedColumn = seg[0]; + let source = null; + let originalLine = null; + let originalColumn = null; + let name = null; + if (seg.length !== 1) { + source = resolvedSources[seg[1]]; + originalLine = seg[2] + 1; + originalColumn = seg[3]; + } + if (seg.length === 5) + name = names[seg[4]]; + cb({ + generatedLine, + generatedColumn, + source, + originalLine, + originalColumn, + name, + }); + } + } + }; + exports.presortedDecodedMap = (map, mapUrl) => { + const clone = Object.assign({}, map); + clone.mappings = []; + const tracer = new TraceMap(clone, mapUrl); + tracer._decoded = map.mappings; + return tracer; + }; + exports.decodedMap = (map) => { + return { + version: 3, + file: map.file, + names: map.names, + sourceRoot: map.sourceRoot, + sources: map.sources, + sourcesContent: map.sourcesContent, + mappings: exports.decodedMappings(map), + }; + }; + exports.encodedMap = (map) => { + return { + version: 3, + file: map.file, + names: map.names, + sourceRoot: map.sourceRoot, + sources: map.sources, + sourcesContent: map.sourcesContent, + mappings: exports.encodedMappings(map), + }; + }; + })(); + function traceSegmentInternal(segments, memo, line, column, bias) { + let index = memoizedBinarySearch(segments, column, memo, line); + if (found) { + index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index); + } + else if (bias === LEAST_UPPER_BOUND) + index++; + if (index === -1 || index === segments.length) + return null; + return segments[index]; + } + + exports.AnyMap = AnyMap; + exports.GREATEST_LOWER_BOUND = GREATEST_LOWER_BOUND; + exports.LEAST_UPPER_BOUND = LEAST_UPPER_BOUND; + exports.TraceMap = TraceMap; + + Object.defineProperty(exports, '__esModule', { value: true }); + +})); +//# sourceMappingURL=trace-mapping.umd.js.map diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map new file mode 100644 index 0000000..4ef72e7 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"trace-mapping.umd.js","sources":["../../src/resolve.ts","../../src/strip-filename.ts","../../src/sourcemap-segment.ts","../../src/sort.ts","../../src/binary-search.ts","../../src/by-source.ts","../../src/any-map.ts","../../src/trace-mapping.ts"],"sourcesContent":[null,null,null,null,null,null,null,null],"names":["resolveUri","presortedDecodedMap","decodedMappings","encodedMappings","traceSegment","originalPositionFor","generatedPositionFor","eachMapping","decodedMap","encodedMap","encode","decode","bsFound"],"mappings":";;;;;;;;;;aAEwB,OAAO,CAAC,KAAa,EAAE,IAAwB;;;;QAIrE,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;YAAE,IAAI,IAAI,GAAG,CAAC;QAE7C,OAAOA,8BAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACjC;;ICTA;;;aAGwB,aAAa,CAAC,IAA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,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;SACzF;aAAM,IAAI,IAAI,KAAK,iBAAiB;YAAE,KAAK,EAAE,CAAC;QAE/C,IAAI,KAAK,KAAK,CAAC,CAAC,IAAI,KAAK,KAAK,QAAQ,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC;QAC3D,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC;IACzB;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/any-map.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/any-map.d.ts new file mode 100644 index 0000000..08bca6b --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/any-map.d.ts @@ -0,0 +1,8 @@ +import { TraceMap } from './trace-mapping'; +import type { SectionedSourceMapInput } from './types'; +declare type AnyMap = { + new (map: SectionedSourceMapInput, mapUrl?: string | null): TraceMap; + (map: SectionedSourceMapInput, mapUrl?: string | null): TraceMap; +}; +export declare const AnyMap: AnyMap; +export {}; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/binary-search.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/binary-search.d.ts new file mode 100644 index 0000000..88820e5 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/binary-search.d.ts @@ -0,0 +1,32 @@ +import type { SourceMapSegment, ReverseSegment } from './sourcemap-segment'; +export declare type MemoState = { + lastKey: number; + lastNeedle: number; + lastIndex: number; +}; +export declare let found: boolean; +/** + * A binary search implementation that returns the index if a match is found. + * If no match is found, then the left-index (the index associated with the item that comes just + * before the desired index) is returned. To maintain proper sort order, a splice would happen at + * the next index: + * + * ```js + * const array = [1, 3]; + * const needle = 2; + * const index = binarySearch(array, needle, (item, needle) => item - needle); + * + * assert.equal(index, 0); + * array.splice(index + 1, 0, needle); + * assert.deepEqual(array, [1, 2, 3]); + * ``` + */ +export declare function binarySearch(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, low: number, high: number): number; +export declare function upperBound(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, index: number): number; +export declare function lowerBound(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, index: number): number; +export declare function memoizedState(): MemoState; +/** + * This overly complicated beast is just to record the last tested line/column and the resulting + * index, allowing us to skip a few tests if mappings are monotonically increasing. + */ +export declare function memoizedBinarySearch(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, state: MemoState, key: number): number; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/by-source.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/by-source.d.ts new file mode 100644 index 0000000..8d1e538 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/by-source.d.ts @@ -0,0 +1,7 @@ +import type { ReverseSegment, SourceMapSegment } from './sourcemap-segment'; +import type { MemoState } from './binary-search'; +export declare type Source = { + __proto__: null; + [line: number]: Exclude[]; +}; +export default function buildBySources(decoded: readonly SourceMapSegment[][], memos: MemoState[]): Source[]; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/resolve.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/resolve.d.ts new file mode 100644 index 0000000..cf7d4f8 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/resolve.d.ts @@ -0,0 +1 @@ +export default function resolve(input: string, base: string | undefined): string; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/sort.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/sort.d.ts new file mode 100644 index 0000000..2bfb5dc --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/sort.d.ts @@ -0,0 +1,2 @@ +import type { SourceMapSegment } from './sourcemap-segment'; +export default function maybeSort(mappings: SourceMapSegment[][], owned: boolean): SourceMapSegment[][]; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/sourcemap-segment.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/sourcemap-segment.d.ts new file mode 100644 index 0000000..6d70924 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/sourcemap-segment.d.ts @@ -0,0 +1,16 @@ +declare type GeneratedColumn = number; +declare type SourcesIndex = number; +declare type SourceLine = number; +declare type SourceColumn = number; +declare type NamesIndex = number; +declare type GeneratedLine = number; +export declare type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex]; +export declare type ReverseSegment = [SourceColumn, GeneratedLine, GeneratedColumn]; +export declare const COLUMN = 0; +export declare const SOURCES_INDEX = 1; +export declare const SOURCE_LINE = 2; +export declare const SOURCE_COLUMN = 3; +export declare const NAMES_INDEX = 4; +export declare const REV_GENERATED_LINE = 1; +export declare const REV_GENERATED_COLUMN = 2; +export {}; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/strip-filename.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/strip-filename.d.ts new file mode 100644 index 0000000..bead5c1 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/strip-filename.d.ts @@ -0,0 +1,4 @@ +/** + * Removes everything after the last "/", but leaves the slash. + */ +export default function stripFilename(path: string | undefined | null): string; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts new file mode 100644 index 0000000..8cd4574 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts @@ -0,0 +1,70 @@ +import type { SourceMapSegment } from './sourcemap-segment'; +import type { SourceMapV3, DecodedSourceMap, EncodedSourceMap, InvalidOriginalMapping, OriginalMapping, InvalidGeneratedMapping, GeneratedMapping, SourceMapInput, Needle, SourceNeedle, SourceMap, EachMapping } from './types'; +export type { SourceMapSegment } from './sourcemap-segment'; +export type { SourceMapInput, SectionedSourceMapInput, DecodedSourceMap, EncodedSourceMap, SectionedSourceMap, InvalidOriginalMapping, OriginalMapping as Mapping, OriginalMapping, InvalidGeneratedMapping, GeneratedMapping, EachMapping, } from './types'; +export declare const LEAST_UPPER_BOUND = -1; +export declare const GREATEST_LOWER_BOUND = 1; +/** + * Returns the encoded (VLQ string) form of the SourceMap's mappings field. + */ +export declare let encodedMappings: (map: TraceMap) => EncodedSourceMap['mappings']; +/** + * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field. + */ +export declare let decodedMappings: (map: TraceMap) => Readonly; +/** + * A low-level API to find the segment associated with a generated line/column (think, from a + * stack trace). Line and column here are 0-based, unlike `originalPositionFor`. + */ +export declare let traceSegment: (map: TraceMap, line: number, column: number) => Readonly | null; +/** + * A higher-level API to find the source/line/column associated with a generated line/column + * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in + * `source-map` library. + */ +export declare let originalPositionFor: (map: TraceMap, needle: Needle) => OriginalMapping | InvalidOriginalMapping; +/** + * Finds the source/line/column directly after the mapping returned by originalPositionFor, provided + * the found mapping is from the same source and line as the originalPositionFor mapping. + * + * Eg, in the code `let id = 1`, `originalPositionAfter` could find the mapping associated with `1` + * using the same needle that would return `id` when calling `originalPositionFor`. + */ +export declare let generatedPositionFor: (map: TraceMap, needle: SourceNeedle) => GeneratedMapping | InvalidGeneratedMapping; +/** + * Iterates each mapping in generated position order. + */ +export declare let eachMapping: (map: TraceMap, cb: (mapping: EachMapping) => void) => void; +/** + * A helper that skips sorting of the input map's mappings array, which can be expensive for larger + * maps. + */ +export declare let presortedDecodedMap: (map: DecodedSourceMap, mapUrl?: string) => TraceMap; +/** + * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +export declare let decodedMap: (map: TraceMap) => Omit & { + mappings: readonly SourceMapSegment[][]; +}; +/** + * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +export declare let encodedMap: (map: TraceMap) => EncodedSourceMap; +export { AnyMap } from './any-map'; +export declare class TraceMap implements SourceMap { + version: SourceMapV3['version']; + file: SourceMapV3['file']; + names: SourceMapV3['names']; + sourceRoot: SourceMapV3['sourceRoot']; + sources: SourceMapV3['sources']; + sourcesContent: SourceMapV3['sourcesContent']; + resolvedSources: string[]; + private _encoded; + private _decoded; + private _decodedMemo; + private _bySources; + private _bySourceMemos; + constructor(map: SourceMapInput, mapUrl?: string | null); +} diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/types.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/types.d.ts new file mode 100644 index 0000000..2cc90c0 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/types/types.d.ts @@ -0,0 +1,85 @@ +import type { SourceMapSegment } from './sourcemap-segment'; +import type { TraceMap } from './trace-mapping'; +export interface SourceMapV3 { + file?: string | null; + names: string[]; + sourceRoot?: string; + sources: (string | null)[]; + sourcesContent?: (string | null)[]; + version: 3; +} +export interface EncodedSourceMap extends SourceMapV3 { + mappings: string; +} +export interface DecodedSourceMap extends SourceMapV3 { + mappings: SourceMapSegment[][]; +} +export interface Section { + offset: { + line: number; + column: number; + }; + map: EncodedSourceMap | DecodedSourceMap | SectionedSourceMap; +} +export interface SectionedSourceMap { + file?: string | null; + sections: Section[]; + version: 3; +} +export declare type OriginalMapping = { + source: string | null; + line: number; + column: number; + name: string | null; +}; +export declare type InvalidOriginalMapping = { + source: null; + line: null; + column: null; + name: null; +}; +export declare type GeneratedMapping = { + line: number; + column: number; +}; +export declare type InvalidGeneratedMapping = { + line: null; + column: null; +}; +export declare type SourceMapInput = string | EncodedSourceMap | DecodedSourceMap | TraceMap; +export declare type SectionedSourceMapInput = SourceMapInput | SectionedSourceMap; +export declare type Needle = { + line: number; + column: number; + bias?: 1 | -1; +}; +export declare type SourceNeedle = { + source: string; + line: number; + column: number; + bias?: 1 | -1; +}; +export declare type EachMapping = { + generatedLine: number; + generatedColumn: number; + source: null; + originalLine: null; + originalColumn: null; + name: null; +} | { + generatedLine: number; + generatedColumn: number; + source: string | null; + originalLine: number; + originalColumn: number; + name: string | null; +}; +export declare abstract class SourceMap { + version: SourceMapV3['version']; + file: SourceMapV3['file']; + names: SourceMapV3['names']; + sourceRoot: SourceMapV3['sourceRoot']; + sources: SourceMapV3['sources']; + sourcesContent: SourceMapV3['sourcesContent']; + resolvedSources: SourceMapV3['sources']; +} diff --git a/node_modules/@jridgewell/trace-mapping/package.json b/node_modules/@jridgewell/trace-mapping/package.json new file mode 100644 index 0000000..a957780 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/package.json @@ -0,0 +1,70 @@ +{ + "name": "@jridgewell/trace-mapping", + "version": "0.3.9", + "description": "Trace the original position through a source map", + "keywords": [ + "source", + "map" + ], + "main": "dist/trace-mapping.umd.js", + "module": "dist/trace-mapping.mjs", + "typings": "dist/types/trace-mapping.d.ts", + "files": [ + "dist" + ], + "exports": { + ".": { + "browser": "./dist/trace-mapping.umd.js", + "require": "./dist/trace-mapping.umd.js", + "import": "./dist/trace-mapping.mjs" + }, + "./package.json": "./package.json" + }, + "author": "Justin Ridgewell ", + "repository": { + "type": "git", + "url": "git+https://github.com/jridgewell/trace-mapping.git" + }, + "license": "MIT", + "scripts": { + "benchmark": "run-s build:rollup benchmark:*", + "benchmark:install": "cd benchmark && npm install", + "benchmark:only": "node benchmark/index.mjs", + "build": "run-s -n build:*", + "build:rollup": "rollup -c rollup.config.js", + "build:ts": "tsc --project tsconfig.build.json", + "lint": "run-s -n lint:*", + "lint:prettier": "npm run test:lint:prettier -- --write", + "lint:ts": "npm run test:lint:ts -- --fix", + "prebuild": "rm -rf dist", + "prepublishOnly": "npm run preversion", + "preversion": "run-s test build", + "test": "run-s -n test:lint test:only", + "test:debug": "ava debug", + "test:lint": "run-s -n test:lint:*", + "test:lint:prettier": "prettier --check '{src,test}/**/*.ts' '**/*.md'", + "test:lint:ts": "eslint '{src,test}/**/*.ts'", + "test:only": "c8 ava", + "test:watch": "ava --watch" + }, + "devDependencies": { + "@rollup/plugin-typescript": "8.3.0", + "@typescript-eslint/eslint-plugin": "5.10.0", + "@typescript-eslint/parser": "5.10.0", + "ava": "4.0.1", + "benchmark": "2.1.4", + "c8": "7.11.0", + "esbuild": "0.14.14", + "esbuild-node-loader": "0.6.4", + "eslint": "8.7.0", + "eslint-config-prettier": "8.3.0", + "npm-run-all": "4.1.5", + "prettier": "2.5.1", + "rollup": "2.64.0", + "typescript": "4.5.4" + }, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } +} diff --git a/node_modules/acorn-walk/CHANGELOG.md b/node_modules/acorn-walk/CHANGELOG.md new file mode 100644 index 0000000..0b4eea8 --- /dev/null +++ b/node_modules/acorn-walk/CHANGELOG.md @@ -0,0 +1,181 @@ +## 8.3.1 (2023-12-06) + +### Bug fixes + +Add `Function` and `Class` to the `AggregateType` type, so that they can be used in walkers without raising a type error. + +Visitor functions are now called in such a way that their `this` refers to the object they are part of. + +## 8.3.0 (2023-10-26) + +### New features + +Use a set of new, much more precise, TypeScript types. + +## 8.2.0 (2021-09-06) + +### New features + +Add support for walking ES2022 class static blocks. + +## 8.1.1 (2021-06-29) + +### Bug fixes + +Include `base` in the type declarations. + +## 8.1.0 (2021-04-24) + +### New features + +Support node types for class fields and private methods. + +## 8.0.2 (2021-01-25) + +### Bug fixes + +Adjust package.json to work with Node 12.16.0 and 13.0-13.6. + +## 8.0.0 (2021-01-05) + +### Bug fixes + +Fix a bug where `full` and `fullAncestor` would skip nodes with overridden types. + +## 8.0.0 (2020-08-12) + +### New features + +The package can now be loaded directly as an ECMAScript module in node 13+. + +## 7.2.0 (2020-06-17) + +### New features + +Support optional chaining and nullish coalescing. + +Support `import.meta`. + +Add support for `export * as ns from "source"`. + +## 7.1.1 (2020-02-13) + +### Bug fixes + +Clean up the type definitions to actually work well with the main parser. + +## 7.1.0 (2020-02-11) + +### New features + +Add a TypeScript definition file for the library. + +## 7.0.0 (2017-08-12) + +### New features + +Support walking `ImportExpression` nodes. + +## 6.2.0 (2017-07-04) + +### New features + +Add support for `Import` nodes. + +## 6.1.0 (2018-09-28) + +### New features + +The walker now walks `TemplateElement` nodes. + +## 6.0.1 (2018-09-14) + +### Bug fixes + +Fix bad "main" field in package.json. + +## 6.0.0 (2018-09-14) + +### Breaking changes + +This is now a separate package, `acorn-walk`, rather than part of the main `acorn` package. + +The `ScopeBody` and `ScopeExpression` meta-node-types are no longer supported. + +## 5.7.1 (2018-06-15) + +### Bug fixes + +Make sure the walker and bin files are rebuilt on release (the previous release didn't get the up-to-date versions). + +## 5.7.0 (2018-06-15) + +### Bug fixes + +Fix crash in walker when walking a binding-less catch node. + +## 5.6.2 (2018-06-05) + +### Bug fixes + +In the walker, go back to allowing the `baseVisitor` argument to be null to default to the default base everywhere. + +## 5.6.1 (2018-06-01) + +### Bug fixes + +Fix regression when passing `null` as fourth argument to `walk.recursive`. + +## 5.6.0 (2018-05-31) + +### Bug fixes + +Fix a bug in the walker that caused a crash when walking an object pattern spread. + +## 5.5.1 (2018-03-06) + +### Bug fixes + +Fix regression in walker causing property values in object patterns to be walked as expressions. + +## 5.5.0 (2018-02-27) + +### Bug fixes + +Support object spread in the AST walker. + +## 5.4.1 (2018-02-02) + +### Bug fixes + +5.4.0 somehow accidentally included an old version of walk.js. + +## 5.2.0 (2017-10-30) + +### Bug fixes + +The `full` and `fullAncestor` walkers no longer visit nodes multiple times. + +## 5.1.0 (2017-07-05) + +### New features + +New walker functions `full` and `fullAncestor`. + +## 3.2.0 (2016-06-07) + +### New features + +Make it possible to use `visit.ancestor` with a walk state. + +## 3.1.0 (2016-04-18) + +### New features + +The walker now allows defining handlers for `CatchClause` nodes. + +## 2.5.2 (2015-10-27) + +### Fixes + +Fix bug where the walker walked an exported `let` statement as an expression. diff --git a/node_modules/acorn-walk/LICENSE b/node_modules/acorn-walk/LICENSE new file mode 100644 index 0000000..d6be6db --- /dev/null +++ b/node_modules/acorn-walk/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (C) 2012-2020 by various contributors (see AUTHORS) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/acorn-walk/README.md b/node_modules/acorn-walk/README.md new file mode 100644 index 0000000..3c18a2c --- /dev/null +++ b/node_modules/acorn-walk/README.md @@ -0,0 +1,124 @@ +# Acorn AST walker + +An abstract syntax tree walker for the +[ESTree](https://github.com/estree/estree) format. + +## Community + +Acorn is open source software released under an +[MIT license](https://github.com/acornjs/acorn/blob/master/acorn-walk/LICENSE). + +You are welcome to +[report bugs](https://github.com/acornjs/acorn/issues) or create pull +requests on [github](https://github.com/acornjs/acorn). + +## Installation + +The easiest way to install acorn is from [`npm`](https://www.npmjs.com/): + +```sh +npm install acorn-walk +``` + +Alternately, you can download the source and build acorn yourself: + +```sh +git clone https://github.com/acornjs/acorn.git +cd acorn +npm install +``` + +## Interface + +An algorithm for recursing through a syntax tree is stored as an +object, with a property for each tree node type holding a function +that will recurse through such a node. There are several ways to run +such a walker. + +**simple**`(node, visitors, base, state)` does a 'simple' walk over a +tree. `node` should be the AST node to walk, and `visitors` an object +with properties whose names correspond to node types in the [ESTree +spec](https://github.com/estree/estree). The properties should contain +functions that will be called with the node object and, if applicable +the state at that point. The last two arguments are optional. `base` +is a walker algorithm, and `state` is a start state. The default +walker will simply visit all statements and expressions and not +produce a meaningful state. (An example of a use of state is to track +scope at each point in the tree.) + +```js +const acorn = require("acorn") +const walk = require("acorn-walk") + +walk.simple(acorn.parse("let x = 10"), { + Literal(node) { + console.log(`Found a literal: ${node.value}`) + } +}) +``` + +**ancestor**`(node, visitors, base, state)` does a 'simple' walk over +a tree, building up an array of ancestor nodes (including the current node) +and passing the array to the callbacks as a third parameter. + +```js +const acorn = require("acorn") +const walk = require("acorn-walk") + +walk.ancestor(acorn.parse("foo('hi')"), { + Literal(_node, _state, ancestors) { + console.log("This literal's ancestors are:", ancestors.map(n => n.type)) + } +}) +``` + +**recursive**`(node, state, functions, base)` does a 'recursive' +walk, where the walker functions are responsible for continuing the +walk on the child nodes of their target node. `state` is the start +state, and `functions` should contain an object that maps node types +to walker functions. Such functions are called with `(node, state, c)` +arguments, and can cause the walk to continue on a sub-node by calling +the `c` argument on it with `(node, state)` arguments. The optional +`base` argument provides the fallback walker functions for node types +that aren't handled in the `functions` object. If not given, the +default walkers will be used. + +**make**`(functions, base)` builds a new walker object by using the +walker functions in `functions` and filling in the missing ones by +taking defaults from `base`. + +**full**`(node, callback, base, state)` does a 'full' walk over a +tree, calling the callback with the arguments (node, state, type) for +each node + +**fullAncestor**`(node, callback, base, state)` does a 'full' walk +over a tree, building up an array of ancestor nodes (including the +current node) and passing the array to the callbacks as a third +parameter. + +```js +const acorn = require("acorn") +const walk = require("acorn-walk") + +walk.full(acorn.parse("1 + 1"), node => { + console.log(`There's a ${node.type} node at ${node.ch}`) +}) +``` + +**findNodeAt**`(node, start, end, test, base, state)` tries to locate +a node in a tree at the given start and/or end offsets, which +satisfies the predicate `test`. `start` and `end` can be either `null` +(as wildcard) or a number. `test` may be a string (indicating a node +type) or a function that takes `(nodeType, node)` arguments and +returns a boolean indicating whether this node is interesting. `base` +and `state` are optional, and can be used to specify a custom walker. +Nodes are tested from inner to outer, so if two nodes match the +boundaries, the inner one will be preferred. + +**findNodeAround**`(node, pos, test, base, state)` is a lot like +`findNodeAt`, but will match any node that exists 'around' (spanning) +the given position. + +**findNodeAfter**`(node, pos, test, base, state)` is similar to +`findNodeAround`, but will match all nodes *after* the given position +(testing outer nodes before inner nodes). diff --git a/node_modules/acorn-walk/dist/walk.d.mts b/node_modules/acorn-walk/dist/walk.d.mts new file mode 100644 index 0000000..e07a6af --- /dev/null +++ b/node_modules/acorn-walk/dist/walk.d.mts @@ -0,0 +1,177 @@ +import * as acorn from "acorn" + +export type FullWalkerCallback = ( + node: acorn.Node, + state: TState, + type: string +) => void + +export type FullAncestorWalkerCallback = ( + node: acorn.Node, + state: TState, + ancestors: acorn.Node[], + type: string +) => void + +type AggregateType = { + Expression: acorn.Expression, + Statement: acorn.Statement, + Function: acorn.Function, + Class: acorn.Class, + Pattern: acorn.Pattern, + ForInit: acorn.VariableDeclaration | acorn.Expression +} + +export type SimpleVisitors = { + [type in acorn.AnyNode["type"]]?: (node: Extract, state: TState) => void +} & { + [type in keyof AggregateType]?: (node: AggregateType[type], state: TState) => void +} + +export type AncestorVisitors = { + [type in acorn.AnyNode["type"]]?: ( node: Extract, state: TState, ancestors: acorn.Node[] +) => void +} & { + [type in keyof AggregateType]?: (node: AggregateType[type], state: TState, ancestors: acorn.Node[]) => void +} + +export type WalkerCallback = (node: acorn.Node, state: TState) => void + +export type RecursiveVisitors = { + [type in acorn.AnyNode["type"]]?: ( node: Extract, state: TState, callback: WalkerCallback) => void +} & { + [type in keyof AggregateType]?: (node: AggregateType[type], state: TState, callback: WalkerCallback) => void +} + +export type FindPredicate = (type: string, node: acorn.Node) => boolean + +export interface Found { + node: acorn.Node, + state: TState +} + +/** + * does a 'simple' walk over a tree + * @param node the AST node to walk + * @param visitors an object with properties whose names correspond to node types in the {@link https://github.com/estree/estree | ESTree spec}. The properties should contain functions that will be called with the node object and, if applicable the state at that point. + * @param base a walker algorithm + * @param state a start state. The default walker will simply visit all statements and expressions and not produce a meaningful state. (An example of a use of state is to track scope at each point in the tree.) + */ +export function simple( + node: acorn.Node, + visitors: SimpleVisitors, + base?: RecursiveVisitors, + state?: TState +): void + +/** + * does a 'simple' walk over a tree, building up an array of ancestor nodes (including the current node) and passing the array to the callbacks as a third parameter. + * @param node + * @param visitors + * @param base + * @param state + */ +export function ancestor( + node: acorn.Node, + visitors: AncestorVisitors, + base?: RecursiveVisitors, + state?: TState + ): void + +/** + * does a 'recursive' walk, where the walker functions are responsible for continuing the walk on the child nodes of their target node. + * @param node + * @param state the start state + * @param functions contain an object that maps node types to walker functions + * @param base provides the fallback walker functions for node types that aren't handled in the {@link functions} object. If not given, the default walkers will be used. + */ +export function recursive( + node: acorn.Node, + state: TState, + functions: RecursiveVisitors, + base?: RecursiveVisitors +): void + +/** + * does a 'full' walk over a tree, calling the {@link callback} with the arguments (node, state, type) for each node + * @param node + * @param callback + * @param base + * @param state + */ +export function full( + node: acorn.Node, + callback: FullWalkerCallback, + base?: RecursiveVisitors, + state?: TState +): void + +/** + * does a 'full' walk over a tree, building up an array of ancestor nodes (including the current node) and passing the array to the callbacks as a third parameter. + * @param node + * @param callback + * @param base + * @param state + */ +export function fullAncestor( + node: acorn.Node, + callback: FullAncestorWalkerCallback, + base?: RecursiveVisitors, + state?: TState +): void + +/** + * builds a new walker object by using the walker functions in {@link functions} and filling in the missing ones by taking defaults from {@link base}. + * @param functions + * @param base + */ +export function make( + functions: RecursiveVisitors, + base?: RecursiveVisitors +): RecursiveVisitors + +/** + * tries to locate a node in a tree at the given start and/or end offsets, which satisfies the predicate test. {@link start} and {@link end} can be either `null` (as wildcard) or a `number`. {@link test} may be a string (indicating a node type) or a function that takes (nodeType, node) arguments and returns a boolean indicating whether this node is interesting. {@link base} and {@link state} are optional, and can be used to specify a custom walker. Nodes are tested from inner to outer, so if two nodes match the boundaries, the inner one will be preferred. + * @param node + * @param start + * @param end + * @param type + * @param base + * @param state + */ +export function findNodeAt( + node: acorn.Node, + start: number | undefined, + end?: number | undefined, + type?: FindPredicate | string, + base?: RecursiveVisitors, + state?: TState +): Found | undefined + +/** + * like {@link findNodeAt}, but will match any node that exists 'around' (spanning) the given position. + * @param node + * @param start + * @param type + * @param base + * @param state + */ +export function findNodeAround( + node: acorn.Node, + start: number | undefined, + type?: FindPredicate | string, + base?: RecursiveVisitors, + state?: TState +): Found | undefined + +/** + * Find the outermost matching node after a given position. + */ +export const findNodeAfter: typeof findNodeAround + +/** + * Find the outermost matching node before a given position. + */ +export const findNodeBefore: typeof findNodeAround + +export const base: RecursiveVisitors diff --git a/node_modules/acorn-walk/dist/walk.d.ts b/node_modules/acorn-walk/dist/walk.d.ts new file mode 100644 index 0000000..e07a6af --- /dev/null +++ b/node_modules/acorn-walk/dist/walk.d.ts @@ -0,0 +1,177 @@ +import * as acorn from "acorn" + +export type FullWalkerCallback = ( + node: acorn.Node, + state: TState, + type: string +) => void + +export type FullAncestorWalkerCallback = ( + node: acorn.Node, + state: TState, + ancestors: acorn.Node[], + type: string +) => void + +type AggregateType = { + Expression: acorn.Expression, + Statement: acorn.Statement, + Function: acorn.Function, + Class: acorn.Class, + Pattern: acorn.Pattern, + ForInit: acorn.VariableDeclaration | acorn.Expression +} + +export type SimpleVisitors = { + [type in acorn.AnyNode["type"]]?: (node: Extract, state: TState) => void +} & { + [type in keyof AggregateType]?: (node: AggregateType[type], state: TState) => void +} + +export type AncestorVisitors = { + [type in acorn.AnyNode["type"]]?: ( node: Extract, state: TState, ancestors: acorn.Node[] +) => void +} & { + [type in keyof AggregateType]?: (node: AggregateType[type], state: TState, ancestors: acorn.Node[]) => void +} + +export type WalkerCallback = (node: acorn.Node, state: TState) => void + +export type RecursiveVisitors = { + [type in acorn.AnyNode["type"]]?: ( node: Extract, state: TState, callback: WalkerCallback) => void +} & { + [type in keyof AggregateType]?: (node: AggregateType[type], state: TState, callback: WalkerCallback) => void +} + +export type FindPredicate = (type: string, node: acorn.Node) => boolean + +export interface Found { + node: acorn.Node, + state: TState +} + +/** + * does a 'simple' walk over a tree + * @param node the AST node to walk + * @param visitors an object with properties whose names correspond to node types in the {@link https://github.com/estree/estree | ESTree spec}. The properties should contain functions that will be called with the node object and, if applicable the state at that point. + * @param base a walker algorithm + * @param state a start state. The default walker will simply visit all statements and expressions and not produce a meaningful state. (An example of a use of state is to track scope at each point in the tree.) + */ +export function simple( + node: acorn.Node, + visitors: SimpleVisitors, + base?: RecursiveVisitors, + state?: TState +): void + +/** + * does a 'simple' walk over a tree, building up an array of ancestor nodes (including the current node) and passing the array to the callbacks as a third parameter. + * @param node + * @param visitors + * @param base + * @param state + */ +export function ancestor( + node: acorn.Node, + visitors: AncestorVisitors, + base?: RecursiveVisitors, + state?: TState + ): void + +/** + * does a 'recursive' walk, where the walker functions are responsible for continuing the walk on the child nodes of their target node. + * @param node + * @param state the start state + * @param functions contain an object that maps node types to walker functions + * @param base provides the fallback walker functions for node types that aren't handled in the {@link functions} object. If not given, the default walkers will be used. + */ +export function recursive( + node: acorn.Node, + state: TState, + functions: RecursiveVisitors, + base?: RecursiveVisitors +): void + +/** + * does a 'full' walk over a tree, calling the {@link callback} with the arguments (node, state, type) for each node + * @param node + * @param callback + * @param base + * @param state + */ +export function full( + node: acorn.Node, + callback: FullWalkerCallback, + base?: RecursiveVisitors, + state?: TState +): void + +/** + * does a 'full' walk over a tree, building up an array of ancestor nodes (including the current node) and passing the array to the callbacks as a third parameter. + * @param node + * @param callback + * @param base + * @param state + */ +export function fullAncestor( + node: acorn.Node, + callback: FullAncestorWalkerCallback, + base?: RecursiveVisitors, + state?: TState +): void + +/** + * builds a new walker object by using the walker functions in {@link functions} and filling in the missing ones by taking defaults from {@link base}. + * @param functions + * @param base + */ +export function make( + functions: RecursiveVisitors, + base?: RecursiveVisitors +): RecursiveVisitors + +/** + * tries to locate a node in a tree at the given start and/or end offsets, which satisfies the predicate test. {@link start} and {@link end} can be either `null` (as wildcard) or a `number`. {@link test} may be a string (indicating a node type) or a function that takes (nodeType, node) arguments and returns a boolean indicating whether this node is interesting. {@link base} and {@link state} are optional, and can be used to specify a custom walker. Nodes are tested from inner to outer, so if two nodes match the boundaries, the inner one will be preferred. + * @param node + * @param start + * @param end + * @param type + * @param base + * @param state + */ +export function findNodeAt( + node: acorn.Node, + start: number | undefined, + end?: number | undefined, + type?: FindPredicate | string, + base?: RecursiveVisitors, + state?: TState +): Found | undefined + +/** + * like {@link findNodeAt}, but will match any node that exists 'around' (spanning) the given position. + * @param node + * @param start + * @param type + * @param base + * @param state + */ +export function findNodeAround( + node: acorn.Node, + start: number | undefined, + type?: FindPredicate | string, + base?: RecursiveVisitors, + state?: TState +): Found | undefined + +/** + * Find the outermost matching node after a given position. + */ +export const findNodeAfter: typeof findNodeAround + +/** + * Find the outermost matching node before a given position. + */ +export const findNodeBefore: typeof findNodeAround + +export const base: RecursiveVisitors diff --git a/node_modules/acorn-walk/dist/walk.js b/node_modules/acorn-walk/dist/walk.js new file mode 100644 index 0000000..580df64 --- /dev/null +++ b/node_modules/acorn-walk/dist/walk.js @@ -0,0 +1,461 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.acorn = global.acorn || {}, global.acorn.walk = {}))); +})(this, (function (exports) { 'use strict'; + + // AST walker module for ESTree compatible trees + + // A simple walk is one where you simply specify callbacks to be + // called on specific nodes. The last two arguments are optional. A + // simple use would be + // + // walk.simple(myTree, { + // Expression: function(node) { ... } + // }); + // + // to do something with all expressions. All ESTree node types + // can be used to identify node types, as well as Expression and + // Statement, which denote categories of nodes. + // + // The base argument can be used to pass a custom (recursive) + // walker, and state can be used to give this walked an initial + // state. + + function simple(node, visitors, baseVisitor, state, override) { + if (!baseVisitor) { baseVisitor = base + ; }(function c(node, st, override) { + var type = override || node.type; + baseVisitor[type](node, st, c); + if (visitors[type]) { visitors[type](node, st); } + })(node, state, override); + } + + // An ancestor walk keeps an array of ancestor nodes (including the + // current node) and passes them to the callback as third parameter + // (and also as state parameter when no other state is present). + function ancestor(node, visitors, baseVisitor, state, override) { + var ancestors = []; + if (!baseVisitor) { baseVisitor = base + ; }(function c(node, st, override) { + var type = override || node.type; + var isNew = node !== ancestors[ancestors.length - 1]; + if (isNew) { ancestors.push(node); } + baseVisitor[type](node, st, c); + if (visitors[type]) { visitors[type](node, st || ancestors, ancestors); } + if (isNew) { ancestors.pop(); } + })(node, state, override); + } + + // A recursive walk is one where your functions override the default + // walkers. They can modify and replace the state parameter that's + // threaded through the walk, and can opt how and whether to walk + // their child nodes (by calling their third argument on these + // nodes). + function recursive(node, state, funcs, baseVisitor, override) { + var visitor = funcs ? make(funcs, baseVisitor || undefined) : baseVisitor + ;(function c(node, st, override) { + visitor[override || node.type](node, st, c); + })(node, state, override); + } + + function makeTest(test) { + if (typeof test === "string") + { return function (type) { return type === test; } } + else if (!test) + { return function () { return true; } } + else + { return test } + } + + var Found = function Found(node, state) { this.node = node; this.state = state; }; + + // A full walk triggers the callback on each node + function full(node, callback, baseVisitor, state, override) { + if (!baseVisitor) { baseVisitor = base; } + var last + ;(function c(node, st, override) { + var type = override || node.type; + baseVisitor[type](node, st, c); + if (last !== node) { + callback(node, st, type); + last = node; + } + })(node, state, override); + } + + // An fullAncestor walk is like an ancestor walk, but triggers + // the callback on each node + function fullAncestor(node, callback, baseVisitor, state) { + if (!baseVisitor) { baseVisitor = base; } + var ancestors = [], last + ;(function c(node, st, override) { + var type = override || node.type; + var isNew = node !== ancestors[ancestors.length - 1]; + if (isNew) { ancestors.push(node); } + baseVisitor[type](node, st, c); + if (last !== node) { + callback(node, st || ancestors, ancestors, type); + last = node; + } + if (isNew) { ancestors.pop(); } + })(node, state); + } + + // Find a node with a given start, end, and type (all are optional, + // null can be used as wildcard). Returns a {node, state} object, or + // undefined when it doesn't find a matching node. + function findNodeAt(node, start, end, test, baseVisitor, state) { + if (!baseVisitor) { baseVisitor = base; } + test = makeTest(test); + try { + (function c(node, st, override) { + var type = override || node.type; + if ((start == null || node.start <= start) && + (end == null || node.end >= end)) + { baseVisitor[type](node, st, c); } + if ((start == null || node.start === start) && + (end == null || node.end === end) && + test(type, node)) + { throw new Found(node, st) } + })(node, state); + } catch (e) { + if (e instanceof Found) { return e } + throw e + } + } + + // Find the innermost node of a given type that contains the given + // position. Interface similar to findNodeAt. + function findNodeAround(node, pos, test, baseVisitor, state) { + test = makeTest(test); + if (!baseVisitor) { baseVisitor = base; } + try { + (function c(node, st, override) { + var type = override || node.type; + if (node.start > pos || node.end < pos) { return } + baseVisitor[type](node, st, c); + if (test(type, node)) { throw new Found(node, st) } + })(node, state); + } catch (e) { + if (e instanceof Found) { return e } + throw e + } + } + + // Find the outermost matching node after a given position. + function findNodeAfter(node, pos, test, baseVisitor, state) { + test = makeTest(test); + if (!baseVisitor) { baseVisitor = base; } + try { + (function c(node, st, override) { + if (node.end < pos) { return } + var type = override || node.type; + if (node.start >= pos && test(type, node)) { throw new Found(node, st) } + baseVisitor[type](node, st, c); + })(node, state); + } catch (e) { + if (e instanceof Found) { return e } + throw e + } + } + + // Find the outermost matching node before a given position. + function findNodeBefore(node, pos, test, baseVisitor, state) { + test = makeTest(test); + if (!baseVisitor) { baseVisitor = base; } + var max + ;(function c(node, st, override) { + if (node.start > pos) { return } + var type = override || node.type; + if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node)) + { max = new Found(node, st); } + baseVisitor[type](node, st, c); + })(node, state); + return max + } + + // Used to create a custom walker. Will fill in all missing node + // type properties with the defaults. + function make(funcs, baseVisitor) { + var visitor = Object.create(baseVisitor || base); + for (var type in funcs) { visitor[type] = funcs[type]; } + return visitor + } + + function skipThrough(node, st, c) { c(node, st); } + function ignore(_node, _st, _c) {} + + // Node walkers. + + var base = {}; + + base.Program = base.BlockStatement = base.StaticBlock = function (node, st, c) { + for (var i = 0, list = node.body; i < list.length; i += 1) + { + var stmt = list[i]; + + c(stmt, st, "Statement"); + } + }; + base.Statement = skipThrough; + base.EmptyStatement = ignore; + base.ExpressionStatement = base.ParenthesizedExpression = base.ChainExpression = + function (node, st, c) { return c(node.expression, st, "Expression"); }; + base.IfStatement = function (node, st, c) { + c(node.test, st, "Expression"); + c(node.consequent, st, "Statement"); + if (node.alternate) { c(node.alternate, st, "Statement"); } + }; + base.LabeledStatement = function (node, st, c) { return c(node.body, st, "Statement"); }; + base.BreakStatement = base.ContinueStatement = ignore; + base.WithStatement = function (node, st, c) { + c(node.object, st, "Expression"); + c(node.body, st, "Statement"); + }; + base.SwitchStatement = function (node, st, c) { + c(node.discriminant, st, "Expression"); + for (var i$1 = 0, list$1 = node.cases; i$1 < list$1.length; i$1 += 1) { + var cs = list$1[i$1]; + + if (cs.test) { c(cs.test, st, "Expression"); } + for (var i = 0, list = cs.consequent; i < list.length; i += 1) + { + var cons = list[i]; + + c(cons, st, "Statement"); + } + } + }; + base.SwitchCase = function (node, st, c) { + if (node.test) { c(node.test, st, "Expression"); } + for (var i = 0, list = node.consequent; i < list.length; i += 1) + { + var cons = list[i]; + + c(cons, st, "Statement"); + } + }; + base.ReturnStatement = base.YieldExpression = base.AwaitExpression = function (node, st, c) { + if (node.argument) { c(node.argument, st, "Expression"); } + }; + base.ThrowStatement = base.SpreadElement = + function (node, st, c) { return c(node.argument, st, "Expression"); }; + base.TryStatement = function (node, st, c) { + c(node.block, st, "Statement"); + if (node.handler) { c(node.handler, st); } + if (node.finalizer) { c(node.finalizer, st, "Statement"); } + }; + base.CatchClause = function (node, st, c) { + if (node.param) { c(node.param, st, "Pattern"); } + c(node.body, st, "Statement"); + }; + base.WhileStatement = base.DoWhileStatement = function (node, st, c) { + c(node.test, st, "Expression"); + c(node.body, st, "Statement"); + }; + base.ForStatement = function (node, st, c) { + if (node.init) { c(node.init, st, "ForInit"); } + if (node.test) { c(node.test, st, "Expression"); } + if (node.update) { c(node.update, st, "Expression"); } + c(node.body, st, "Statement"); + }; + base.ForInStatement = base.ForOfStatement = function (node, st, c) { + c(node.left, st, "ForInit"); + c(node.right, st, "Expression"); + c(node.body, st, "Statement"); + }; + base.ForInit = function (node, st, c) { + if (node.type === "VariableDeclaration") { c(node, st); } + else { c(node, st, "Expression"); } + }; + base.DebuggerStatement = ignore; + + base.FunctionDeclaration = function (node, st, c) { return c(node, st, "Function"); }; + base.VariableDeclaration = function (node, st, c) { + for (var i = 0, list = node.declarations; i < list.length; i += 1) + { + var decl = list[i]; + + c(decl, st); + } + }; + base.VariableDeclarator = function (node, st, c) { + c(node.id, st, "Pattern"); + if (node.init) { c(node.init, st, "Expression"); } + }; + + base.Function = function (node, st, c) { + if (node.id) { c(node.id, st, "Pattern"); } + for (var i = 0, list = node.params; i < list.length; i += 1) + { + var param = list[i]; + + c(param, st, "Pattern"); + } + c(node.body, st, node.expression ? "Expression" : "Statement"); + }; + + base.Pattern = function (node, st, c) { + if (node.type === "Identifier") + { c(node, st, "VariablePattern"); } + else if (node.type === "MemberExpression") + { c(node, st, "MemberPattern"); } + else + { c(node, st); } + }; + base.VariablePattern = ignore; + base.MemberPattern = skipThrough; + base.RestElement = function (node, st, c) { return c(node.argument, st, "Pattern"); }; + base.ArrayPattern = function (node, st, c) { + for (var i = 0, list = node.elements; i < list.length; i += 1) { + var elt = list[i]; + + if (elt) { c(elt, st, "Pattern"); } + } + }; + base.ObjectPattern = function (node, st, c) { + for (var i = 0, list = node.properties; i < list.length; i += 1) { + var prop = list[i]; + + if (prop.type === "Property") { + if (prop.computed) { c(prop.key, st, "Expression"); } + c(prop.value, st, "Pattern"); + } else if (prop.type === "RestElement") { + c(prop.argument, st, "Pattern"); + } + } + }; + + base.Expression = skipThrough; + base.ThisExpression = base.Super = base.MetaProperty = ignore; + base.ArrayExpression = function (node, st, c) { + for (var i = 0, list = node.elements; i < list.length; i += 1) { + var elt = list[i]; + + if (elt) { c(elt, st, "Expression"); } + } + }; + base.ObjectExpression = function (node, st, c) { + for (var i = 0, list = node.properties; i < list.length; i += 1) + { + var prop = list[i]; + + c(prop, st); + } + }; + base.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration; + base.SequenceExpression = function (node, st, c) { + for (var i = 0, list = node.expressions; i < list.length; i += 1) + { + var expr = list[i]; + + c(expr, st, "Expression"); + } + }; + base.TemplateLiteral = function (node, st, c) { + for (var i = 0, list = node.quasis; i < list.length; i += 1) + { + var quasi = list[i]; + + c(quasi, st); + } + + for (var i$1 = 0, list$1 = node.expressions; i$1 < list$1.length; i$1 += 1) + { + var expr = list$1[i$1]; + + c(expr, st, "Expression"); + } + }; + base.TemplateElement = ignore; + base.UnaryExpression = base.UpdateExpression = function (node, st, c) { + c(node.argument, st, "Expression"); + }; + base.BinaryExpression = base.LogicalExpression = function (node, st, c) { + c(node.left, st, "Expression"); + c(node.right, st, "Expression"); + }; + base.AssignmentExpression = base.AssignmentPattern = function (node, st, c) { + c(node.left, st, "Pattern"); + c(node.right, st, "Expression"); + }; + base.ConditionalExpression = function (node, st, c) { + c(node.test, st, "Expression"); + c(node.consequent, st, "Expression"); + c(node.alternate, st, "Expression"); + }; + base.NewExpression = base.CallExpression = function (node, st, c) { + c(node.callee, st, "Expression"); + if (node.arguments) + { for (var i = 0, list = node.arguments; i < list.length; i += 1) + { + var arg = list[i]; + + c(arg, st, "Expression"); + } } + }; + base.MemberExpression = function (node, st, c) { + c(node.object, st, "Expression"); + if (node.computed) { c(node.property, st, "Expression"); } + }; + base.ExportNamedDeclaration = base.ExportDefaultDeclaration = function (node, st, c) { + if (node.declaration) + { c(node.declaration, st, node.type === "ExportNamedDeclaration" || node.declaration.id ? "Statement" : "Expression"); } + if (node.source) { c(node.source, st, "Expression"); } + }; + base.ExportAllDeclaration = function (node, st, c) { + if (node.exported) + { c(node.exported, st); } + c(node.source, st, "Expression"); + }; + base.ImportDeclaration = function (node, st, c) { + for (var i = 0, list = node.specifiers; i < list.length; i += 1) + { + var spec = list[i]; + + c(spec, st); + } + c(node.source, st, "Expression"); + }; + base.ImportExpression = function (node, st, c) { + c(node.source, st, "Expression"); + }; + base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.PrivateIdentifier = base.Literal = ignore; + + base.TaggedTemplateExpression = function (node, st, c) { + c(node.tag, st, "Expression"); + c(node.quasi, st, "Expression"); + }; + base.ClassDeclaration = base.ClassExpression = function (node, st, c) { return c(node, st, "Class"); }; + base.Class = function (node, st, c) { + if (node.id) { c(node.id, st, "Pattern"); } + if (node.superClass) { c(node.superClass, st, "Expression"); } + c(node.body, st); + }; + base.ClassBody = function (node, st, c) { + for (var i = 0, list = node.body; i < list.length; i += 1) + { + var elt = list[i]; + + c(elt, st); + } + }; + base.MethodDefinition = base.PropertyDefinition = base.Property = function (node, st, c) { + if (node.computed) { c(node.key, st, "Expression"); } + if (node.value) { c(node.value, st, "Expression"); } + }; + + exports.ancestor = ancestor; + exports.base = base; + exports.findNodeAfter = findNodeAfter; + exports.findNodeAround = findNodeAround; + exports.findNodeAt = findNodeAt; + exports.findNodeBefore = findNodeBefore; + exports.full = full; + exports.fullAncestor = fullAncestor; + exports.make = make; + exports.recursive = recursive; + exports.simple = simple; + +})); diff --git a/node_modules/acorn-walk/dist/walk.mjs b/node_modules/acorn-walk/dist/walk.mjs new file mode 100644 index 0000000..19eebc0 --- /dev/null +++ b/node_modules/acorn-walk/dist/walk.mjs @@ -0,0 +1,443 @@ +// AST walker module for ESTree compatible trees + +// A simple walk is one where you simply specify callbacks to be +// called on specific nodes. The last two arguments are optional. A +// simple use would be +// +// walk.simple(myTree, { +// Expression: function(node) { ... } +// }); +// +// to do something with all expressions. All ESTree node types +// can be used to identify node types, as well as Expression and +// Statement, which denote categories of nodes. +// +// The base argument can be used to pass a custom (recursive) +// walker, and state can be used to give this walked an initial +// state. + +function simple(node, visitors, baseVisitor, state, override) { + if (!baseVisitor) { baseVisitor = base + ; }(function c(node, st, override) { + var type = override || node.type; + baseVisitor[type](node, st, c); + if (visitors[type]) { visitors[type](node, st); } + })(node, state, override); +} + +// An ancestor walk keeps an array of ancestor nodes (including the +// current node) and passes them to the callback as third parameter +// (and also as state parameter when no other state is present). +function ancestor(node, visitors, baseVisitor, state, override) { + var ancestors = []; + if (!baseVisitor) { baseVisitor = base + ; }(function c(node, st, override) { + var type = override || node.type; + var isNew = node !== ancestors[ancestors.length - 1]; + if (isNew) { ancestors.push(node); } + baseVisitor[type](node, st, c); + if (visitors[type]) { visitors[type](node, st || ancestors, ancestors); } + if (isNew) { ancestors.pop(); } + })(node, state, override); +} + +// A recursive walk is one where your functions override the default +// walkers. They can modify and replace the state parameter that's +// threaded through the walk, and can opt how and whether to walk +// their child nodes (by calling their third argument on these +// nodes). +function recursive(node, state, funcs, baseVisitor, override) { + var visitor = funcs ? make(funcs, baseVisitor || undefined) : baseVisitor + ;(function c(node, st, override) { + visitor[override || node.type](node, st, c); + })(node, state, override); +} + +function makeTest(test) { + if (typeof test === "string") + { return function (type) { return type === test; } } + else if (!test) + { return function () { return true; } } + else + { return test } +} + +var Found = function Found(node, state) { this.node = node; this.state = state; }; + +// A full walk triggers the callback on each node +function full(node, callback, baseVisitor, state, override) { + if (!baseVisitor) { baseVisitor = base; } + var last + ;(function c(node, st, override) { + var type = override || node.type; + baseVisitor[type](node, st, c); + if (last !== node) { + callback(node, st, type); + last = node; + } + })(node, state, override); +} + +// An fullAncestor walk is like an ancestor walk, but triggers +// the callback on each node +function fullAncestor(node, callback, baseVisitor, state) { + if (!baseVisitor) { baseVisitor = base; } + var ancestors = [], last + ;(function c(node, st, override) { + var type = override || node.type; + var isNew = node !== ancestors[ancestors.length - 1]; + if (isNew) { ancestors.push(node); } + baseVisitor[type](node, st, c); + if (last !== node) { + callback(node, st || ancestors, ancestors, type); + last = node; + } + if (isNew) { ancestors.pop(); } + })(node, state); +} + +// Find a node with a given start, end, and type (all are optional, +// null can be used as wildcard). Returns a {node, state} object, or +// undefined when it doesn't find a matching node. +function findNodeAt(node, start, end, test, baseVisitor, state) { + if (!baseVisitor) { baseVisitor = base; } + test = makeTest(test); + try { + (function c(node, st, override) { + var type = override || node.type; + if ((start == null || node.start <= start) && + (end == null || node.end >= end)) + { baseVisitor[type](node, st, c); } + if ((start == null || node.start === start) && + (end == null || node.end === end) && + test(type, node)) + { throw new Found(node, st) } + })(node, state); + } catch (e) { + if (e instanceof Found) { return e } + throw e + } +} + +// Find the innermost node of a given type that contains the given +// position. Interface similar to findNodeAt. +function findNodeAround(node, pos, test, baseVisitor, state) { + test = makeTest(test); + if (!baseVisitor) { baseVisitor = base; } + try { + (function c(node, st, override) { + var type = override || node.type; + if (node.start > pos || node.end < pos) { return } + baseVisitor[type](node, st, c); + if (test(type, node)) { throw new Found(node, st) } + })(node, state); + } catch (e) { + if (e instanceof Found) { return e } + throw e + } +} + +// Find the outermost matching node after a given position. +function findNodeAfter(node, pos, test, baseVisitor, state) { + test = makeTest(test); + if (!baseVisitor) { baseVisitor = base; } + try { + (function c(node, st, override) { + if (node.end < pos) { return } + var type = override || node.type; + if (node.start >= pos && test(type, node)) { throw new Found(node, st) } + baseVisitor[type](node, st, c); + })(node, state); + } catch (e) { + if (e instanceof Found) { return e } + throw e + } +} + +// Find the outermost matching node before a given position. +function findNodeBefore(node, pos, test, baseVisitor, state) { + test = makeTest(test); + if (!baseVisitor) { baseVisitor = base; } + var max + ;(function c(node, st, override) { + if (node.start > pos) { return } + var type = override || node.type; + if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node)) + { max = new Found(node, st); } + baseVisitor[type](node, st, c); + })(node, state); + return max +} + +// Used to create a custom walker. Will fill in all missing node +// type properties with the defaults. +function make(funcs, baseVisitor) { + var visitor = Object.create(baseVisitor || base); + for (var type in funcs) { visitor[type] = funcs[type]; } + return visitor +} + +function skipThrough(node, st, c) { c(node, st); } +function ignore(_node, _st, _c) {} + +// Node walkers. + +var base = {}; + +base.Program = base.BlockStatement = base.StaticBlock = function (node, st, c) { + for (var i = 0, list = node.body; i < list.length; i += 1) + { + var stmt = list[i]; + + c(stmt, st, "Statement"); + } +}; +base.Statement = skipThrough; +base.EmptyStatement = ignore; +base.ExpressionStatement = base.ParenthesizedExpression = base.ChainExpression = + function (node, st, c) { return c(node.expression, st, "Expression"); }; +base.IfStatement = function (node, st, c) { + c(node.test, st, "Expression"); + c(node.consequent, st, "Statement"); + if (node.alternate) { c(node.alternate, st, "Statement"); } +}; +base.LabeledStatement = function (node, st, c) { return c(node.body, st, "Statement"); }; +base.BreakStatement = base.ContinueStatement = ignore; +base.WithStatement = function (node, st, c) { + c(node.object, st, "Expression"); + c(node.body, st, "Statement"); +}; +base.SwitchStatement = function (node, st, c) { + c(node.discriminant, st, "Expression"); + for (var i$1 = 0, list$1 = node.cases; i$1 < list$1.length; i$1 += 1) { + var cs = list$1[i$1]; + + if (cs.test) { c(cs.test, st, "Expression"); } + for (var i = 0, list = cs.consequent; i < list.length; i += 1) + { + var cons = list[i]; + + c(cons, st, "Statement"); + } + } +}; +base.SwitchCase = function (node, st, c) { + if (node.test) { c(node.test, st, "Expression"); } + for (var i = 0, list = node.consequent; i < list.length; i += 1) + { + var cons = list[i]; + + c(cons, st, "Statement"); + } +}; +base.ReturnStatement = base.YieldExpression = base.AwaitExpression = function (node, st, c) { + if (node.argument) { c(node.argument, st, "Expression"); } +}; +base.ThrowStatement = base.SpreadElement = + function (node, st, c) { return c(node.argument, st, "Expression"); }; +base.TryStatement = function (node, st, c) { + c(node.block, st, "Statement"); + if (node.handler) { c(node.handler, st); } + if (node.finalizer) { c(node.finalizer, st, "Statement"); } +}; +base.CatchClause = function (node, st, c) { + if (node.param) { c(node.param, st, "Pattern"); } + c(node.body, st, "Statement"); +}; +base.WhileStatement = base.DoWhileStatement = function (node, st, c) { + c(node.test, st, "Expression"); + c(node.body, st, "Statement"); +}; +base.ForStatement = function (node, st, c) { + if (node.init) { c(node.init, st, "ForInit"); } + if (node.test) { c(node.test, st, "Expression"); } + if (node.update) { c(node.update, st, "Expression"); } + c(node.body, st, "Statement"); +}; +base.ForInStatement = base.ForOfStatement = function (node, st, c) { + c(node.left, st, "ForInit"); + c(node.right, st, "Expression"); + c(node.body, st, "Statement"); +}; +base.ForInit = function (node, st, c) { + if (node.type === "VariableDeclaration") { c(node, st); } + else { c(node, st, "Expression"); } +}; +base.DebuggerStatement = ignore; + +base.FunctionDeclaration = function (node, st, c) { return c(node, st, "Function"); }; +base.VariableDeclaration = function (node, st, c) { + for (var i = 0, list = node.declarations; i < list.length; i += 1) + { + var decl = list[i]; + + c(decl, st); + } +}; +base.VariableDeclarator = function (node, st, c) { + c(node.id, st, "Pattern"); + if (node.init) { c(node.init, st, "Expression"); } +}; + +base.Function = function (node, st, c) { + if (node.id) { c(node.id, st, "Pattern"); } + for (var i = 0, list = node.params; i < list.length; i += 1) + { + var param = list[i]; + + c(param, st, "Pattern"); + } + c(node.body, st, node.expression ? "Expression" : "Statement"); +}; + +base.Pattern = function (node, st, c) { + if (node.type === "Identifier") + { c(node, st, "VariablePattern"); } + else if (node.type === "MemberExpression") + { c(node, st, "MemberPattern"); } + else + { c(node, st); } +}; +base.VariablePattern = ignore; +base.MemberPattern = skipThrough; +base.RestElement = function (node, st, c) { return c(node.argument, st, "Pattern"); }; +base.ArrayPattern = function (node, st, c) { + for (var i = 0, list = node.elements; i < list.length; i += 1) { + var elt = list[i]; + + if (elt) { c(elt, st, "Pattern"); } + } +}; +base.ObjectPattern = function (node, st, c) { + for (var i = 0, list = node.properties; i < list.length; i += 1) { + var prop = list[i]; + + if (prop.type === "Property") { + if (prop.computed) { c(prop.key, st, "Expression"); } + c(prop.value, st, "Pattern"); + } else if (prop.type === "RestElement") { + c(prop.argument, st, "Pattern"); + } + } +}; + +base.Expression = skipThrough; +base.ThisExpression = base.Super = base.MetaProperty = ignore; +base.ArrayExpression = function (node, st, c) { + for (var i = 0, list = node.elements; i < list.length; i += 1) { + var elt = list[i]; + + if (elt) { c(elt, st, "Expression"); } + } +}; +base.ObjectExpression = function (node, st, c) { + for (var i = 0, list = node.properties; i < list.length; i += 1) + { + var prop = list[i]; + + c(prop, st); + } +}; +base.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration; +base.SequenceExpression = function (node, st, c) { + for (var i = 0, list = node.expressions; i < list.length; i += 1) + { + var expr = list[i]; + + c(expr, st, "Expression"); + } +}; +base.TemplateLiteral = function (node, st, c) { + for (var i = 0, list = node.quasis; i < list.length; i += 1) + { + var quasi = list[i]; + + c(quasi, st); + } + + for (var i$1 = 0, list$1 = node.expressions; i$1 < list$1.length; i$1 += 1) + { + var expr = list$1[i$1]; + + c(expr, st, "Expression"); + } +}; +base.TemplateElement = ignore; +base.UnaryExpression = base.UpdateExpression = function (node, st, c) { + c(node.argument, st, "Expression"); +}; +base.BinaryExpression = base.LogicalExpression = function (node, st, c) { + c(node.left, st, "Expression"); + c(node.right, st, "Expression"); +}; +base.AssignmentExpression = base.AssignmentPattern = function (node, st, c) { + c(node.left, st, "Pattern"); + c(node.right, st, "Expression"); +}; +base.ConditionalExpression = function (node, st, c) { + c(node.test, st, "Expression"); + c(node.consequent, st, "Expression"); + c(node.alternate, st, "Expression"); +}; +base.NewExpression = base.CallExpression = function (node, st, c) { + c(node.callee, st, "Expression"); + if (node.arguments) + { for (var i = 0, list = node.arguments; i < list.length; i += 1) + { + var arg = list[i]; + + c(arg, st, "Expression"); + } } +}; +base.MemberExpression = function (node, st, c) { + c(node.object, st, "Expression"); + if (node.computed) { c(node.property, st, "Expression"); } +}; +base.ExportNamedDeclaration = base.ExportDefaultDeclaration = function (node, st, c) { + if (node.declaration) + { c(node.declaration, st, node.type === "ExportNamedDeclaration" || node.declaration.id ? "Statement" : "Expression"); } + if (node.source) { c(node.source, st, "Expression"); } +}; +base.ExportAllDeclaration = function (node, st, c) { + if (node.exported) + { c(node.exported, st); } + c(node.source, st, "Expression"); +}; +base.ImportDeclaration = function (node, st, c) { + for (var i = 0, list = node.specifiers; i < list.length; i += 1) + { + var spec = list[i]; + + c(spec, st); + } + c(node.source, st, "Expression"); +}; +base.ImportExpression = function (node, st, c) { + c(node.source, st, "Expression"); +}; +base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.PrivateIdentifier = base.Literal = ignore; + +base.TaggedTemplateExpression = function (node, st, c) { + c(node.tag, st, "Expression"); + c(node.quasi, st, "Expression"); +}; +base.ClassDeclaration = base.ClassExpression = function (node, st, c) { return c(node, st, "Class"); }; +base.Class = function (node, st, c) { + if (node.id) { c(node.id, st, "Pattern"); } + if (node.superClass) { c(node.superClass, st, "Expression"); } + c(node.body, st); +}; +base.ClassBody = function (node, st, c) { + for (var i = 0, list = node.body; i < list.length; i += 1) + { + var elt = list[i]; + + c(elt, st); + } +}; +base.MethodDefinition = base.PropertyDefinition = base.Property = function (node, st, c) { + if (node.computed) { c(node.key, st, "Expression"); } + if (node.value) { c(node.value, st, "Expression"); } +}; + +export { ancestor, base, findNodeAfter, findNodeAround, findNodeAt, findNodeBefore, full, fullAncestor, make, recursive, simple }; diff --git a/node_modules/acorn-walk/package.json b/node_modules/acorn-walk/package.json new file mode 100644 index 0000000..9d3b7e5 --- /dev/null +++ b/node_modules/acorn-walk/package.json @@ -0,0 +1,47 @@ +{ + "name": "acorn-walk", + "description": "ECMAScript (ESTree) AST walker", + "homepage": "https://github.com/acornjs/acorn", + "main": "dist/walk.js", + "types": "dist/walk.d.ts", + "module": "dist/walk.mjs", + "exports": { + ".": [ + { + "import": "./dist/walk.mjs", + "require": "./dist/walk.js", + "default": "./dist/walk.js" + }, + "./dist/walk.js" + ], + "./package.json": "./package.json" + }, + "version": "8.3.2", + "engines": { + "node": ">=0.4.0" + }, + "maintainers": [ + { + "name": "Marijn Haverbeke", + "email": "marijnh@gmail.com", + "web": "https://marijnhaverbeke.nl" + }, + { + "name": "Ingvar Stepanyan", + "email": "me@rreverser.com", + "web": "https://rreverser.com/" + }, + { + "name": "Adrian Heine", + "web": "http://adrianheine.de" + } + ], + "repository": { + "type": "git", + "url": "https://github.com/acornjs/acorn.git" + }, + "scripts": { + "prepare": "cd ..; npm run build:walk" + }, + "license": "MIT" +} diff --git a/node_modules/acorn/CHANGELOG.md b/node_modules/acorn/CHANGELOG.md new file mode 100644 index 0000000..3137186 --- /dev/null +++ b/node_modules/acorn/CHANGELOG.md @@ -0,0 +1,928 @@ +## 8.14.0 (2024-10-27) + +### New features + +Support ES2025 import attributes. + +Support ES2025 RegExp modifiers. + +### Bug fixes + +Support some missing Unicode properties. + +## 8.13.0 (2024-10-16) + +### New features + +Upgrade to Unicode 16.0. + +## 8.12.1 (2024-07-03) + +### Bug fixes + +Fix a regression that caused Acorn to no longer run on Node versions <8.10. + +## 8.12.0 (2024-06-14) + +### New features + +Support ES2025 duplicate capture group names in regular expressions. + +### Bug fixes + +Include `VariableDeclarator` in the `AnyNode` type so that walker objects can refer to it without getting a type error. + +Properly raise a parse error for invalid `for`/`of` statements using `async` as binding name. + +Properly recognize \"use strict\" when preceded by a string with an escaped newline. + +Mark the `Parser` constructor as protected, not private, so plugins can extend it without type errors. + +Fix a bug where some invalid `delete` expressions were let through when the operand was parenthesized and `preserveParens` was enabled. + +Properly normalize line endings in raw strings of invalid template tokens. + +Properly track line numbers for escaped newlines in strings. + +Fix a bug that broke line number accounting after a template literal with invalid escape sequences. + +## 8.11.3 (2023-12-29) + +### Bug fixes + +Add `Function` and `Class` to the `AggregateType` type, so that they can be used in walkers without raising a type error. + +Make sure `onToken` get an `import` keyword token when parsing `import.meta`. + +Fix a bug where `.loc.start` could be undefined for `new.target` `meta` nodes. + +## 8.11.2 (2023-10-27) + +### Bug fixes + +Fix a bug that caused regular expressions after colon tokens to not be properly tokenized in some circumstances. + +## 8.11.1 (2023-10-26) + +### Bug fixes + +Fix a regression where `onToken` would receive 'name' tokens for 'new' keyword tokens. + +## 8.11.0 (2023-10-26) + +### Bug fixes + +Fix an issue where tokenizing (without parsing) an object literal with a property named `class` or `function` could, in some circumstance, put the tokenizer into an invalid state. + +Fix an issue where a slash after a call to a propery named the same as some keywords would be tokenized as a regular expression. + +### New features + +Upgrade to Unicode 15.1. + +Use a set of new, much more precise, TypeScript types. + +## 8.10.0 (2023-07-05) + +### New features + +Add a `checkPrivateFields` option that disables strict checking of private property use. + +## 8.9.0 (2023-06-16) + +### Bug fixes + +Forbid dynamic import after `new`, even when part of a member expression. + +### New features + +Add Unicode properties for ES2023. + +Add support for the `v` flag to regular expressions. + +## 8.8.2 (2023-01-23) + +### Bug fixes + +Fix a bug that caused `allowHashBang` to be set to false when not provided, even with `ecmaVersion >= 14`. + +Fix an exception when passing no option object to `parse` or `new Parser`. + +Fix incorrect parse error on `if (0) let\n[astral identifier char]`. + +## 8.8.1 (2022-10-24) + +### Bug fixes + +Make type for `Comment` compatible with estree types. + +## 8.8.0 (2022-07-21) + +### Bug fixes + +Allow parentheses around spread args in destructuring object assignment. + +Fix an issue where the tree contained `directive` properties in when parsing with a language version that doesn't support them. + +### New features + +Support hashbang comments by default in ECMAScript 2023 and later. + +## 8.7.1 (2021-04-26) + +### Bug fixes + +Stop handling `"use strict"` directives in ECMAScript versions before 5. + +Fix an issue where duplicate quoted export names in `export *` syntax were incorrectly checked. + +Add missing type for `tokTypes`. + +## 8.7.0 (2021-12-27) + +### New features + +Support quoted export names. + +Upgrade to Unicode 14. + +Add support for Unicode 13 properties in regular expressions. + +### Bug fixes + +Use a loop to find line breaks, because the existing regexp search would overrun the end of the searched range and waste a lot of time in minified code. + +## 8.6.0 (2021-11-18) + +### Bug fixes + +Fix a bug where an object literal with multiple `__proto__` properties would incorrectly be accepted if a later property value held an assigment. + +### New features + +Support class private fields with the `in` operator. + +## 8.5.0 (2021-09-06) + +### Bug fixes + +Improve context-dependent tokenization in a number of corner cases. + +Fix location tracking after a 0x2028 or 0x2029 character in a string literal (which before did not increase the line number). + +Fix an issue where arrow function bodies in for loop context would inappropriately consume `in` operators. + +Fix wrong end locations stored on SequenceExpression nodes. + +Implement restriction that `for`/`of` loop LHS can't start with `let`. + +### New features + +Add support for ES2022 class static blocks. + +Allow multiple input files to be passed to the CLI tool. + +## 8.4.1 (2021-06-24) + +### Bug fixes + +Fix a bug where `allowAwaitOutsideFunction` would allow `await` in class field initializers, and setting `ecmaVersion` to 13 or higher would allow top-level await in non-module sources. + +## 8.4.0 (2021-06-11) + +### New features + +A new option, `allowSuperOutsideMethod`, can be used to suppress the error when `super` is used in the wrong context. + +## 8.3.0 (2021-05-31) + +### New features + +Default `allowAwaitOutsideFunction` to true for ECMAScript 2022 an higher. + +Add support for the `d` ([indices](https://github.com/tc39/proposal-regexp-match-indices)) regexp flag. + +## 8.2.4 (2021-05-04) + +### Bug fixes + +Fix spec conformity in corner case 'for await (async of ...)'. + +## 8.2.3 (2021-05-04) + +### Bug fixes + +Fix an issue where the library couldn't parse 'for (async of ...)'. + +Fix a bug in UTF-16 decoding that would read characters incorrectly in some circumstances. + +## 8.2.2 (2021-04-29) + +### Bug fixes + +Fix a bug where a class field initialized to an async arrow function wouldn't allow await inside it. Same issue existed for generator arrow functions with yield. + +## 8.2.1 (2021-04-24) + +### Bug fixes + +Fix a regression introduced in 8.2.0 where static or async class methods with keyword names fail to parse. + +## 8.2.0 (2021-04-24) + +### New features + +Add support for ES2022 class fields and private methods. + +## 8.1.1 (2021-04-12) + +### Various + +Stop shipping source maps in the NPM package. + +## 8.1.0 (2021-03-09) + +### Bug fixes + +Fix a spurious error in nested destructuring arrays. + +### New features + +Expose `allowAwaitOutsideFunction` in CLI interface. + +Make `allowImportExportAnywhere` also apply to `import.meta`. + +## 8.0.5 (2021-01-25) + +### Bug fixes + +Adjust package.json to work with Node 12.16.0 and 13.0-13.6. + +## 8.0.4 (2020-10-05) + +### Bug fixes + +Make `await x ** y` an error, following the spec. + +Fix potentially exponential regular expression. + +## 8.0.3 (2020-10-02) + +### Bug fixes + +Fix a wasteful loop during `Parser` creation when setting `ecmaVersion` to `"latest"`. + +## 8.0.2 (2020-09-30) + +### Bug fixes + +Make the TypeScript types reflect the current allowed values for `ecmaVersion`. + +Fix another regexp/division tokenizer issue. + +## 8.0.1 (2020-08-12) + +### Bug fixes + +Provide the correct value in the `version` export. + +## 8.0.0 (2020-08-12) + +### Bug fixes + +Disallow expressions like `(a = b) = c`. + +Make non-octal escape sequences a syntax error in strict mode. + +### New features + +The package can now be loaded directly as an ECMAScript module in node 13+. + +Update to the set of Unicode properties from ES2021. + +### Breaking changes + +The `ecmaVersion` option is now required. For the moment, omitting it will still work with a warning, but that will change in a future release. + +Some changes to method signatures that may be used by plugins. + +## 7.4.0 (2020-08-03) + +### New features + +Add support for logical assignment operators. + +Add support for numeric separators. + +## 7.3.1 (2020-06-11) + +### Bug fixes + +Make the string in the `version` export match the actual library version. + +## 7.3.0 (2020-06-11) + +### Bug fixes + +Fix a bug that caused parsing of object patterns with a property named `set` that had a default value to fail. + +### New features + +Add support for optional chaining (`?.`). + +## 7.2.0 (2020-05-09) + +### Bug fixes + +Fix precedence issue in parsing of async arrow functions. + +### New features + +Add support for nullish coalescing. + +Add support for `import.meta`. + +Support `export * as ...` syntax. + +Upgrade to Unicode 13. + +## 6.4.1 (2020-03-09) + +### Bug fixes + +More carefully check for valid UTF16 surrogate pairs in regexp validator. + +## 7.1.1 (2020-03-01) + +### Bug fixes + +Treat `\8` and `\9` as invalid escapes in template strings. + +Allow unicode escapes in property names that are keywords. + +Don't error on an exponential operator expression as argument to `await`. + +More carefully check for valid UTF16 surrogate pairs in regexp validator. + +## 7.1.0 (2019-09-24) + +### Bug fixes + +Disallow trailing object literal commas when ecmaVersion is less than 5. + +### New features + +Add a static `acorn` property to the `Parser` class that contains the entire module interface, to allow plugins to access the instance of the library that they are acting on. + +## 7.0.0 (2019-08-13) + +### Breaking changes + +Changes the node format for dynamic imports to use the `ImportExpression` node type, as defined in [ESTree](https://github.com/estree/estree/blob/master/es2020.md#importexpression). + +Makes 10 (ES2019) the default value for the `ecmaVersion` option. + +## 6.3.0 (2019-08-12) + +### New features + +`sourceType: "module"` can now be used even when `ecmaVersion` is less than 6, to parse module-style code that otherwise conforms to an older standard. + +## 6.2.1 (2019-07-21) + +### Bug fixes + +Fix bug causing Acorn to treat some characters as identifier characters that shouldn't be treated as such. + +Fix issue where setting the `allowReserved` option to `"never"` allowed reserved words in some circumstances. + +## 6.2.0 (2019-07-04) + +### Bug fixes + +Improve valid assignment checking in `for`/`in` and `for`/`of` loops. + +Disallow binding `let` in patterns. + +### New features + +Support bigint syntax with `ecmaVersion` >= 11. + +Support dynamic `import` syntax with `ecmaVersion` >= 11. + +Upgrade to Unicode version 12. + +## 6.1.1 (2019-02-27) + +### Bug fixes + +Fix bug that caused parsing default exports of with names to fail. + +## 6.1.0 (2019-02-08) + +### Bug fixes + +Fix scope checking when redefining a `var` as a lexical binding. + +### New features + +Split up `parseSubscripts` to use an internal `parseSubscript` method to make it easier to extend with plugins. + +## 6.0.7 (2019-02-04) + +### Bug fixes + +Check that exported bindings are defined. + +Don't treat `\u180e` as a whitespace character. + +Check for duplicate parameter names in methods. + +Don't allow shorthand properties when they are generators or async methods. + +Forbid binding `await` in async arrow function's parameter list. + +## 6.0.6 (2019-01-30) + +### Bug fixes + +The content of class declarations and expressions is now always parsed in strict mode. + +Don't allow `let` or `const` to bind the variable name `let`. + +Treat class declarations as lexical. + +Don't allow a generator function declaration as the sole body of an `if` or `else`. + +Ignore `"use strict"` when after an empty statement. + +Allow string line continuations with special line terminator characters. + +Treat `for` bodies as part of the `for` scope when checking for conflicting bindings. + +Fix bug with parsing `yield` in a `for` loop initializer. + +Implement special cases around scope checking for functions. + +## 6.0.5 (2019-01-02) + +### Bug fixes + +Fix TypeScript type for `Parser.extend` and add `allowAwaitOutsideFunction` to options type. + +Don't treat `let` as a keyword when the next token is `{` on the next line. + +Fix bug that broke checking for parentheses around an object pattern in a destructuring assignment when `preserveParens` was on. + +## 6.0.4 (2018-11-05) + +### Bug fixes + +Further improvements to tokenizing regular expressions in corner cases. + +## 6.0.3 (2018-11-04) + +### Bug fixes + +Fix bug in tokenizing an expression-less return followed by a function followed by a regular expression. + +Remove stray symlink in the package tarball. + +## 6.0.2 (2018-09-26) + +### Bug fixes + +Fix bug where default expressions could fail to parse inside an object destructuring assignment expression. + +## 6.0.1 (2018-09-14) + +### Bug fixes + +Fix wrong value in `version` export. + +## 6.0.0 (2018-09-14) + +### Bug fixes + +Better handle variable-redefinition checks for catch bindings and functions directly under if statements. + +Forbid `new.target` in top-level arrow functions. + +Fix issue with parsing a regexp after `yield` in some contexts. + +### New features + +The package now comes with TypeScript definitions. + +### Breaking changes + +The default value of the `ecmaVersion` option is now 9 (2018). + +Plugins work differently, and will have to be rewritten to work with this version. + +The loose parser and walker have been moved into separate packages (`acorn-loose` and `acorn-walk`). + +## 5.7.3 (2018-09-10) + +### Bug fixes + +Fix failure to tokenize regexps after expressions like `x.of`. + +Better error message for unterminated template literals. + +## 5.7.2 (2018-08-24) + +### Bug fixes + +Properly handle `allowAwaitOutsideFunction` in for statements. + +Treat function declarations at the top level of modules like let bindings. + +Don't allow async function declarations as the only statement under a label. + +## 5.7.0 (2018-06-15) + +### New features + +Upgraded to Unicode 11. + +## 5.6.0 (2018-05-31) + +### New features + +Allow U+2028 and U+2029 in string when ECMAVersion >= 10. + +Allow binding-less catch statements when ECMAVersion >= 10. + +Add `allowAwaitOutsideFunction` option for parsing top-level `await`. + +## 5.5.3 (2018-03-08) + +### Bug fixes + +A _second_ republish of the code in 5.5.1, this time with yarn, to hopefully get valid timestamps. + +## 5.5.2 (2018-03-08) + +### Bug fixes + +A republish of the code in 5.5.1 in an attempt to solve an issue with the file timestamps in the npm package being 0. + +## 5.5.1 (2018-03-06) + +### Bug fixes + +Fix misleading error message for octal escapes in template strings. + +## 5.5.0 (2018-02-27) + +### New features + +The identifier character categorization is now based on Unicode version 10. + +Acorn will now validate the content of regular expressions, including new ES9 features. + +## 5.4.0 (2018-02-01) + +### Bug fixes + +Disallow duplicate or escaped flags on regular expressions. + +Disallow octal escapes in strings in strict mode. + +### New features + +Add support for async iteration. + +Add support for object spread and rest. + +## 5.3.0 (2017-12-28) + +### Bug fixes + +Fix parsing of floating point literals with leading zeroes in loose mode. + +Allow duplicate property names in object patterns. + +Don't allow static class methods named `prototype`. + +Disallow async functions directly under `if` or `else`. + +Parse right-hand-side of `for`/`of` as an assignment expression. + +Stricter parsing of `for`/`in`. + +Don't allow unicode escapes in contextual keywords. + +### New features + +Parsing class members was factored into smaller methods to allow plugins to hook into it. + +## 5.2.1 (2017-10-30) + +### Bug fixes + +Fix a token context corruption bug. + +## 5.2.0 (2017-10-30) + +### Bug fixes + +Fix token context tracking for `class` and `function` in property-name position. + +Make sure `%*` isn't parsed as a valid operator. + +Allow shorthand properties `get` and `set` to be followed by default values. + +Disallow `super` when not in callee or object position. + +### New features + +Support [`directive` property](https://github.com/estree/estree/compare/b3de58c9997504d6fba04b72f76e6dd1619ee4eb...1da8e603237144f44710360f8feb7a9977e905e0) on directive expression statements. + +## 5.1.2 (2017-09-04) + +### Bug fixes + +Disable parsing of legacy HTML-style comments in modules. + +Fix parsing of async methods whose names are keywords. + +## 5.1.1 (2017-07-06) + +### Bug fixes + +Fix problem with disambiguating regexp and division after a class. + +## 5.1.0 (2017-07-05) + +### Bug fixes + +Fix tokenizing of regexps in an object-desctructuring `for`/`of` loop and after `yield`. + +Parse zero-prefixed numbers with non-octal digits as decimal. + +Allow object/array patterns in rest parameters. + +Don't error when `yield` is used as a property name. + +Allow `async` as a shorthand object property. + +### New features + +Implement the [template literal revision proposal](https://github.com/tc39/proposal-template-literal-revision) for ES9. + +## 5.0.3 (2017-04-01) + +### Bug fixes + +Fix spurious duplicate variable definition errors for named functions. + +## 5.0.2 (2017-03-30) + +### Bug fixes + +A binary operator after a parenthesized arrow expression is no longer incorrectly treated as an error. + +## 5.0.0 (2017-03-28) + +### Bug fixes + +Raise an error for duplicated lexical bindings. + +Fix spurious error when an assignement expression occurred after a spread expression. + +Accept regular expressions after `of` (in `for`/`of`), `yield` (in a generator), and braced arrow functions. + +Allow labels in front or `var` declarations, even in strict mode. + +### Breaking changes + +Parse declarations following `export default` as declaration nodes, not expressions. This means that class and function declarations nodes can now have `null` as their `id`. + +## 4.0.11 (2017-02-07) + +### Bug fixes + +Allow all forms of member expressions to be parenthesized as lvalue. + +## 4.0.10 (2017-02-07) + +### Bug fixes + +Don't expect semicolons after default-exported functions or classes, even when they are expressions. + +Check for use of `'use strict'` directives in non-simple parameter functions, even when already in strict mode. + +## 4.0.9 (2017-02-06) + +### Bug fixes + +Fix incorrect error raised for parenthesized simple assignment targets, so that `(x) = 1` parses again. + +## 4.0.8 (2017-02-03) + +### Bug fixes + +Solve spurious parenthesized pattern errors by temporarily erring on the side of accepting programs that our delayed errors don't handle correctly yet. + +## 4.0.7 (2017-02-02) + +### Bug fixes + +Accept invalidly rejected code like `(x).y = 2` again. + +Don't raise an error when a function _inside_ strict code has a non-simple parameter list. + +## 4.0.6 (2017-02-02) + +### Bug fixes + +Fix exponential behavior (manifesting itself as a complete hang for even relatively small source files) introduced by the new 'use strict' check. + +## 4.0.5 (2017-02-02) + +### Bug fixes + +Disallow parenthesized pattern expressions. + +Allow keywords as export names. + +Don't allow the `async` keyword to be parenthesized. + +Properly raise an error when a keyword contains a character escape. + +Allow `"use strict"` to appear after other string literal expressions. + +Disallow labeled declarations. + +## 4.0.4 (2016-12-19) + +### Bug fixes + +Fix crash when `export` was followed by a keyword that can't be +exported. + +## 4.0.3 (2016-08-16) + +### Bug fixes + +Allow regular function declarations inside single-statement `if` branches in loose mode. Forbid them entirely in strict mode. + +Properly parse properties named `async` in ES2017 mode. + +Fix bug where reserved words were broken in ES2017 mode. + +## 4.0.2 (2016-08-11) + +### Bug fixes + +Don't ignore period or 'e' characters after octal numbers. + +Fix broken parsing for call expressions in default parameter values of arrow functions. + +## 4.0.1 (2016-08-08) + +### Bug fixes + +Fix false positives in duplicated export name errors. + +## 4.0.0 (2016-08-07) + +### Breaking changes + +The default `ecmaVersion` option value is now 7. + +A number of internal method signatures changed, so plugins might need to be updated. + +### Bug fixes + +The parser now raises errors on duplicated export names. + +`arguments` and `eval` can now be used in shorthand properties. + +Duplicate parameter names in non-simple argument lists now always produce an error. + +### New features + +The `ecmaVersion` option now also accepts year-style version numbers +(2015, etc). + +Support for `async`/`await` syntax when `ecmaVersion` is >= 8. + +Support for trailing commas in call expressions when `ecmaVersion` is >= 8. + +## 3.3.0 (2016-07-25) + +### Bug fixes + +Fix bug in tokenizing of regexp operator after a function declaration. + +Fix parser crash when parsing an array pattern with a hole. + +### New features + +Implement check against complex argument lists in functions that enable strict mode in ES7. + +## 3.2.0 (2016-06-07) + +### Bug fixes + +Improve handling of lack of unicode regexp support in host +environment. + +Properly reject shorthand properties whose name is a keyword. + +### New features + +Visitors created with `visit.make` now have their base as _prototype_, rather than copying properties into a fresh object. + +## 3.1.0 (2016-04-18) + +### Bug fixes + +Properly tokenize the division operator directly after a function expression. + +Allow trailing comma in destructuring arrays. + +## 3.0.4 (2016-02-25) + +### Fixes + +Allow update expressions as left-hand-side of the ES7 exponential operator. + +## 3.0.2 (2016-02-10) + +### Fixes + +Fix bug that accidentally made `undefined` a reserved word when parsing ES7. + +## 3.0.0 (2016-02-10) + +### Breaking changes + +The default value of the `ecmaVersion` option is now 6 (used to be 5). + +Support for comprehension syntax (which was dropped from the draft spec) has been removed. + +### Fixes + +`let` and `yield` are now “contextual keywords”, meaning you can mostly use them as identifiers in ES5 non-strict code. + +A parenthesized class or function expression after `export default` is now parsed correctly. + +### New features + +When `ecmaVersion` is set to 7, Acorn will parse the exponentiation operator (`**`). + +The identifier character ranges are now based on Unicode 8.0.0. + +Plugins can now override the `raiseRecoverable` method to override the way non-critical errors are handled. + +## 2.7.0 (2016-01-04) + +### Fixes + +Stop allowing rest parameters in setters. + +Disallow `y` rexexp flag in ES5. + +Disallow `\00` and `\000` escapes in strict mode. + +Raise an error when an import name is a reserved word. + +## 2.6.2 (2015-11-10) + +### Fixes + +Don't crash when no options object is passed. + +## 2.6.0 (2015-11-09) + +### Fixes + +Add `await` as a reserved word in module sources. + +Disallow `yield` in a parameter default value for a generator. + +Forbid using a comma after a rest pattern in an array destructuring. + +### New features + +Support parsing stdin in command-line tool. + +## 2.5.0 (2015-10-27) + +### Fixes + +Fix tokenizer support in the command-line tool. + +Stop allowing `new.target` outside of functions. + +Remove legacy `guard` and `guardedHandler` properties from try nodes. + +Stop allowing multiple `__proto__` properties on an object literal in strict mode. + +Don't allow rest parameters to be non-identifier patterns. + +Check for duplicate paramter names in arrow functions. diff --git a/node_modules/acorn/LICENSE b/node_modules/acorn/LICENSE new file mode 100644 index 0000000..9d71cc6 --- /dev/null +++ b/node_modules/acorn/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (C) 2012-2022 by various contributors (see AUTHORS) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/acorn/README.md b/node_modules/acorn/README.md new file mode 100644 index 0000000..f7ff966 --- /dev/null +++ b/node_modules/acorn/README.md @@ -0,0 +1,282 @@ +# Acorn + +A tiny, fast JavaScript parser written in JavaScript. + +## Community + +Acorn is open source software released under an +[MIT license](https://github.com/acornjs/acorn/blob/master/acorn/LICENSE). + +You are welcome to +[report bugs](https://github.com/acornjs/acorn/issues) or create pull +requests on [github](https://github.com/acornjs/acorn). + +## Installation + +The easiest way to install acorn is from [`npm`](https://www.npmjs.com/): + +```sh +npm install acorn +``` + +Alternately, you can download the source and build acorn yourself: + +```sh +git clone https://github.com/acornjs/acorn.git +cd acorn +npm install +``` + +## Interface + +**parse**`(input, options)` is the main interface to the library. The +`input` parameter is a string, `options` must be an object setting +some of the options listed below. The return value will be an abstract +syntax tree object as specified by the [ESTree +spec](https://github.com/estree/estree). + +```javascript +let acorn = require("acorn"); +console.log(acorn.parse("1 + 1", {ecmaVersion: 2020})); +``` + +When encountering a syntax error, the parser will raise a +`SyntaxError` object with a meaningful message. The error object will +have a `pos` property that indicates the string offset at which the +error occurred, and a `loc` object that contains a `{line, column}` +object referring to that same position. + +Options are provided by in a second argument, which should be an +object containing any of these fields (only `ecmaVersion` is +required): + +- **ecmaVersion**: Indicates the ECMAScript version to parse. Can be a + number, either in year (`2022`) or plain version number (`6`) form, + or `"latest"` (the latest the library supports). This influences + support for strict mode, the set of reserved words, and support for + new syntax features. + + **NOTE**: Only 'stage 4' (finalized) ECMAScript features are being + implemented by Acorn. Other proposed new features must be + implemented through plugins. + +- **sourceType**: Indicate the mode the code should be parsed in. Can be + either `"script"` or `"module"`. This influences global strict mode + and parsing of `import` and `export` declarations. + + **NOTE**: If set to `"module"`, then static `import` / `export` syntax + will be valid, even if `ecmaVersion` is less than 6. + +- **onInsertedSemicolon**: If given a callback, that callback will be + called whenever a missing semicolon is inserted by the parser. The + callback will be given the character offset of the point where the + semicolon is inserted as argument, and if `locations` is on, also a + `{line, column}` object representing this position. + +- **onTrailingComma**: Like `onInsertedSemicolon`, but for trailing + commas. + +- **allowReserved**: If `false`, using a reserved word will generate + an error. Defaults to `true` for `ecmaVersion` 3, `false` for higher + versions. When given the value `"never"`, reserved words and + keywords can also not be used as property names (as in Internet + Explorer's old parser). + +- **allowReturnOutsideFunction**: By default, a return statement at + the top level raises an error. Set this to `true` to accept such + code. + +- **allowImportExportEverywhere**: By default, `import` and `export` + declarations can only appear at a program's top level. Setting this + option to `true` allows them anywhere where a statement is allowed, + and also allows `import.meta` expressions to appear in scripts + (when `sourceType` is not `"module"`). + +- **allowAwaitOutsideFunction**: If `false`, `await` expressions can + only appear inside `async` functions. Defaults to `true` in modules + for `ecmaVersion` 2022 and later, `false` for lower versions. + Setting this option to `true` allows to have top-level `await` + expressions. They are still not allowed in non-`async` functions, + though. + +- **allowSuperOutsideMethod**: By default, `super` outside a method + raises an error. Set this to `true` to accept such code. + +- **allowHashBang**: When this is enabled, if the code starts with the + characters `#!` (as in a shellscript), the first line will be + treated as a comment. Defaults to true when `ecmaVersion` >= 2023. + +- **checkPrivateFields**: By default, the parser will verify that + private properties are only used in places where they are valid and + have been declared. Set this to false to turn such checks off. + +- **locations**: When `true`, each node has a `loc` object attached + with `start` and `end` subobjects, each of which contains the + one-based line and zero-based column numbers in `{line, column}` + form. Default is `false`. + +- **onToken**: If a function is passed for this option, each found + token will be passed in same format as tokens returned from + `tokenizer().getToken()`. + + If array is passed, each found token is pushed to it. + + Note that you are not allowed to call the parser from the + callback—that will corrupt its internal state. + +- **onComment**: If a function is passed for this option, whenever a + comment is encountered the function will be called with the + following parameters: + + - `block`: `true` if the comment is a block comment, false if it + is a line comment. + - `text`: The content of the comment. + - `start`: Character offset of the start of the comment. + - `end`: Character offset of the end of the comment. + + When the `locations` options is on, the `{line, column}` locations + of the comment’s start and end are passed as two additional + parameters. + + If array is passed for this option, each found comment is pushed + to it as object in Esprima format: + + ```javascript + { + "type": "Line" | "Block", + "value": "comment text", + "start": Number, + "end": Number, + // If `locations` option is on: + "loc": { + "start": {line: Number, column: Number} + "end": {line: Number, column: Number} + }, + // If `ranges` option is on: + "range": [Number, Number] + } + ``` + + Note that you are not allowed to call the parser from the + callback—that will corrupt its internal state. + +- **ranges**: Nodes have their start and end characters offsets + recorded in `start` and `end` properties (directly on the node, + rather than the `loc` object, which holds line/column data. To also + add a + [semi-standardized](https://bugzilla.mozilla.org/show_bug.cgi?id=745678) + `range` property holding a `[start, end]` array with the same + numbers, set the `ranges` option to `true`. + +- **program**: It is possible to parse multiple files into a single + AST by passing the tree produced by parsing the first file as the + `program` option in subsequent parses. This will add the toplevel + forms of the parsed file to the "Program" (top) node of an existing + parse tree. + +- **sourceFile**: When the `locations` option is `true`, you can pass + this option to add a `source` attribute in every node’s `loc` + object. Note that the contents of this option are not examined or + processed in any way; you are free to use whatever format you + choose. + +- **directSourceFile**: Like `sourceFile`, but a `sourceFile` property + will be added (regardless of the `location` option) directly to the + nodes, rather than the `loc` object. + +- **preserveParens**: If this option is `true`, parenthesized expressions + are represented by (non-standard) `ParenthesizedExpression` nodes + that have a single `expression` property containing the expression + inside parentheses. + +**parseExpressionAt**`(input, offset, options)` will parse a single +expression in a string, and return its AST. It will not complain if +there is more of the string left after the expression. + +**tokenizer**`(input, options)` returns an object with a `getToken` +method that can be called repeatedly to get the next token, a `{start, +end, type, value}` object (with added `loc` property when the +`locations` option is enabled and `range` property when the `ranges` +option is enabled). When the token's type is `tokTypes.eof`, you +should stop calling the method, since it will keep returning that same +token forever. + +Note that tokenizing JavaScript without parsing it is, in modern +versions of the language, not really possible due to the way syntax is +overloaded in ways that can only be disambiguated by the parse +context. This package applies a bunch of heuristics to try and do a +reasonable job, but you are advised to use `parse` with the `onToken` +option instead of this. + +In ES6 environment, returned result can be used as any other +protocol-compliant iterable: + +```javascript +for (let token of acorn.tokenizer(str)) { + // iterate over the tokens +} + +// transform code to array of tokens: +var tokens = [...acorn.tokenizer(str)]; +``` + +**tokTypes** holds an object mapping names to the token type objects +that end up in the `type` properties of tokens. + +**getLineInfo**`(input, offset)` can be used to get a `{line, +column}` object for a given program string and offset. + +### The `Parser` class + +Instances of the **`Parser`** class contain all the state and logic +that drives a parse. It has static methods `parse`, +`parseExpressionAt`, and `tokenizer` that match the top-level +functions by the same name. + +When extending the parser with plugins, you need to call these methods +on the extended version of the class. To extend a parser with plugins, +you can use its static `extend` method. + +```javascript +var acorn = require("acorn"); +var jsx = require("acorn-jsx"); +var JSXParser = acorn.Parser.extend(jsx()); +JSXParser.parse("foo()", {ecmaVersion: 2020}); +``` + +The `extend` method takes any number of plugin values, and returns a +new `Parser` class that includes the extra parser logic provided by +the plugins. + +## Command line interface + +The `bin/acorn` utility can be used to parse a file from the command +line. It accepts as arguments its input file and the following +options: + +- `--ecma3|--ecma5|--ecma6|--ecma7|--ecma8|--ecma9|--ecma10`: Sets the ECMAScript version + to parse. Default is version 9. + +- `--module`: Sets the parsing mode to `"module"`. Is set to `"script"` otherwise. + +- `--locations`: Attaches a "loc" object to each node with "start" and + "end" subobjects, each of which contains the one-based line and + zero-based column numbers in `{line, column}` form. + +- `--allow-hash-bang`: If the code starts with the characters #! (as + in a shellscript), the first line will be treated as a comment. + +- `--allow-await-outside-function`: Allows top-level `await` expressions. + See the `allowAwaitOutsideFunction` option for more information. + +- `--compact`: No whitespace is used in the AST output. + +- `--silent`: Do not output the AST, just return the exit status. + +- `--help`: Print the usage information and quit. + +The utility spits out the syntax tree as JSON data. + +## Existing plugins + + - [`acorn-jsx`](https://github.com/RReverser/acorn-jsx): Parse [Facebook JSX syntax extensions](https://github.com/facebook/jsx) diff --git a/node_modules/acorn/bin/acorn b/node_modules/acorn/bin/acorn new file mode 100755 index 0000000..3ef3c12 --- /dev/null +++ b/node_modules/acorn/bin/acorn @@ -0,0 +1,4 @@ +#!/usr/bin/env node +"use strict" + +require("../dist/bin.js") diff --git a/node_modules/acorn/dist/acorn.d.mts b/node_modules/acorn/dist/acorn.d.mts new file mode 100644 index 0000000..81f4e38 --- /dev/null +++ b/node_modules/acorn/dist/acorn.d.mts @@ -0,0 +1,866 @@ +export interface Node { + start: number + end: number + type: string + range?: [number, number] + loc?: SourceLocation | null +} + +export interface SourceLocation { + source?: string | null + start: Position + end: Position +} + +export interface Position { + /** 1-based */ + line: number + /** 0-based */ + column: number +} + +export interface Identifier extends Node { + type: "Identifier" + name: string +} + +export interface Literal extends Node { + type: "Literal" + value?: string | boolean | null | number | RegExp | bigint + raw?: string + regex?: { + pattern: string + flags: string + } + bigint?: string +} + +export interface Program extends Node { + type: "Program" + body: Array + sourceType: "script" | "module" +} + +export interface Function extends Node { + id?: Identifier | null + params: Array + body: BlockStatement | Expression + generator: boolean + expression: boolean + async: boolean +} + +export interface ExpressionStatement extends Node { + type: "ExpressionStatement" + expression: Expression | Literal + directive?: string +} + +export interface BlockStatement extends Node { + type: "BlockStatement" + body: Array +} + +export interface EmptyStatement extends Node { + type: "EmptyStatement" +} + +export interface DebuggerStatement extends Node { + type: "DebuggerStatement" +} + +export interface WithStatement extends Node { + type: "WithStatement" + object: Expression + body: Statement +} + +export interface ReturnStatement extends Node { + type: "ReturnStatement" + argument?: Expression | null +} + +export interface LabeledStatement extends Node { + type: "LabeledStatement" + label: Identifier + body: Statement +} + +export interface BreakStatement extends Node { + type: "BreakStatement" + label?: Identifier | null +} + +export interface ContinueStatement extends Node { + type: "ContinueStatement" + label?: Identifier | null +} + +export interface IfStatement extends Node { + type: "IfStatement" + test: Expression + consequent: Statement + alternate?: Statement | null +} + +export interface SwitchStatement extends Node { + type: "SwitchStatement" + discriminant: Expression + cases: Array +} + +export interface SwitchCase extends Node { + type: "SwitchCase" + test?: Expression | null + consequent: Array +} + +export interface ThrowStatement extends Node { + type: "ThrowStatement" + argument: Expression +} + +export interface TryStatement extends Node { + type: "TryStatement" + block: BlockStatement + handler?: CatchClause | null + finalizer?: BlockStatement | null +} + +export interface CatchClause extends Node { + type: "CatchClause" + param?: Pattern | null + body: BlockStatement +} + +export interface WhileStatement extends Node { + type: "WhileStatement" + test: Expression + body: Statement +} + +export interface DoWhileStatement extends Node { + type: "DoWhileStatement" + body: Statement + test: Expression +} + +export interface ForStatement extends Node { + type: "ForStatement" + init?: VariableDeclaration | Expression | null + test?: Expression | null + update?: Expression | null + body: Statement +} + +export interface ForInStatement extends Node { + type: "ForInStatement" + left: VariableDeclaration | Pattern + right: Expression + body: Statement +} + +export interface FunctionDeclaration extends Function { + type: "FunctionDeclaration" + id: Identifier + body: BlockStatement +} + +export interface VariableDeclaration extends Node { + type: "VariableDeclaration" + declarations: Array + kind: "var" | "let" | "const" +} + +export interface VariableDeclarator extends Node { + type: "VariableDeclarator" + id: Pattern + init?: Expression | null +} + +export interface ThisExpression extends Node { + type: "ThisExpression" +} + +export interface ArrayExpression extends Node { + type: "ArrayExpression" + elements: Array +} + +export interface ObjectExpression extends Node { + type: "ObjectExpression" + properties: Array +} + +export interface Property extends Node { + type: "Property" + key: Expression + value: Expression + kind: "init" | "get" | "set" + method: boolean + shorthand: boolean + computed: boolean +} + +export interface FunctionExpression extends Function { + type: "FunctionExpression" + body: BlockStatement +} + +export interface UnaryExpression extends Node { + type: "UnaryExpression" + operator: UnaryOperator + prefix: boolean + argument: Expression +} + +export type UnaryOperator = "-" | "+" | "!" | "~" | "typeof" | "void" | "delete" + +export interface UpdateExpression extends Node { + type: "UpdateExpression" + operator: UpdateOperator + argument: Expression + prefix: boolean +} + +export type UpdateOperator = "++" | "--" + +export interface BinaryExpression extends Node { + type: "BinaryExpression" + operator: BinaryOperator + left: Expression | PrivateIdentifier + right: Expression +} + +export type BinaryOperator = "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "|" | "^" | "&" | "in" | "instanceof" | "**" + +export interface AssignmentExpression extends Node { + type: "AssignmentExpression" + operator: AssignmentOperator + left: Pattern + right: Expression +} + +export type AssignmentOperator = "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&=" | "**=" | "||=" | "&&=" | "??=" + +export interface LogicalExpression extends Node { + type: "LogicalExpression" + operator: LogicalOperator + left: Expression + right: Expression +} + +export type LogicalOperator = "||" | "&&" | "??" + +export interface MemberExpression extends Node { + type: "MemberExpression" + object: Expression | Super + property: Expression | PrivateIdentifier + computed: boolean + optional: boolean +} + +export interface ConditionalExpression extends Node { + type: "ConditionalExpression" + test: Expression + alternate: Expression + consequent: Expression +} + +export interface CallExpression extends Node { + type: "CallExpression" + callee: Expression | Super + arguments: Array + optional: boolean +} + +export interface NewExpression extends Node { + type: "NewExpression" + callee: Expression + arguments: Array +} + +export interface SequenceExpression extends Node { + type: "SequenceExpression" + expressions: Array +} + +export interface ForOfStatement extends Node { + type: "ForOfStatement" + left: VariableDeclaration | Pattern + right: Expression + body: Statement + await: boolean +} + +export interface Super extends Node { + type: "Super" +} + +export interface SpreadElement extends Node { + type: "SpreadElement" + argument: Expression +} + +export interface ArrowFunctionExpression extends Function { + type: "ArrowFunctionExpression" +} + +export interface YieldExpression extends Node { + type: "YieldExpression" + argument?: Expression | null + delegate: boolean +} + +export interface TemplateLiteral extends Node { + type: "TemplateLiteral" + quasis: Array + expressions: Array +} + +export interface TaggedTemplateExpression extends Node { + type: "TaggedTemplateExpression" + tag: Expression + quasi: TemplateLiteral +} + +export interface TemplateElement extends Node { + type: "TemplateElement" + tail: boolean + value: { + cooked?: string | null + raw: string + } +} + +export interface AssignmentProperty extends Node { + type: "Property" + key: Expression + value: Pattern + kind: "init" + method: false + shorthand: boolean + computed: boolean +} + +export interface ObjectPattern extends Node { + type: "ObjectPattern" + properties: Array +} + +export interface ArrayPattern extends Node { + type: "ArrayPattern" + elements: Array +} + +export interface RestElement extends Node { + type: "RestElement" + argument: Pattern +} + +export interface AssignmentPattern extends Node { + type: "AssignmentPattern" + left: Pattern + right: Expression +} + +export interface Class extends Node { + id?: Identifier | null + superClass?: Expression | null + body: ClassBody +} + +export interface ClassBody extends Node { + type: "ClassBody" + body: Array +} + +export interface MethodDefinition extends Node { + type: "MethodDefinition" + key: Expression | PrivateIdentifier + value: FunctionExpression + kind: "constructor" | "method" | "get" | "set" + computed: boolean + static: boolean +} + +export interface ClassDeclaration extends Class { + type: "ClassDeclaration" + id: Identifier +} + +export interface ClassExpression extends Class { + type: "ClassExpression" +} + +export interface MetaProperty extends Node { + type: "MetaProperty" + meta: Identifier + property: Identifier +} + +export interface ImportDeclaration extends Node { + type: "ImportDeclaration" + specifiers: Array + source: Literal + attributes: Array +} + +export interface ImportSpecifier extends Node { + type: "ImportSpecifier" + imported: Identifier | Literal + local: Identifier +} + +export interface ImportDefaultSpecifier extends Node { + type: "ImportDefaultSpecifier" + local: Identifier +} + +export interface ImportNamespaceSpecifier extends Node { + type: "ImportNamespaceSpecifier" + local: Identifier +} + +export interface ImportAttribute extends Node { + type: "ImportAttribute" + key: Identifier | Literal + value: Literal +} + +export interface ExportNamedDeclaration extends Node { + type: "ExportNamedDeclaration" + declaration?: Declaration | null + specifiers: Array + source?: Literal | null + attributes: Array +} + +export interface ExportSpecifier extends Node { + type: "ExportSpecifier" + exported: Identifier | Literal + local: Identifier | Literal +} + +export interface AnonymousFunctionDeclaration extends Function { + type: "FunctionDeclaration" + id: null + body: BlockStatement +} + +export interface AnonymousClassDeclaration extends Class { + type: "ClassDeclaration" + id: null +} + +export interface ExportDefaultDeclaration extends Node { + type: "ExportDefaultDeclaration" + declaration: AnonymousFunctionDeclaration | FunctionDeclaration | AnonymousClassDeclaration | ClassDeclaration | Expression +} + +export interface ExportAllDeclaration extends Node { + type: "ExportAllDeclaration" + source: Literal + exported?: Identifier | Literal | null + attributes: Array +} + +export interface AwaitExpression extends Node { + type: "AwaitExpression" + argument: Expression +} + +export interface ChainExpression extends Node { + type: "ChainExpression" + expression: MemberExpression | CallExpression +} + +export interface ImportExpression extends Node { + type: "ImportExpression" + source: Expression + options: Expression | null +} + +export interface ParenthesizedExpression extends Node { + type: "ParenthesizedExpression" + expression: Expression +} + +export interface PropertyDefinition extends Node { + type: "PropertyDefinition" + key: Expression | PrivateIdentifier + value?: Expression | null + computed: boolean + static: boolean +} + +export interface PrivateIdentifier extends Node { + type: "PrivateIdentifier" + name: string +} + +export interface StaticBlock extends Node { + type: "StaticBlock" + body: Array +} + +export type Statement = +| ExpressionStatement +| BlockStatement +| EmptyStatement +| DebuggerStatement +| WithStatement +| ReturnStatement +| LabeledStatement +| BreakStatement +| ContinueStatement +| IfStatement +| SwitchStatement +| ThrowStatement +| TryStatement +| WhileStatement +| DoWhileStatement +| ForStatement +| ForInStatement +| ForOfStatement +| Declaration + +export type Declaration = +| FunctionDeclaration +| VariableDeclaration +| ClassDeclaration + +export type Expression = +| Identifier +| Literal +| ThisExpression +| ArrayExpression +| ObjectExpression +| FunctionExpression +| UnaryExpression +| UpdateExpression +| BinaryExpression +| AssignmentExpression +| LogicalExpression +| MemberExpression +| ConditionalExpression +| CallExpression +| NewExpression +| SequenceExpression +| ArrowFunctionExpression +| YieldExpression +| TemplateLiteral +| TaggedTemplateExpression +| ClassExpression +| MetaProperty +| AwaitExpression +| ChainExpression +| ImportExpression +| ParenthesizedExpression + +export type Pattern = +| Identifier +| MemberExpression +| ObjectPattern +| ArrayPattern +| RestElement +| AssignmentPattern + +export type ModuleDeclaration = +| ImportDeclaration +| ExportNamedDeclaration +| ExportDefaultDeclaration +| ExportAllDeclaration + +export type AnyNode = Statement | Expression | Declaration | ModuleDeclaration | Literal | Program | SwitchCase | CatchClause | Property | Super | SpreadElement | TemplateElement | AssignmentProperty | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | ClassBody | MethodDefinition | MetaProperty | ImportAttribute | ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier | AnonymousFunctionDeclaration | AnonymousClassDeclaration | PropertyDefinition | PrivateIdentifier | StaticBlock | VariableDeclarator + +export function parse(input: string, options: Options): Program + +export function parseExpressionAt(input: string, pos: number, options: Options): Expression + +export function tokenizer(input: string, options: Options): { + getToken(): Token + [Symbol.iterator](): Iterator +} + +export type ecmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | "latest" + +export interface Options { + /** + * `ecmaVersion` indicates the ECMAScript version to parse. Can be a + * number, either in year (`2022`) or plain version number (`6`) form, + * or `"latest"` (the latest the library supports). This influences + * support for strict mode, the set of reserved words, and support for + * new syntax features. + */ + ecmaVersion: ecmaVersion + + /** + * `sourceType` indicates the mode the code should be parsed in. + * Can be either `"script"` or `"module"`. This influences global + * strict mode and parsing of `import` and `export` declarations. + */ + sourceType?: "script" | "module" + + /** + * a callback that will be called when a semicolon is automatically inserted. + * @param lastTokEnd the position of the comma as an offset + * @param lastTokEndLoc location if {@link locations} is enabled + */ + onInsertedSemicolon?: (lastTokEnd: number, lastTokEndLoc?: Position) => void + + /** + * similar to `onInsertedSemicolon`, but for trailing commas + * @param lastTokEnd the position of the comma as an offset + * @param lastTokEndLoc location if `locations` is enabled + */ + onTrailingComma?: (lastTokEnd: number, lastTokEndLoc?: Position) => void + + /** + * By default, reserved words are only enforced if ecmaVersion >= 5. + * Set `allowReserved` to a boolean value to explicitly turn this on + * an off. When this option has the value "never", reserved words + * and keywords can also not be used as property names. + */ + allowReserved?: boolean | "never" + + /** + * When enabled, a return at the top level is not considered an error. + */ + allowReturnOutsideFunction?: boolean + + /** + * When enabled, import/export statements are not constrained to + * appearing at the top of the program, and an import.meta expression + * in a script isn't considered an error. + */ + allowImportExportEverywhere?: boolean + + /** + * By default, `await` identifiers are allowed to appear at the top-level scope only if {@link ecmaVersion} >= 2022. + * When enabled, await identifiers are allowed to appear at the top-level scope, + * but they are still not allowed in non-async functions. + */ + allowAwaitOutsideFunction?: boolean + + /** + * When enabled, super identifiers are not constrained to + * appearing in methods and do not raise an error when they appear elsewhere. + */ + allowSuperOutsideMethod?: boolean + + /** + * When enabled, hashbang directive in the beginning of file is + * allowed and treated as a line comment. Enabled by default when + * {@link ecmaVersion} >= 2023. + */ + allowHashBang?: boolean + + /** + * By default, the parser will verify that private properties are + * only used in places where they are valid and have been declared. + * Set this to false to turn such checks off. + */ + checkPrivateFields?: boolean + + /** + * When `locations` is on, `loc` properties holding objects with + * `start` and `end` properties as {@link Position} objects will be attached to the + * nodes. + */ + locations?: boolean + + /** + * a callback that will cause Acorn to call that export function with object in the same + * format as tokens returned from `tokenizer().getToken()`. Note + * that you are not allowed to call the parser from the + * callback—that will corrupt its internal state. + */ + onToken?: ((token: Token) => void) | Token[] + + + /** + * This takes a export function or an array. + * + * When a export function is passed, Acorn will call that export function with `(block, text, start, + * end)` parameters whenever a comment is skipped. `block` is a + * boolean indicating whether this is a block (`/* *\/`) comment, + * `text` is the content of the comment, and `start` and `end` are + * character offsets that denote the start and end of the comment. + * When the {@link locations} option is on, two more parameters are + * passed, the full locations of {@link Position} export type of the start and + * end of the comments. + * + * When a array is passed, each found comment of {@link Comment} export type is pushed to the array. + * + * Note that you are not allowed to call the + * parser from the callback—that will corrupt its internal state. + */ + onComment?: (( + isBlock: boolean, text: string, start: number, end: number, startLoc?: Position, + endLoc?: Position + ) => void) | Comment[] + + /** + * Nodes have their start and end characters offsets recorded in + * `start` and `end` properties (directly on the node, rather than + * the `loc` object, which holds line/column data. To also add a + * [semi-standardized][range] `range` property holding a `[start, + * end]` array with the same numbers, set the `ranges` option to + * `true`. + */ + ranges?: boolean + + /** + * It is possible to parse multiple files into a single AST by + * passing the tree produced by parsing the first file as + * `program` option in subsequent parses. This will add the + * toplevel forms of the parsed file to the `Program` (top) node + * of an existing parse tree. + */ + program?: Node + + /** + * When {@link locations} is on, you can pass this to record the source + * file in every node's `loc` object. + */ + sourceFile?: string + + /** + * This value, if given, is stored in every node, whether {@link locations} is on or off. + */ + directSourceFile?: string + + /** + * When enabled, parenthesized expressions are represented by + * (non-standard) ParenthesizedExpression nodes + */ + preserveParens?: boolean +} + +export class Parser { + options: Options + input: string + + protected constructor(options: Options, input: string, startPos?: number) + parse(): Program + + static parse(input: string, options: Options): Program + static parseExpressionAt(input: string, pos: number, options: Options): Expression + static tokenizer(input: string, options: Options): { + getToken(): Token + [Symbol.iterator](): Iterator + } + static extend(...plugins: ((BaseParser: typeof Parser) => typeof Parser)[]): typeof Parser +} + +export const defaultOptions: Options + +export function getLineInfo(input: string, offset: number): Position + +export class TokenType { + label: string + keyword: string | undefined +} + +export const tokTypes: { + num: TokenType + regexp: TokenType + string: TokenType + name: TokenType + privateId: TokenType + eof: TokenType + + bracketL: TokenType + bracketR: TokenType + braceL: TokenType + braceR: TokenType + parenL: TokenType + parenR: TokenType + comma: TokenType + semi: TokenType + colon: TokenType + dot: TokenType + question: TokenType + questionDot: TokenType + arrow: TokenType + template: TokenType + invalidTemplate: TokenType + ellipsis: TokenType + backQuote: TokenType + dollarBraceL: TokenType + + eq: TokenType + assign: TokenType + incDec: TokenType + prefix: TokenType + logicalOR: TokenType + logicalAND: TokenType + bitwiseOR: TokenType + bitwiseXOR: TokenType + bitwiseAND: TokenType + equality: TokenType + relational: TokenType + bitShift: TokenType + plusMin: TokenType + modulo: TokenType + star: TokenType + slash: TokenType + starstar: TokenType + coalesce: TokenType + + _break: TokenType + _case: TokenType + _catch: TokenType + _continue: TokenType + _debugger: TokenType + _default: TokenType + _do: TokenType + _else: TokenType + _finally: TokenType + _for: TokenType + _function: TokenType + _if: TokenType + _return: TokenType + _switch: TokenType + _throw: TokenType + _try: TokenType + _var: TokenType + _const: TokenType + _while: TokenType + _with: TokenType + _new: TokenType + _this: TokenType + _super: TokenType + _class: TokenType + _extends: TokenType + _export: TokenType + _import: TokenType + _null: TokenType + _true: TokenType + _false: TokenType + _in: TokenType + _instanceof: TokenType + _typeof: TokenType + _void: TokenType + _delete: TokenType +} + +export interface Comment { + type: "Line" | "Block" + value: string + start: number + end: number + loc?: SourceLocation + range?: [number, number] +} + +export class Token { + type: TokenType + start: number + end: number + loc?: SourceLocation + range?: [number, number] +} + +export const version: string diff --git a/node_modules/acorn/dist/acorn.d.ts b/node_modules/acorn/dist/acorn.d.ts new file mode 100644 index 0000000..81f4e38 --- /dev/null +++ b/node_modules/acorn/dist/acorn.d.ts @@ -0,0 +1,866 @@ +export interface Node { + start: number + end: number + type: string + range?: [number, number] + loc?: SourceLocation | null +} + +export interface SourceLocation { + source?: string | null + start: Position + end: Position +} + +export interface Position { + /** 1-based */ + line: number + /** 0-based */ + column: number +} + +export interface Identifier extends Node { + type: "Identifier" + name: string +} + +export interface Literal extends Node { + type: "Literal" + value?: string | boolean | null | number | RegExp | bigint + raw?: string + regex?: { + pattern: string + flags: string + } + bigint?: string +} + +export interface Program extends Node { + type: "Program" + body: Array + sourceType: "script" | "module" +} + +export interface Function extends Node { + id?: Identifier | null + params: Array + body: BlockStatement | Expression + generator: boolean + expression: boolean + async: boolean +} + +export interface ExpressionStatement extends Node { + type: "ExpressionStatement" + expression: Expression | Literal + directive?: string +} + +export interface BlockStatement extends Node { + type: "BlockStatement" + body: Array +} + +export interface EmptyStatement extends Node { + type: "EmptyStatement" +} + +export interface DebuggerStatement extends Node { + type: "DebuggerStatement" +} + +export interface WithStatement extends Node { + type: "WithStatement" + object: Expression + body: Statement +} + +export interface ReturnStatement extends Node { + type: "ReturnStatement" + argument?: Expression | null +} + +export interface LabeledStatement extends Node { + type: "LabeledStatement" + label: Identifier + body: Statement +} + +export interface BreakStatement extends Node { + type: "BreakStatement" + label?: Identifier | null +} + +export interface ContinueStatement extends Node { + type: "ContinueStatement" + label?: Identifier | null +} + +export interface IfStatement extends Node { + type: "IfStatement" + test: Expression + consequent: Statement + alternate?: Statement | null +} + +export interface SwitchStatement extends Node { + type: "SwitchStatement" + discriminant: Expression + cases: Array +} + +export interface SwitchCase extends Node { + type: "SwitchCase" + test?: Expression | null + consequent: Array +} + +export interface ThrowStatement extends Node { + type: "ThrowStatement" + argument: Expression +} + +export interface TryStatement extends Node { + type: "TryStatement" + block: BlockStatement + handler?: CatchClause | null + finalizer?: BlockStatement | null +} + +export interface CatchClause extends Node { + type: "CatchClause" + param?: Pattern | null + body: BlockStatement +} + +export interface WhileStatement extends Node { + type: "WhileStatement" + test: Expression + body: Statement +} + +export interface DoWhileStatement extends Node { + type: "DoWhileStatement" + body: Statement + test: Expression +} + +export interface ForStatement extends Node { + type: "ForStatement" + init?: VariableDeclaration | Expression | null + test?: Expression | null + update?: Expression | null + body: Statement +} + +export interface ForInStatement extends Node { + type: "ForInStatement" + left: VariableDeclaration | Pattern + right: Expression + body: Statement +} + +export interface FunctionDeclaration extends Function { + type: "FunctionDeclaration" + id: Identifier + body: BlockStatement +} + +export interface VariableDeclaration extends Node { + type: "VariableDeclaration" + declarations: Array + kind: "var" | "let" | "const" +} + +export interface VariableDeclarator extends Node { + type: "VariableDeclarator" + id: Pattern + init?: Expression | null +} + +export interface ThisExpression extends Node { + type: "ThisExpression" +} + +export interface ArrayExpression extends Node { + type: "ArrayExpression" + elements: Array +} + +export interface ObjectExpression extends Node { + type: "ObjectExpression" + properties: Array +} + +export interface Property extends Node { + type: "Property" + key: Expression + value: Expression + kind: "init" | "get" | "set" + method: boolean + shorthand: boolean + computed: boolean +} + +export interface FunctionExpression extends Function { + type: "FunctionExpression" + body: BlockStatement +} + +export interface UnaryExpression extends Node { + type: "UnaryExpression" + operator: UnaryOperator + prefix: boolean + argument: Expression +} + +export type UnaryOperator = "-" | "+" | "!" | "~" | "typeof" | "void" | "delete" + +export interface UpdateExpression extends Node { + type: "UpdateExpression" + operator: UpdateOperator + argument: Expression + prefix: boolean +} + +export type UpdateOperator = "++" | "--" + +export interface BinaryExpression extends Node { + type: "BinaryExpression" + operator: BinaryOperator + left: Expression | PrivateIdentifier + right: Expression +} + +export type BinaryOperator = "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "|" | "^" | "&" | "in" | "instanceof" | "**" + +export interface AssignmentExpression extends Node { + type: "AssignmentExpression" + operator: AssignmentOperator + left: Pattern + right: Expression +} + +export type AssignmentOperator = "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&=" | "**=" | "||=" | "&&=" | "??=" + +export interface LogicalExpression extends Node { + type: "LogicalExpression" + operator: LogicalOperator + left: Expression + right: Expression +} + +export type LogicalOperator = "||" | "&&" | "??" + +export interface MemberExpression extends Node { + type: "MemberExpression" + object: Expression | Super + property: Expression | PrivateIdentifier + computed: boolean + optional: boolean +} + +export interface ConditionalExpression extends Node { + type: "ConditionalExpression" + test: Expression + alternate: Expression + consequent: Expression +} + +export interface CallExpression extends Node { + type: "CallExpression" + callee: Expression | Super + arguments: Array + optional: boolean +} + +export interface NewExpression extends Node { + type: "NewExpression" + callee: Expression + arguments: Array +} + +export interface SequenceExpression extends Node { + type: "SequenceExpression" + expressions: Array +} + +export interface ForOfStatement extends Node { + type: "ForOfStatement" + left: VariableDeclaration | Pattern + right: Expression + body: Statement + await: boolean +} + +export interface Super extends Node { + type: "Super" +} + +export interface SpreadElement extends Node { + type: "SpreadElement" + argument: Expression +} + +export interface ArrowFunctionExpression extends Function { + type: "ArrowFunctionExpression" +} + +export interface YieldExpression extends Node { + type: "YieldExpression" + argument?: Expression | null + delegate: boolean +} + +export interface TemplateLiteral extends Node { + type: "TemplateLiteral" + quasis: Array + expressions: Array +} + +export interface TaggedTemplateExpression extends Node { + type: "TaggedTemplateExpression" + tag: Expression + quasi: TemplateLiteral +} + +export interface TemplateElement extends Node { + type: "TemplateElement" + tail: boolean + value: { + cooked?: string | null + raw: string + } +} + +export interface AssignmentProperty extends Node { + type: "Property" + key: Expression + value: Pattern + kind: "init" + method: false + shorthand: boolean + computed: boolean +} + +export interface ObjectPattern extends Node { + type: "ObjectPattern" + properties: Array +} + +export interface ArrayPattern extends Node { + type: "ArrayPattern" + elements: Array +} + +export interface RestElement extends Node { + type: "RestElement" + argument: Pattern +} + +export interface AssignmentPattern extends Node { + type: "AssignmentPattern" + left: Pattern + right: Expression +} + +export interface Class extends Node { + id?: Identifier | null + superClass?: Expression | null + body: ClassBody +} + +export interface ClassBody extends Node { + type: "ClassBody" + body: Array +} + +export interface MethodDefinition extends Node { + type: "MethodDefinition" + key: Expression | PrivateIdentifier + value: FunctionExpression + kind: "constructor" | "method" | "get" | "set" + computed: boolean + static: boolean +} + +export interface ClassDeclaration extends Class { + type: "ClassDeclaration" + id: Identifier +} + +export interface ClassExpression extends Class { + type: "ClassExpression" +} + +export interface MetaProperty extends Node { + type: "MetaProperty" + meta: Identifier + property: Identifier +} + +export interface ImportDeclaration extends Node { + type: "ImportDeclaration" + specifiers: Array + source: Literal + attributes: Array +} + +export interface ImportSpecifier extends Node { + type: "ImportSpecifier" + imported: Identifier | Literal + local: Identifier +} + +export interface ImportDefaultSpecifier extends Node { + type: "ImportDefaultSpecifier" + local: Identifier +} + +export interface ImportNamespaceSpecifier extends Node { + type: "ImportNamespaceSpecifier" + local: Identifier +} + +export interface ImportAttribute extends Node { + type: "ImportAttribute" + key: Identifier | Literal + value: Literal +} + +export interface ExportNamedDeclaration extends Node { + type: "ExportNamedDeclaration" + declaration?: Declaration | null + specifiers: Array + source?: Literal | null + attributes: Array +} + +export interface ExportSpecifier extends Node { + type: "ExportSpecifier" + exported: Identifier | Literal + local: Identifier | Literal +} + +export interface AnonymousFunctionDeclaration extends Function { + type: "FunctionDeclaration" + id: null + body: BlockStatement +} + +export interface AnonymousClassDeclaration extends Class { + type: "ClassDeclaration" + id: null +} + +export interface ExportDefaultDeclaration extends Node { + type: "ExportDefaultDeclaration" + declaration: AnonymousFunctionDeclaration | FunctionDeclaration | AnonymousClassDeclaration | ClassDeclaration | Expression +} + +export interface ExportAllDeclaration extends Node { + type: "ExportAllDeclaration" + source: Literal + exported?: Identifier | Literal | null + attributes: Array +} + +export interface AwaitExpression extends Node { + type: "AwaitExpression" + argument: Expression +} + +export interface ChainExpression extends Node { + type: "ChainExpression" + expression: MemberExpression | CallExpression +} + +export interface ImportExpression extends Node { + type: "ImportExpression" + source: Expression + options: Expression | null +} + +export interface ParenthesizedExpression extends Node { + type: "ParenthesizedExpression" + expression: Expression +} + +export interface PropertyDefinition extends Node { + type: "PropertyDefinition" + key: Expression | PrivateIdentifier + value?: Expression | null + computed: boolean + static: boolean +} + +export interface PrivateIdentifier extends Node { + type: "PrivateIdentifier" + name: string +} + +export interface StaticBlock extends Node { + type: "StaticBlock" + body: Array +} + +export type Statement = +| ExpressionStatement +| BlockStatement +| EmptyStatement +| DebuggerStatement +| WithStatement +| ReturnStatement +| LabeledStatement +| BreakStatement +| ContinueStatement +| IfStatement +| SwitchStatement +| ThrowStatement +| TryStatement +| WhileStatement +| DoWhileStatement +| ForStatement +| ForInStatement +| ForOfStatement +| Declaration + +export type Declaration = +| FunctionDeclaration +| VariableDeclaration +| ClassDeclaration + +export type Expression = +| Identifier +| Literal +| ThisExpression +| ArrayExpression +| ObjectExpression +| FunctionExpression +| UnaryExpression +| UpdateExpression +| BinaryExpression +| AssignmentExpression +| LogicalExpression +| MemberExpression +| ConditionalExpression +| CallExpression +| NewExpression +| SequenceExpression +| ArrowFunctionExpression +| YieldExpression +| TemplateLiteral +| TaggedTemplateExpression +| ClassExpression +| MetaProperty +| AwaitExpression +| ChainExpression +| ImportExpression +| ParenthesizedExpression + +export type Pattern = +| Identifier +| MemberExpression +| ObjectPattern +| ArrayPattern +| RestElement +| AssignmentPattern + +export type ModuleDeclaration = +| ImportDeclaration +| ExportNamedDeclaration +| ExportDefaultDeclaration +| ExportAllDeclaration + +export type AnyNode = Statement | Expression | Declaration | ModuleDeclaration | Literal | Program | SwitchCase | CatchClause | Property | Super | SpreadElement | TemplateElement | AssignmentProperty | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | ClassBody | MethodDefinition | MetaProperty | ImportAttribute | ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier | AnonymousFunctionDeclaration | AnonymousClassDeclaration | PropertyDefinition | PrivateIdentifier | StaticBlock | VariableDeclarator + +export function parse(input: string, options: Options): Program + +export function parseExpressionAt(input: string, pos: number, options: Options): Expression + +export function tokenizer(input: string, options: Options): { + getToken(): Token + [Symbol.iterator](): Iterator +} + +export type ecmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | "latest" + +export interface Options { + /** + * `ecmaVersion` indicates the ECMAScript version to parse. Can be a + * number, either in year (`2022`) or plain version number (`6`) form, + * or `"latest"` (the latest the library supports). This influences + * support for strict mode, the set of reserved words, and support for + * new syntax features. + */ + ecmaVersion: ecmaVersion + + /** + * `sourceType` indicates the mode the code should be parsed in. + * Can be either `"script"` or `"module"`. This influences global + * strict mode and parsing of `import` and `export` declarations. + */ + sourceType?: "script" | "module" + + /** + * a callback that will be called when a semicolon is automatically inserted. + * @param lastTokEnd the position of the comma as an offset + * @param lastTokEndLoc location if {@link locations} is enabled + */ + onInsertedSemicolon?: (lastTokEnd: number, lastTokEndLoc?: Position) => void + + /** + * similar to `onInsertedSemicolon`, but for trailing commas + * @param lastTokEnd the position of the comma as an offset + * @param lastTokEndLoc location if `locations` is enabled + */ + onTrailingComma?: (lastTokEnd: number, lastTokEndLoc?: Position) => void + + /** + * By default, reserved words are only enforced if ecmaVersion >= 5. + * Set `allowReserved` to a boolean value to explicitly turn this on + * an off. When this option has the value "never", reserved words + * and keywords can also not be used as property names. + */ + allowReserved?: boolean | "never" + + /** + * When enabled, a return at the top level is not considered an error. + */ + allowReturnOutsideFunction?: boolean + + /** + * When enabled, import/export statements are not constrained to + * appearing at the top of the program, and an import.meta expression + * in a script isn't considered an error. + */ + allowImportExportEverywhere?: boolean + + /** + * By default, `await` identifiers are allowed to appear at the top-level scope only if {@link ecmaVersion} >= 2022. + * When enabled, await identifiers are allowed to appear at the top-level scope, + * but they are still not allowed in non-async functions. + */ + allowAwaitOutsideFunction?: boolean + + /** + * When enabled, super identifiers are not constrained to + * appearing in methods and do not raise an error when they appear elsewhere. + */ + allowSuperOutsideMethod?: boolean + + /** + * When enabled, hashbang directive in the beginning of file is + * allowed and treated as a line comment. Enabled by default when + * {@link ecmaVersion} >= 2023. + */ + allowHashBang?: boolean + + /** + * By default, the parser will verify that private properties are + * only used in places where they are valid and have been declared. + * Set this to false to turn such checks off. + */ + checkPrivateFields?: boolean + + /** + * When `locations` is on, `loc` properties holding objects with + * `start` and `end` properties as {@link Position} objects will be attached to the + * nodes. + */ + locations?: boolean + + /** + * a callback that will cause Acorn to call that export function with object in the same + * format as tokens returned from `tokenizer().getToken()`. Note + * that you are not allowed to call the parser from the + * callback—that will corrupt its internal state. + */ + onToken?: ((token: Token) => void) | Token[] + + + /** + * This takes a export function or an array. + * + * When a export function is passed, Acorn will call that export function with `(block, text, start, + * end)` parameters whenever a comment is skipped. `block` is a + * boolean indicating whether this is a block (`/* *\/`) comment, + * `text` is the content of the comment, and `start` and `end` are + * character offsets that denote the start and end of the comment. + * When the {@link locations} option is on, two more parameters are + * passed, the full locations of {@link Position} export type of the start and + * end of the comments. + * + * When a array is passed, each found comment of {@link Comment} export type is pushed to the array. + * + * Note that you are not allowed to call the + * parser from the callback—that will corrupt its internal state. + */ + onComment?: (( + isBlock: boolean, text: string, start: number, end: number, startLoc?: Position, + endLoc?: Position + ) => void) | Comment[] + + /** + * Nodes have their start and end characters offsets recorded in + * `start` and `end` properties (directly on the node, rather than + * the `loc` object, which holds line/column data. To also add a + * [semi-standardized][range] `range` property holding a `[start, + * end]` array with the same numbers, set the `ranges` option to + * `true`. + */ + ranges?: boolean + + /** + * It is possible to parse multiple files into a single AST by + * passing the tree produced by parsing the first file as + * `program` option in subsequent parses. This will add the + * toplevel forms of the parsed file to the `Program` (top) node + * of an existing parse tree. + */ + program?: Node + + /** + * When {@link locations} is on, you can pass this to record the source + * file in every node's `loc` object. + */ + sourceFile?: string + + /** + * This value, if given, is stored in every node, whether {@link locations} is on or off. + */ + directSourceFile?: string + + /** + * When enabled, parenthesized expressions are represented by + * (non-standard) ParenthesizedExpression nodes + */ + preserveParens?: boolean +} + +export class Parser { + options: Options + input: string + + protected constructor(options: Options, input: string, startPos?: number) + parse(): Program + + static parse(input: string, options: Options): Program + static parseExpressionAt(input: string, pos: number, options: Options): Expression + static tokenizer(input: string, options: Options): { + getToken(): Token + [Symbol.iterator](): Iterator + } + static extend(...plugins: ((BaseParser: typeof Parser) => typeof Parser)[]): typeof Parser +} + +export const defaultOptions: Options + +export function getLineInfo(input: string, offset: number): Position + +export class TokenType { + label: string + keyword: string | undefined +} + +export const tokTypes: { + num: TokenType + regexp: TokenType + string: TokenType + name: TokenType + privateId: TokenType + eof: TokenType + + bracketL: TokenType + bracketR: TokenType + braceL: TokenType + braceR: TokenType + parenL: TokenType + parenR: TokenType + comma: TokenType + semi: TokenType + colon: TokenType + dot: TokenType + question: TokenType + questionDot: TokenType + arrow: TokenType + template: TokenType + invalidTemplate: TokenType + ellipsis: TokenType + backQuote: TokenType + dollarBraceL: TokenType + + eq: TokenType + assign: TokenType + incDec: TokenType + prefix: TokenType + logicalOR: TokenType + logicalAND: TokenType + bitwiseOR: TokenType + bitwiseXOR: TokenType + bitwiseAND: TokenType + equality: TokenType + relational: TokenType + bitShift: TokenType + plusMin: TokenType + modulo: TokenType + star: TokenType + slash: TokenType + starstar: TokenType + coalesce: TokenType + + _break: TokenType + _case: TokenType + _catch: TokenType + _continue: TokenType + _debugger: TokenType + _default: TokenType + _do: TokenType + _else: TokenType + _finally: TokenType + _for: TokenType + _function: TokenType + _if: TokenType + _return: TokenType + _switch: TokenType + _throw: TokenType + _try: TokenType + _var: TokenType + _const: TokenType + _while: TokenType + _with: TokenType + _new: TokenType + _this: TokenType + _super: TokenType + _class: TokenType + _extends: TokenType + _export: TokenType + _import: TokenType + _null: TokenType + _true: TokenType + _false: TokenType + _in: TokenType + _instanceof: TokenType + _typeof: TokenType + _void: TokenType + _delete: TokenType +} + +export interface Comment { + type: "Line" | "Block" + value: string + start: number + end: number + loc?: SourceLocation + range?: [number, number] +} + +export class Token { + type: TokenType + start: number + end: number + loc?: SourceLocation + range?: [number, number] +} + +export const version: string diff --git a/node_modules/acorn/dist/acorn.js b/node_modules/acorn/dist/acorn.js new file mode 100644 index 0000000..2bfc15b --- /dev/null +++ b/node_modules/acorn/dist/acorn.js @@ -0,0 +1,6174 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.acorn = {})); +})(this, (function (exports) { 'use strict'; + + // This file was generated. Do not modify manually! + var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 343, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239]; + + // This file was generated. Do not modify manually! + var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 496, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191]; + + // This file was generated. Do not modify manually! + var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0897-\u089f\u08ca-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3c\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0cf3\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ece\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u180f-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf-\u1ace\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\u30fb\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f\uff65"; + + // This file was generated. Do not modify manually! + var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u0870-\u0887\u0889-\u088e\u08a0-\u08c9\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u1711\u171f-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4c\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c8a\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7cd\ua7d0\ua7d1\ua7d3\ua7d5-\ua7dc\ua7f2-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"; + + // These are a run-length and offset encoded representation of the + // >0xffff code points that are a valid part of identifiers. The + // offset starts at 0x10000, and each pair of numbers represents an + // offset to the next range, and then a size of the range. + + // Reserved word lists for various dialects of the language + + var reservedWords = { + 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile", + 5: "class enum extends super const export import", + 6: "enum", + strict: "implements interface let package private protected public static yield", + strictBind: "eval arguments" + }; + + // And the keywords + + var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"; + + var keywords$1 = { + 5: ecma5AndLessKeywords, + "5module": ecma5AndLessKeywords + " export import", + 6: ecma5AndLessKeywords + " const class extends export import super" + }; + + var keywordRelationalOperator = /^in(stanceof)?$/; + + // ## Character categories + + var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); + var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); + + // This has a complexity linear to the value of the code. The + // assumption is that looking up astral identifier characters is + // rare. + function isInAstralSet(code, set) { + var pos = 0x10000; + for (var i = 0; i < set.length; i += 2) { + pos += set[i]; + if (pos > code) { return false } + pos += set[i + 1]; + if (pos >= code) { return true } + } + return false + } + + // Test whether a given character code starts an identifier. + + function isIdentifierStart(code, astral) { + if (code < 65) { return code === 36 } + if (code < 91) { return true } + if (code < 97) { return code === 95 } + if (code < 123) { return true } + if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)) } + if (astral === false) { return false } + return isInAstralSet(code, astralIdentifierStartCodes) + } + + // Test whether a given character is part of an identifier. + + function isIdentifierChar(code, astral) { + if (code < 48) { return code === 36 } + if (code < 58) { return true } + if (code < 65) { return false } + if (code < 91) { return true } + if (code < 97) { return code === 95 } + if (code < 123) { return true } + if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)) } + if (astral === false) { return false } + return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes) + } + + // ## Token types + + // The assignment of fine-grained, information-carrying type objects + // allows the tokenizer to store the information it has about a + // token in a way that is very cheap for the parser to look up. + + // All token type variables start with an underscore, to make them + // easy to recognize. + + // The `beforeExpr` property is used to disambiguate between regular + // expressions and divisions. It is set on all token types that can + // be followed by an expression (thus, a slash after them would be a + // regular expression). + // + // The `startsExpr` property is used to check if the token ends a + // `yield` expression. It is set on all token types that either can + // directly start an expression (like a quotation mark) or can + // continue an expression (like the body of a string). + // + // `isLoop` marks a keyword as starting a loop, which is important + // to know when parsing a label, in order to allow or disallow + // continue jumps to that label. + + var TokenType = function TokenType(label, conf) { + if ( conf === void 0 ) conf = {}; + + this.label = label; + this.keyword = conf.keyword; + this.beforeExpr = !!conf.beforeExpr; + this.startsExpr = !!conf.startsExpr; + this.isLoop = !!conf.isLoop; + this.isAssign = !!conf.isAssign; + this.prefix = !!conf.prefix; + this.postfix = !!conf.postfix; + this.binop = conf.binop || null; + this.updateContext = null; + }; + + function binop(name, prec) { + return new TokenType(name, {beforeExpr: true, binop: prec}) + } + var beforeExpr = {beforeExpr: true}, startsExpr = {startsExpr: true}; + + // Map keyword names to token types. + + var keywords = {}; + + // Succinct definitions of keyword token types + function kw(name, options) { + if ( options === void 0 ) options = {}; + + options.keyword = name; + return keywords[name] = new TokenType(name, options) + } + + var types$1 = { + num: new TokenType("num", startsExpr), + regexp: new TokenType("regexp", startsExpr), + string: new TokenType("string", startsExpr), + name: new TokenType("name", startsExpr), + privateId: new TokenType("privateId", startsExpr), + eof: new TokenType("eof"), + + // Punctuation token types. + bracketL: new TokenType("[", {beforeExpr: true, startsExpr: true}), + bracketR: new TokenType("]"), + braceL: new TokenType("{", {beforeExpr: true, startsExpr: true}), + braceR: new TokenType("}"), + parenL: new TokenType("(", {beforeExpr: true, startsExpr: true}), + parenR: new TokenType(")"), + comma: new TokenType(",", beforeExpr), + semi: new TokenType(";", beforeExpr), + colon: new TokenType(":", beforeExpr), + dot: new TokenType("."), + question: new TokenType("?", beforeExpr), + questionDot: new TokenType("?."), + arrow: new TokenType("=>", beforeExpr), + template: new TokenType("template"), + invalidTemplate: new TokenType("invalidTemplate"), + ellipsis: new TokenType("...", beforeExpr), + backQuote: new TokenType("`", startsExpr), + dollarBraceL: new TokenType("${", {beforeExpr: true, startsExpr: true}), + + // Operators. These carry several kinds of properties to help the + // parser use them properly (the presence of these properties is + // what categorizes them as operators). + // + // `binop`, when present, specifies that this operator is a binary + // operator, and will refer to its precedence. + // + // `prefix` and `postfix` mark the operator as a prefix or postfix + // unary operator. + // + // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as + // binary operators with a very low precedence, that should result + // in AssignmentExpression nodes. + + eq: new TokenType("=", {beforeExpr: true, isAssign: true}), + assign: new TokenType("_=", {beforeExpr: true, isAssign: true}), + incDec: new TokenType("++/--", {prefix: true, postfix: true, startsExpr: true}), + prefix: new TokenType("!/~", {beforeExpr: true, prefix: true, startsExpr: true}), + logicalOR: binop("||", 1), + logicalAND: binop("&&", 2), + bitwiseOR: binop("|", 3), + bitwiseXOR: binop("^", 4), + bitwiseAND: binop("&", 5), + equality: binop("==/!=/===/!==", 6), + relational: binop("/<=/>=", 7), + bitShift: binop("<>/>>>", 8), + plusMin: new TokenType("+/-", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}), + modulo: binop("%", 10), + star: binop("*", 10), + slash: binop("/", 10), + starstar: new TokenType("**", {beforeExpr: true}), + coalesce: binop("??", 1), + + // Keyword token types. + _break: kw("break"), + _case: kw("case", beforeExpr), + _catch: kw("catch"), + _continue: kw("continue"), + _debugger: kw("debugger"), + _default: kw("default", beforeExpr), + _do: kw("do", {isLoop: true, beforeExpr: true}), + _else: kw("else", beforeExpr), + _finally: kw("finally"), + _for: kw("for", {isLoop: true}), + _function: kw("function", startsExpr), + _if: kw("if"), + _return: kw("return", beforeExpr), + _switch: kw("switch"), + _throw: kw("throw", beforeExpr), + _try: kw("try"), + _var: kw("var"), + _const: kw("const"), + _while: kw("while", {isLoop: true}), + _with: kw("with"), + _new: kw("new", {beforeExpr: true, startsExpr: true}), + _this: kw("this", startsExpr), + _super: kw("super", startsExpr), + _class: kw("class", startsExpr), + _extends: kw("extends", beforeExpr), + _export: kw("export"), + _import: kw("import", startsExpr), + _null: kw("null", startsExpr), + _true: kw("true", startsExpr), + _false: kw("false", startsExpr), + _in: kw("in", {beforeExpr: true, binop: 7}), + _instanceof: kw("instanceof", {beforeExpr: true, binop: 7}), + _typeof: kw("typeof", {beforeExpr: true, prefix: true, startsExpr: true}), + _void: kw("void", {beforeExpr: true, prefix: true, startsExpr: true}), + _delete: kw("delete", {beforeExpr: true, prefix: true, startsExpr: true}) + }; + + // Matches a whole line break (where CRLF is considered a single + // line break). Used to count lines. + + var lineBreak = /\r\n?|\n|\u2028|\u2029/; + var lineBreakG = new RegExp(lineBreak.source, "g"); + + function isNewLine(code) { + return code === 10 || code === 13 || code === 0x2028 || code === 0x2029 + } + + function nextLineBreak(code, from, end) { + if ( end === void 0 ) end = code.length; + + for (var i = from; i < end; i++) { + var next = code.charCodeAt(i); + if (isNewLine(next)) + { return i < end - 1 && next === 13 && code.charCodeAt(i + 1) === 10 ? i + 2 : i + 1 } + } + return -1 + } + + var nonASCIIwhitespace = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/; + + var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; + + var ref = Object.prototype; + var hasOwnProperty = ref.hasOwnProperty; + var toString = ref.toString; + + var hasOwn = Object.hasOwn || (function (obj, propName) { return ( + hasOwnProperty.call(obj, propName) + ); }); + + var isArray = Array.isArray || (function (obj) { return ( + toString.call(obj) === "[object Array]" + ); }); + + var regexpCache = Object.create(null); + + function wordsRegexp(words) { + return regexpCache[words] || (regexpCache[words] = new RegExp("^(?:" + words.replace(/ /g, "|") + ")$")) + } + + function codePointToString(code) { + // UTF-16 Decoding + if (code <= 0xFFFF) { return String.fromCharCode(code) } + code -= 0x10000; + return String.fromCharCode((code >> 10) + 0xD800, (code & 1023) + 0xDC00) + } + + var loneSurrogate = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/; + + // These are used when `options.locations` is on, for the + // `startLoc` and `endLoc` properties. + + var Position = function Position(line, col) { + this.line = line; + this.column = col; + }; + + Position.prototype.offset = function offset (n) { + return new Position(this.line, this.column + n) + }; + + var SourceLocation = function SourceLocation(p, start, end) { + this.start = start; + this.end = end; + if (p.sourceFile !== null) { this.source = p.sourceFile; } + }; + + // The `getLineInfo` function is mostly useful when the + // `locations` option is off (for performance reasons) and you + // want to find the line/column position for a given character + // offset. `input` should be the code string that the offset refers + // into. + + function getLineInfo(input, offset) { + for (var line = 1, cur = 0;;) { + var nextBreak = nextLineBreak(input, cur, offset); + if (nextBreak < 0) { return new Position(line, offset - cur) } + ++line; + cur = nextBreak; + } + } + + // A second argument must be given to configure the parser process. + // These options are recognized (only `ecmaVersion` is required): + + var defaultOptions = { + // `ecmaVersion` indicates the ECMAScript version to parse. Must be + // either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10 + // (2019), 11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"` + // (the latest version the library supports). This influences + // support for strict mode, the set of reserved words, and support + // for new syntax features. + ecmaVersion: null, + // `sourceType` indicates the mode the code should be parsed in. + // Can be either `"script"` or `"module"`. This influences global + // strict mode and parsing of `import` and `export` declarations. + sourceType: "script", + // `onInsertedSemicolon` can be a callback that will be called when + // a semicolon is automatically inserted. It will be passed the + // position of the inserted semicolon as an offset, and if + // `locations` is enabled, it is given the location as a `{line, + // column}` object as second argument. + onInsertedSemicolon: null, + // `onTrailingComma` is similar to `onInsertedSemicolon`, but for + // trailing commas. + onTrailingComma: null, + // By default, reserved words are only enforced if ecmaVersion >= 5. + // Set `allowReserved` to a boolean value to explicitly turn this on + // an off. When this option has the value "never", reserved words + // and keywords can also not be used as property names. + allowReserved: null, + // When enabled, a return at the top level is not considered an + // error. + allowReturnOutsideFunction: false, + // When enabled, import/export statements are not constrained to + // appearing at the top of the program, and an import.meta expression + // in a script isn't considered an error. + allowImportExportEverywhere: false, + // By default, await identifiers are allowed to appear at the top-level scope only if ecmaVersion >= 2022. + // When enabled, await identifiers are allowed to appear at the top-level scope, + // but they are still not allowed in non-async functions. + allowAwaitOutsideFunction: null, + // When enabled, super identifiers are not constrained to + // appearing in methods and do not raise an error when they appear elsewhere. + allowSuperOutsideMethod: null, + // When enabled, hashbang directive in the beginning of file is + // allowed and treated as a line comment. Enabled by default when + // `ecmaVersion` >= 2023. + allowHashBang: false, + // By default, the parser will verify that private properties are + // only used in places where they are valid and have been declared. + // Set this to false to turn such checks off. + checkPrivateFields: true, + // When `locations` is on, `loc` properties holding objects with + // `start` and `end` properties in `{line, column}` form (with + // line being 1-based and column 0-based) will be attached to the + // nodes. + locations: false, + // A function can be passed as `onToken` option, which will + // cause Acorn to call that function with object in the same + // format as tokens returned from `tokenizer().getToken()`. Note + // that you are not allowed to call the parser from the + // callback—that will corrupt its internal state. + onToken: null, + // A function can be passed as `onComment` option, which will + // cause Acorn to call that function with `(block, text, start, + // end)` parameters whenever a comment is skipped. `block` is a + // boolean indicating whether this is a block (`/* */`) comment, + // `text` is the content of the comment, and `start` and `end` are + // character offsets that denote the start and end of the comment. + // When the `locations` option is on, two more parameters are + // passed, the full `{line, column}` locations of the start and + // end of the comments. Note that you are not allowed to call the + // parser from the callback—that will corrupt its internal state. + // When this option has an array as value, objects representing the + // comments are pushed to it. + onComment: null, + // Nodes have their start and end characters offsets recorded in + // `start` and `end` properties (directly on the node, rather than + // the `loc` object, which holds line/column data. To also add a + // [semi-standardized][range] `range` property holding a `[start, + // end]` array with the same numbers, set the `ranges` option to + // `true`. + // + // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 + ranges: false, + // It is possible to parse multiple files into a single AST by + // passing the tree produced by parsing the first file as + // `program` option in subsequent parses. This will add the + // toplevel forms of the parsed file to the `Program` (top) node + // of an existing parse tree. + program: null, + // When `locations` is on, you can pass this to record the source + // file in every node's `loc` object. + sourceFile: null, + // This value, if given, is stored in every node, whether + // `locations` is on or off. + directSourceFile: null, + // When enabled, parenthesized expressions are represented by + // (non-standard) ParenthesizedExpression nodes + preserveParens: false + }; + + // Interpret and default an options object + + var warnedAboutEcmaVersion = false; + + function getOptions(opts) { + var options = {}; + + for (var opt in defaultOptions) + { options[opt] = opts && hasOwn(opts, opt) ? opts[opt] : defaultOptions[opt]; } + + if (options.ecmaVersion === "latest") { + options.ecmaVersion = 1e8; + } else if (options.ecmaVersion == null) { + if (!warnedAboutEcmaVersion && typeof console === "object" && console.warn) { + warnedAboutEcmaVersion = true; + console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future."); + } + options.ecmaVersion = 11; + } else if (options.ecmaVersion >= 2015) { + options.ecmaVersion -= 2009; + } + + if (options.allowReserved == null) + { options.allowReserved = options.ecmaVersion < 5; } + + if (!opts || opts.allowHashBang == null) + { options.allowHashBang = options.ecmaVersion >= 14; } + + if (isArray(options.onToken)) { + var tokens = options.onToken; + options.onToken = function (token) { return tokens.push(token); }; + } + if (isArray(options.onComment)) + { options.onComment = pushComment(options, options.onComment); } + + return options + } + + function pushComment(options, array) { + return function(block, text, start, end, startLoc, endLoc) { + var comment = { + type: block ? "Block" : "Line", + value: text, + start: start, + end: end + }; + if (options.locations) + { comment.loc = new SourceLocation(this, startLoc, endLoc); } + if (options.ranges) + { comment.range = [start, end]; } + array.push(comment); + } + } + + // Each scope gets a bitset that may contain these flags + var + SCOPE_TOP = 1, + SCOPE_FUNCTION = 2, + SCOPE_ASYNC = 4, + SCOPE_GENERATOR = 8, + SCOPE_ARROW = 16, + SCOPE_SIMPLE_CATCH = 32, + SCOPE_SUPER = 64, + SCOPE_DIRECT_SUPER = 128, + SCOPE_CLASS_STATIC_BLOCK = 256, + SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK; + + function functionFlags(async, generator) { + return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0) + } + + // Used in checkLVal* and declareName to determine the type of a binding + var + BIND_NONE = 0, // Not a binding + BIND_VAR = 1, // Var-style binding + BIND_LEXICAL = 2, // Let- or const-style binding + BIND_FUNCTION = 3, // Function declaration + BIND_SIMPLE_CATCH = 4, // Simple (identifier pattern) catch binding + BIND_OUTSIDE = 5; // Special case for function names as bound inside the function + + var Parser = function Parser(options, input, startPos) { + this.options = options = getOptions(options); + this.sourceFile = options.sourceFile; + this.keywords = wordsRegexp(keywords$1[options.ecmaVersion >= 6 ? 6 : options.sourceType === "module" ? "5module" : 5]); + var reserved = ""; + if (options.allowReserved !== true) { + reserved = reservedWords[options.ecmaVersion >= 6 ? 6 : options.ecmaVersion === 5 ? 5 : 3]; + if (options.sourceType === "module") { reserved += " await"; } + } + this.reservedWords = wordsRegexp(reserved); + var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict; + this.reservedWordsStrict = wordsRegexp(reservedStrict); + this.reservedWordsStrictBind = wordsRegexp(reservedStrict + " " + reservedWords.strictBind); + this.input = String(input); + + // Used to signal to callers of `readWord1` whether the word + // contained any escape sequences. This is needed because words with + // escape sequences must not be interpreted as keywords. + this.containsEsc = false; + + // Set up token state + + // The current position of the tokenizer in the input. + if (startPos) { + this.pos = startPos; + this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1; + this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length; + } else { + this.pos = this.lineStart = 0; + this.curLine = 1; + } + + // Properties of the current token: + // Its type + this.type = types$1.eof; + // For tokens that include more information than their type, the value + this.value = null; + // Its start and end offset + this.start = this.end = this.pos; + // And, if locations are used, the {line, column} object + // corresponding to those offsets + this.startLoc = this.endLoc = this.curPosition(); + + // Position information for the previous token + this.lastTokEndLoc = this.lastTokStartLoc = null; + this.lastTokStart = this.lastTokEnd = this.pos; + + // The context stack is used to superficially track syntactic + // context to predict whether a regular expression is allowed in a + // given position. + this.context = this.initialContext(); + this.exprAllowed = true; + + // Figure out if it's a module code. + this.inModule = options.sourceType === "module"; + this.strict = this.inModule || this.strictDirective(this.pos); + + // Used to signify the start of a potential arrow function + this.potentialArrowAt = -1; + this.potentialArrowInForAwait = false; + + // Positions to delayed-check that yield/await does not exist in default parameters. + this.yieldPos = this.awaitPos = this.awaitIdentPos = 0; + // Labels in scope. + this.labels = []; + // Thus-far undefined exports. + this.undefinedExports = Object.create(null); + + // If enabled, skip leading hashbang line. + if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!") + { this.skipLineComment(2); } + + // Scope tracking for duplicate variable names (see scope.js) + this.scopeStack = []; + this.enterScope(SCOPE_TOP); + + // For RegExp validation + this.regexpState = null; + + // The stack of private names. + // Each element has two properties: 'declared' and 'used'. + // When it exited from the outermost class definition, all used private names must be declared. + this.privateNameStack = []; + }; + + var prototypeAccessors = { inFunction: { configurable: true },inGenerator: { configurable: true },inAsync: { configurable: true },canAwait: { configurable: true },allowSuper: { configurable: true },allowDirectSuper: { configurable: true },treatFunctionsAsVar: { configurable: true },allowNewDotTarget: { configurable: true },inClassStaticBlock: { configurable: true } }; + + Parser.prototype.parse = function parse () { + var node = this.options.program || this.startNode(); + this.nextToken(); + return this.parseTopLevel(node) + }; + + prototypeAccessors.inFunction.get = function () { return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0 }; + + prototypeAccessors.inGenerator.get = function () { return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0 && !this.currentVarScope().inClassFieldInit }; + + prototypeAccessors.inAsync.get = function () { return (this.currentVarScope().flags & SCOPE_ASYNC) > 0 && !this.currentVarScope().inClassFieldInit }; + + prototypeAccessors.canAwait.get = function () { + for (var i = this.scopeStack.length - 1; i >= 0; i--) { + var scope = this.scopeStack[i]; + if (scope.inClassFieldInit || scope.flags & SCOPE_CLASS_STATIC_BLOCK) { return false } + if (scope.flags & SCOPE_FUNCTION) { return (scope.flags & SCOPE_ASYNC) > 0 } + } + return (this.inModule && this.options.ecmaVersion >= 13) || this.options.allowAwaitOutsideFunction + }; + + prototypeAccessors.allowSuper.get = function () { + var ref = this.currentThisScope(); + var flags = ref.flags; + var inClassFieldInit = ref.inClassFieldInit; + return (flags & SCOPE_SUPER) > 0 || inClassFieldInit || this.options.allowSuperOutsideMethod + }; + + prototypeAccessors.allowDirectSuper.get = function () { return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0 }; + + prototypeAccessors.treatFunctionsAsVar.get = function () { return this.treatFunctionsAsVarInScope(this.currentScope()) }; + + prototypeAccessors.allowNewDotTarget.get = function () { + var ref = this.currentThisScope(); + var flags = ref.flags; + var inClassFieldInit = ref.inClassFieldInit; + return (flags & (SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK)) > 0 || inClassFieldInit + }; + + prototypeAccessors.inClassStaticBlock.get = function () { + return (this.currentVarScope().flags & SCOPE_CLASS_STATIC_BLOCK) > 0 + }; + + Parser.extend = function extend () { + var plugins = [], len = arguments.length; + while ( len-- ) plugins[ len ] = arguments[ len ]; + + var cls = this; + for (var i = 0; i < plugins.length; i++) { cls = plugins[i](cls); } + return cls + }; + + Parser.parse = function parse (input, options) { + return new this(options, input).parse() + }; + + Parser.parseExpressionAt = function parseExpressionAt (input, pos, options) { + var parser = new this(options, input, pos); + parser.nextToken(); + return parser.parseExpression() + }; + + Parser.tokenizer = function tokenizer (input, options) { + return new this(options, input) + }; + + Object.defineProperties( Parser.prototype, prototypeAccessors ); + + var pp$9 = Parser.prototype; + + // ## Parser utilities + + var literal = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/; + pp$9.strictDirective = function(start) { + if (this.options.ecmaVersion < 5) { return false } + for (;;) { + // Try to find string literal. + skipWhiteSpace.lastIndex = start; + start += skipWhiteSpace.exec(this.input)[0].length; + var match = literal.exec(this.input.slice(start)); + if (!match) { return false } + if ((match[1] || match[2]) === "use strict") { + skipWhiteSpace.lastIndex = start + match[0].length; + var spaceAfter = skipWhiteSpace.exec(this.input), end = spaceAfter.index + spaceAfter[0].length; + var next = this.input.charAt(end); + return next === ";" || next === "}" || + (lineBreak.test(spaceAfter[0]) && + !(/[(`.[+\-/*%<>=,?^&]/.test(next) || next === "!" && this.input.charAt(end + 1) === "=")) + } + start += match[0].length; + + // Skip semicolon, if any. + skipWhiteSpace.lastIndex = start; + start += skipWhiteSpace.exec(this.input)[0].length; + if (this.input[start] === ";") + { start++; } + } + }; + + // Predicate that tests whether the next token is of the given + // type, and if yes, consumes it as a side effect. + + pp$9.eat = function(type) { + if (this.type === type) { + this.next(); + return true + } else { + return false + } + }; + + // Tests whether parsed token is a contextual keyword. + + pp$9.isContextual = function(name) { + return this.type === types$1.name && this.value === name && !this.containsEsc + }; + + // Consumes contextual keyword if possible. + + pp$9.eatContextual = function(name) { + if (!this.isContextual(name)) { return false } + this.next(); + return true + }; + + // Asserts that following token is given contextual keyword. + + pp$9.expectContextual = function(name) { + if (!this.eatContextual(name)) { this.unexpected(); } + }; + + // Test whether a semicolon can be inserted at the current position. + + pp$9.canInsertSemicolon = function() { + return this.type === types$1.eof || + this.type === types$1.braceR || + lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) + }; + + pp$9.insertSemicolon = function() { + if (this.canInsertSemicolon()) { + if (this.options.onInsertedSemicolon) + { this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc); } + return true + } + }; + + // Consume a semicolon, or, failing that, see if we are allowed to + // pretend that there is a semicolon at this position. + + pp$9.semicolon = function() { + if (!this.eat(types$1.semi) && !this.insertSemicolon()) { this.unexpected(); } + }; + + pp$9.afterTrailingComma = function(tokType, notNext) { + if (this.type === tokType) { + if (this.options.onTrailingComma) + { this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc); } + if (!notNext) + { this.next(); } + return true + } + }; + + // Expect a token of a given type. If found, consume it, otherwise, + // raise an unexpected token error. + + pp$9.expect = function(type) { + this.eat(type) || this.unexpected(); + }; + + // Raise an unexpected token error. + + pp$9.unexpected = function(pos) { + this.raise(pos != null ? pos : this.start, "Unexpected token"); + }; + + var DestructuringErrors = function DestructuringErrors() { + this.shorthandAssign = + this.trailingComma = + this.parenthesizedAssign = + this.parenthesizedBind = + this.doubleProto = + -1; + }; + + pp$9.checkPatternErrors = function(refDestructuringErrors, isAssign) { + if (!refDestructuringErrors) { return } + if (refDestructuringErrors.trailingComma > -1) + { this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element"); } + var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind; + if (parens > -1) { this.raiseRecoverable(parens, isAssign ? "Assigning to rvalue" : "Parenthesized pattern"); } + }; + + pp$9.checkExpressionErrors = function(refDestructuringErrors, andThrow) { + if (!refDestructuringErrors) { return false } + var shorthandAssign = refDestructuringErrors.shorthandAssign; + var doubleProto = refDestructuringErrors.doubleProto; + if (!andThrow) { return shorthandAssign >= 0 || doubleProto >= 0 } + if (shorthandAssign >= 0) + { this.raise(shorthandAssign, "Shorthand property assignments are valid only in destructuring patterns"); } + if (doubleProto >= 0) + { this.raiseRecoverable(doubleProto, "Redefinition of __proto__ property"); } + }; + + pp$9.checkYieldAwaitInDefaultParams = function() { + if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos)) + { this.raise(this.yieldPos, "Yield expression cannot be a default value"); } + if (this.awaitPos) + { this.raise(this.awaitPos, "Await expression cannot be a default value"); } + }; + + pp$9.isSimpleAssignTarget = function(expr) { + if (expr.type === "ParenthesizedExpression") + { return this.isSimpleAssignTarget(expr.expression) } + return expr.type === "Identifier" || expr.type === "MemberExpression" + }; + + var pp$8 = Parser.prototype; + + // ### Statement parsing + + // Parse a program. Initializes the parser, reads any number of + // statements, and wraps them in a Program node. Optionally takes a + // `program` argument. If present, the statements will be appended + // to its body instead of creating a new node. + + pp$8.parseTopLevel = function(node) { + var exports = Object.create(null); + if (!node.body) { node.body = []; } + while (this.type !== types$1.eof) { + var stmt = this.parseStatement(null, true, exports); + node.body.push(stmt); + } + if (this.inModule) + { for (var i = 0, list = Object.keys(this.undefinedExports); i < list.length; i += 1) + { + var name = list[i]; + + this.raiseRecoverable(this.undefinedExports[name].start, ("Export '" + name + "' is not defined")); + } } + this.adaptDirectivePrologue(node.body); + this.next(); + node.sourceType = this.options.sourceType; + return this.finishNode(node, "Program") + }; + + var loopLabel = {kind: "loop"}, switchLabel = {kind: "switch"}; + + pp$8.isLet = function(context) { + if (this.options.ecmaVersion < 6 || !this.isContextual("let")) { return false } + skipWhiteSpace.lastIndex = this.pos; + var skip = skipWhiteSpace.exec(this.input); + var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next); + // For ambiguous cases, determine if a LexicalDeclaration (or only a + // Statement) is allowed here. If context is not empty then only a Statement + // is allowed. However, `let [` is an explicit negative lookahead for + // ExpressionStatement, so special-case it first. + if (nextCh === 91 || nextCh === 92) { return true } // '[', '\' + if (context) { return false } + + if (nextCh === 123 || nextCh > 0xd7ff && nextCh < 0xdc00) { return true } // '{', astral + if (isIdentifierStart(nextCh, true)) { + var pos = next + 1; + while (isIdentifierChar(nextCh = this.input.charCodeAt(pos), true)) { ++pos; } + if (nextCh === 92 || nextCh > 0xd7ff && nextCh < 0xdc00) { return true } + var ident = this.input.slice(next, pos); + if (!keywordRelationalOperator.test(ident)) { return true } + } + return false + }; + + // check 'async [no LineTerminator here] function' + // - 'async /*foo*/ function' is OK. + // - 'async /*\n*/ function' is invalid. + pp$8.isAsyncFunction = function() { + if (this.options.ecmaVersion < 8 || !this.isContextual("async")) + { return false } + + skipWhiteSpace.lastIndex = this.pos; + var skip = skipWhiteSpace.exec(this.input); + var next = this.pos + skip[0].length, after; + return !lineBreak.test(this.input.slice(this.pos, next)) && + this.input.slice(next, next + 8) === "function" && + (next + 8 === this.input.length || + !(isIdentifierChar(after = this.input.charCodeAt(next + 8)) || after > 0xd7ff && after < 0xdc00)) + }; + + // Parse a single statement. + // + // If expecting a statement and finding a slash operator, parse a + // regular expression literal. This is to handle cases like + // `if (foo) /blah/.exec(foo)`, where looking at the previous token + // does not help. + + pp$8.parseStatement = function(context, topLevel, exports) { + var starttype = this.type, node = this.startNode(), kind; + + if (this.isLet(context)) { + starttype = types$1._var; + kind = "let"; + } + + // Most types of statements are recognized by the keyword they + // start with. Many are trivial to parse, some require a bit of + // complexity. + + switch (starttype) { + case types$1._break: case types$1._continue: return this.parseBreakContinueStatement(node, starttype.keyword) + case types$1._debugger: return this.parseDebuggerStatement(node) + case types$1._do: return this.parseDoStatement(node) + case types$1._for: return this.parseForStatement(node) + case types$1._function: + // Function as sole body of either an if statement or a labeled statement + // works, but not when it is part of a labeled statement that is the sole + // body of an if statement. + if ((context && (this.strict || context !== "if" && context !== "label")) && this.options.ecmaVersion >= 6) { this.unexpected(); } + return this.parseFunctionStatement(node, false, !context) + case types$1._class: + if (context) { this.unexpected(); } + return this.parseClass(node, true) + case types$1._if: return this.parseIfStatement(node) + case types$1._return: return this.parseReturnStatement(node) + case types$1._switch: return this.parseSwitchStatement(node) + case types$1._throw: return this.parseThrowStatement(node) + case types$1._try: return this.parseTryStatement(node) + case types$1._const: case types$1._var: + kind = kind || this.value; + if (context && kind !== "var") { this.unexpected(); } + return this.parseVarStatement(node, kind) + case types$1._while: return this.parseWhileStatement(node) + case types$1._with: return this.parseWithStatement(node) + case types$1.braceL: return this.parseBlock(true, node) + case types$1.semi: return this.parseEmptyStatement(node) + case types$1._export: + case types$1._import: + if (this.options.ecmaVersion > 10 && starttype === types$1._import) { + skipWhiteSpace.lastIndex = this.pos; + var skip = skipWhiteSpace.exec(this.input); + var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next); + if (nextCh === 40 || nextCh === 46) // '(' or '.' + { return this.parseExpressionStatement(node, this.parseExpression()) } + } + + if (!this.options.allowImportExportEverywhere) { + if (!topLevel) + { this.raise(this.start, "'import' and 'export' may only appear at the top level"); } + if (!this.inModule) + { this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'"); } + } + return starttype === types$1._import ? this.parseImport(node) : this.parseExport(node, exports) + + // If the statement does not start with a statement keyword or a + // brace, it's an ExpressionStatement or LabeledStatement. We + // simply start parsing an expression, and afterwards, if the + // next token is a colon and the expression was a simple + // Identifier node, we switch to interpreting it as a label. + default: + if (this.isAsyncFunction()) { + if (context) { this.unexpected(); } + this.next(); + return this.parseFunctionStatement(node, true, !context) + } + + var maybeName = this.value, expr = this.parseExpression(); + if (starttype === types$1.name && expr.type === "Identifier" && this.eat(types$1.colon)) + { return this.parseLabeledStatement(node, maybeName, expr, context) } + else { return this.parseExpressionStatement(node, expr) } + } + }; + + pp$8.parseBreakContinueStatement = function(node, keyword) { + var isBreak = keyword === "break"; + this.next(); + if (this.eat(types$1.semi) || this.insertSemicolon()) { node.label = null; } + else if (this.type !== types$1.name) { this.unexpected(); } + else { + node.label = this.parseIdent(); + this.semicolon(); + } + + // Verify that there is an actual destination to break or + // continue to. + var i = 0; + for (; i < this.labels.length; ++i) { + var lab = this.labels[i]; + if (node.label == null || lab.name === node.label.name) { + if (lab.kind != null && (isBreak || lab.kind === "loop")) { break } + if (node.label && isBreak) { break } + } + } + if (i === this.labels.length) { this.raise(node.start, "Unsyntactic " + keyword); } + return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement") + }; + + pp$8.parseDebuggerStatement = function(node) { + this.next(); + this.semicolon(); + return this.finishNode(node, "DebuggerStatement") + }; + + pp$8.parseDoStatement = function(node) { + this.next(); + this.labels.push(loopLabel); + node.body = this.parseStatement("do"); + this.labels.pop(); + this.expect(types$1._while); + node.test = this.parseParenExpression(); + if (this.options.ecmaVersion >= 6) + { this.eat(types$1.semi); } + else + { this.semicolon(); } + return this.finishNode(node, "DoWhileStatement") + }; + + // Disambiguating between a `for` and a `for`/`in` or `for`/`of` + // loop is non-trivial. Basically, we have to parse the init `var` + // statement or expression, disallowing the `in` operator (see + // the second parameter to `parseExpression`), and then check + // whether the next token is `in` or `of`. When there is no init + // part (semicolon immediately after the opening parenthesis), it + // is a regular `for` loop. + + pp$8.parseForStatement = function(node) { + this.next(); + var awaitAt = (this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await")) ? this.lastTokStart : -1; + this.labels.push(loopLabel); + this.enterScope(0); + this.expect(types$1.parenL); + if (this.type === types$1.semi) { + if (awaitAt > -1) { this.unexpected(awaitAt); } + return this.parseFor(node, null) + } + var isLet = this.isLet(); + if (this.type === types$1._var || this.type === types$1._const || isLet) { + var init$1 = this.startNode(), kind = isLet ? "let" : this.value; + this.next(); + this.parseVar(init$1, true, kind); + this.finishNode(init$1, "VariableDeclaration"); + if ((this.type === types$1._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) && init$1.declarations.length === 1) { + if (this.options.ecmaVersion >= 9) { + if (this.type === types$1._in) { + if (awaitAt > -1) { this.unexpected(awaitAt); } + } else { node.await = awaitAt > -1; } + } + return this.parseForIn(node, init$1) + } + if (awaitAt > -1) { this.unexpected(awaitAt); } + return this.parseFor(node, init$1) + } + var startsWithLet = this.isContextual("let"), isForOf = false; + var containsEsc = this.containsEsc; + var refDestructuringErrors = new DestructuringErrors; + var initPos = this.start; + var init = awaitAt > -1 + ? this.parseExprSubscripts(refDestructuringErrors, "await") + : this.parseExpression(true, refDestructuringErrors); + if (this.type === types$1._in || (isForOf = this.options.ecmaVersion >= 6 && this.isContextual("of"))) { + if (awaitAt > -1) { // implies `ecmaVersion >= 9` (see declaration of awaitAt) + if (this.type === types$1._in) { this.unexpected(awaitAt); } + node.await = true; + } else if (isForOf && this.options.ecmaVersion >= 8) { + if (init.start === initPos && !containsEsc && init.type === "Identifier" && init.name === "async") { this.unexpected(); } + else if (this.options.ecmaVersion >= 9) { node.await = false; } + } + if (startsWithLet && isForOf) { this.raise(init.start, "The left-hand side of a for-of loop may not start with 'let'."); } + this.toAssignable(init, false, refDestructuringErrors); + this.checkLValPattern(init); + return this.parseForIn(node, init) + } else { + this.checkExpressionErrors(refDestructuringErrors, true); + } + if (awaitAt > -1) { this.unexpected(awaitAt); } + return this.parseFor(node, init) + }; + + pp$8.parseFunctionStatement = function(node, isAsync, declarationPosition) { + this.next(); + return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), false, isAsync) + }; + + pp$8.parseIfStatement = function(node) { + this.next(); + node.test = this.parseParenExpression(); + // allow function declarations in branches, but only in non-strict mode + node.consequent = this.parseStatement("if"); + node.alternate = this.eat(types$1._else) ? this.parseStatement("if") : null; + return this.finishNode(node, "IfStatement") + }; + + pp$8.parseReturnStatement = function(node) { + if (!this.inFunction && !this.options.allowReturnOutsideFunction) + { this.raise(this.start, "'return' outside of function"); } + this.next(); + + // In `return` (and `break`/`continue`), the keywords with + // optional arguments, we eagerly look for a semicolon or the + // possibility to insert one. + + if (this.eat(types$1.semi) || this.insertSemicolon()) { node.argument = null; } + else { node.argument = this.parseExpression(); this.semicolon(); } + return this.finishNode(node, "ReturnStatement") + }; + + pp$8.parseSwitchStatement = function(node) { + this.next(); + node.discriminant = this.parseParenExpression(); + node.cases = []; + this.expect(types$1.braceL); + this.labels.push(switchLabel); + this.enterScope(0); + + // Statements under must be grouped (by label) in SwitchCase + // nodes. `cur` is used to keep the node that we are currently + // adding statements to. + + var cur; + for (var sawDefault = false; this.type !== types$1.braceR;) { + if (this.type === types$1._case || this.type === types$1._default) { + var isCase = this.type === types$1._case; + if (cur) { this.finishNode(cur, "SwitchCase"); } + node.cases.push(cur = this.startNode()); + cur.consequent = []; + this.next(); + if (isCase) { + cur.test = this.parseExpression(); + } else { + if (sawDefault) { this.raiseRecoverable(this.lastTokStart, "Multiple default clauses"); } + sawDefault = true; + cur.test = null; + } + this.expect(types$1.colon); + } else { + if (!cur) { this.unexpected(); } + cur.consequent.push(this.parseStatement(null)); + } + } + this.exitScope(); + if (cur) { this.finishNode(cur, "SwitchCase"); } + this.next(); // Closing brace + this.labels.pop(); + return this.finishNode(node, "SwitchStatement") + }; + + pp$8.parseThrowStatement = function(node) { + this.next(); + if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) + { this.raise(this.lastTokEnd, "Illegal newline after throw"); } + node.argument = this.parseExpression(); + this.semicolon(); + return this.finishNode(node, "ThrowStatement") + }; + + // Reused empty array added for node fields that are always empty. + + var empty$1 = []; + + pp$8.parseCatchClauseParam = function() { + var param = this.parseBindingAtom(); + var simple = param.type === "Identifier"; + this.enterScope(simple ? SCOPE_SIMPLE_CATCH : 0); + this.checkLValPattern(param, simple ? BIND_SIMPLE_CATCH : BIND_LEXICAL); + this.expect(types$1.parenR); + + return param + }; + + pp$8.parseTryStatement = function(node) { + this.next(); + node.block = this.parseBlock(); + node.handler = null; + if (this.type === types$1._catch) { + var clause = this.startNode(); + this.next(); + if (this.eat(types$1.parenL)) { + clause.param = this.parseCatchClauseParam(); + } else { + if (this.options.ecmaVersion < 10) { this.unexpected(); } + clause.param = null; + this.enterScope(0); + } + clause.body = this.parseBlock(false); + this.exitScope(); + node.handler = this.finishNode(clause, "CatchClause"); + } + node.finalizer = this.eat(types$1._finally) ? this.parseBlock() : null; + if (!node.handler && !node.finalizer) + { this.raise(node.start, "Missing catch or finally clause"); } + return this.finishNode(node, "TryStatement") + }; + + pp$8.parseVarStatement = function(node, kind, allowMissingInitializer) { + this.next(); + this.parseVar(node, false, kind, allowMissingInitializer); + this.semicolon(); + return this.finishNode(node, "VariableDeclaration") + }; + + pp$8.parseWhileStatement = function(node) { + this.next(); + node.test = this.parseParenExpression(); + this.labels.push(loopLabel); + node.body = this.parseStatement("while"); + this.labels.pop(); + return this.finishNode(node, "WhileStatement") + }; + + pp$8.parseWithStatement = function(node) { + if (this.strict) { this.raise(this.start, "'with' in strict mode"); } + this.next(); + node.object = this.parseParenExpression(); + node.body = this.parseStatement("with"); + return this.finishNode(node, "WithStatement") + }; + + pp$8.parseEmptyStatement = function(node) { + this.next(); + return this.finishNode(node, "EmptyStatement") + }; + + pp$8.parseLabeledStatement = function(node, maybeName, expr, context) { + for (var i$1 = 0, list = this.labels; i$1 < list.length; i$1 += 1) + { + var label = list[i$1]; + + if (label.name === maybeName) + { this.raise(expr.start, "Label '" + maybeName + "' is already declared"); + } } + var kind = this.type.isLoop ? "loop" : this.type === types$1._switch ? "switch" : null; + for (var i = this.labels.length - 1; i >= 0; i--) { + var label$1 = this.labels[i]; + if (label$1.statementStart === node.start) { + // Update information about previous labels on this node + label$1.statementStart = this.start; + label$1.kind = kind; + } else { break } + } + this.labels.push({name: maybeName, kind: kind, statementStart: this.start}); + node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label"); + this.labels.pop(); + node.label = expr; + return this.finishNode(node, "LabeledStatement") + }; + + pp$8.parseExpressionStatement = function(node, expr) { + node.expression = expr; + this.semicolon(); + return this.finishNode(node, "ExpressionStatement") + }; + + // Parse a semicolon-enclosed block of statements, handling `"use + // strict"` declarations when `allowStrict` is true (used for + // function bodies). + + pp$8.parseBlock = function(createNewLexicalScope, node, exitStrict) { + if ( createNewLexicalScope === void 0 ) createNewLexicalScope = true; + if ( node === void 0 ) node = this.startNode(); + + node.body = []; + this.expect(types$1.braceL); + if (createNewLexicalScope) { this.enterScope(0); } + while (this.type !== types$1.braceR) { + var stmt = this.parseStatement(null); + node.body.push(stmt); + } + if (exitStrict) { this.strict = false; } + this.next(); + if (createNewLexicalScope) { this.exitScope(); } + return this.finishNode(node, "BlockStatement") + }; + + // Parse a regular `for` loop. The disambiguation code in + // `parseStatement` will already have parsed the init statement or + // expression. + + pp$8.parseFor = function(node, init) { + node.init = init; + this.expect(types$1.semi); + node.test = this.type === types$1.semi ? null : this.parseExpression(); + this.expect(types$1.semi); + node.update = this.type === types$1.parenR ? null : this.parseExpression(); + this.expect(types$1.parenR); + node.body = this.parseStatement("for"); + this.exitScope(); + this.labels.pop(); + return this.finishNode(node, "ForStatement") + }; + + // Parse a `for`/`in` and `for`/`of` loop, which are almost + // same from parser's perspective. + + pp$8.parseForIn = function(node, init) { + var isForIn = this.type === types$1._in; + this.next(); + + if ( + init.type === "VariableDeclaration" && + init.declarations[0].init != null && + ( + !isForIn || + this.options.ecmaVersion < 8 || + this.strict || + init.kind !== "var" || + init.declarations[0].id.type !== "Identifier" + ) + ) { + this.raise( + init.start, + ((isForIn ? "for-in" : "for-of") + " loop variable declaration may not have an initializer") + ); + } + node.left = init; + node.right = isForIn ? this.parseExpression() : this.parseMaybeAssign(); + this.expect(types$1.parenR); + node.body = this.parseStatement("for"); + this.exitScope(); + this.labels.pop(); + return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement") + }; + + // Parse a list of variable declarations. + + pp$8.parseVar = function(node, isFor, kind, allowMissingInitializer) { + node.declarations = []; + node.kind = kind; + for (;;) { + var decl = this.startNode(); + this.parseVarId(decl, kind); + if (this.eat(types$1.eq)) { + decl.init = this.parseMaybeAssign(isFor); + } else if (!allowMissingInitializer && kind === "const" && !(this.type === types$1._in || (this.options.ecmaVersion >= 6 && this.isContextual("of")))) { + this.unexpected(); + } else if (!allowMissingInitializer && decl.id.type !== "Identifier" && !(isFor && (this.type === types$1._in || this.isContextual("of")))) { + this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value"); + } else { + decl.init = null; + } + node.declarations.push(this.finishNode(decl, "VariableDeclarator")); + if (!this.eat(types$1.comma)) { break } + } + return node + }; + + pp$8.parseVarId = function(decl, kind) { + decl.id = this.parseBindingAtom(); + this.checkLValPattern(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, false); + }; + + var FUNC_STATEMENT = 1, FUNC_HANGING_STATEMENT = 2, FUNC_NULLABLE_ID = 4; + + // Parse a function declaration or literal (depending on the + // `statement & FUNC_STATEMENT`). + + // Remove `allowExpressionBody` for 7.0.0, as it is only called with false + pp$8.parseFunction = function(node, statement, allowExpressionBody, isAsync, forInit) { + this.initFunction(node); + if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) { + if (this.type === types$1.star && (statement & FUNC_HANGING_STATEMENT)) + { this.unexpected(); } + node.generator = this.eat(types$1.star); + } + if (this.options.ecmaVersion >= 8) + { node.async = !!isAsync; } + + if (statement & FUNC_STATEMENT) { + node.id = (statement & FUNC_NULLABLE_ID) && this.type !== types$1.name ? null : this.parseIdent(); + if (node.id && !(statement & FUNC_HANGING_STATEMENT)) + // If it is a regular function declaration in sloppy mode, then it is + // subject to Annex B semantics (BIND_FUNCTION). Otherwise, the binding + // mode depends on properties of the current scope (see + // treatFunctionsAsVar). + { this.checkLValSimple(node.id, (this.strict || node.generator || node.async) ? this.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION); } + } + + var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + this.enterScope(functionFlags(node.async, node.generator)); + + if (!(statement & FUNC_STATEMENT)) + { node.id = this.type === types$1.name ? this.parseIdent() : null; } + + this.parseFunctionParams(node); + this.parseFunctionBody(node, allowExpressionBody, false, forInit); + + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.finishNode(node, (statement & FUNC_STATEMENT) ? "FunctionDeclaration" : "FunctionExpression") + }; + + pp$8.parseFunctionParams = function(node) { + this.expect(types$1.parenL); + node.params = this.parseBindingList(types$1.parenR, false, this.options.ecmaVersion >= 8); + this.checkYieldAwaitInDefaultParams(); + }; + + // Parse a class declaration or literal (depending on the + // `isStatement` parameter). + + pp$8.parseClass = function(node, isStatement) { + this.next(); + + // ecma-262 14.6 Class Definitions + // A class definition is always strict mode code. + var oldStrict = this.strict; + this.strict = true; + + this.parseClassId(node, isStatement); + this.parseClassSuper(node); + var privateNameMap = this.enterClassBody(); + var classBody = this.startNode(); + var hadConstructor = false; + classBody.body = []; + this.expect(types$1.braceL); + while (this.type !== types$1.braceR) { + var element = this.parseClassElement(node.superClass !== null); + if (element) { + classBody.body.push(element); + if (element.type === "MethodDefinition" && element.kind === "constructor") { + if (hadConstructor) { this.raiseRecoverable(element.start, "Duplicate constructor in the same class"); } + hadConstructor = true; + } else if (element.key && element.key.type === "PrivateIdentifier" && isPrivateNameConflicted(privateNameMap, element)) { + this.raiseRecoverable(element.key.start, ("Identifier '#" + (element.key.name) + "' has already been declared")); + } + } + } + this.strict = oldStrict; + this.next(); + node.body = this.finishNode(classBody, "ClassBody"); + this.exitClassBody(); + return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression") + }; + + pp$8.parseClassElement = function(constructorAllowsSuper) { + if (this.eat(types$1.semi)) { return null } + + var ecmaVersion = this.options.ecmaVersion; + var node = this.startNode(); + var keyName = ""; + var isGenerator = false; + var isAsync = false; + var kind = "method"; + var isStatic = false; + + if (this.eatContextual("static")) { + // Parse static init block + if (ecmaVersion >= 13 && this.eat(types$1.braceL)) { + this.parseClassStaticBlock(node); + return node + } + if (this.isClassElementNameStart() || this.type === types$1.star) { + isStatic = true; + } else { + keyName = "static"; + } + } + node.static = isStatic; + if (!keyName && ecmaVersion >= 8 && this.eatContextual("async")) { + if ((this.isClassElementNameStart() || this.type === types$1.star) && !this.canInsertSemicolon()) { + isAsync = true; + } else { + keyName = "async"; + } + } + if (!keyName && (ecmaVersion >= 9 || !isAsync) && this.eat(types$1.star)) { + isGenerator = true; + } + if (!keyName && !isAsync && !isGenerator) { + var lastValue = this.value; + if (this.eatContextual("get") || this.eatContextual("set")) { + if (this.isClassElementNameStart()) { + kind = lastValue; + } else { + keyName = lastValue; + } + } + } + + // Parse element name + if (keyName) { + // 'async', 'get', 'set', or 'static' were not a keyword contextually. + // The last token is any of those. Make it the element name. + node.computed = false; + node.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc); + node.key.name = keyName; + this.finishNode(node.key, "Identifier"); + } else { + this.parseClassElementName(node); + } + + // Parse element value + if (ecmaVersion < 13 || this.type === types$1.parenL || kind !== "method" || isGenerator || isAsync) { + var isConstructor = !node.static && checkKeyName(node, "constructor"); + var allowsDirectSuper = isConstructor && constructorAllowsSuper; + // Couldn't move this check into the 'parseClassMethod' method for backward compatibility. + if (isConstructor && kind !== "method") { this.raise(node.key.start, "Constructor can't have get/set modifier"); } + node.kind = isConstructor ? "constructor" : kind; + this.parseClassMethod(node, isGenerator, isAsync, allowsDirectSuper); + } else { + this.parseClassField(node); + } + + return node + }; + + pp$8.isClassElementNameStart = function() { + return ( + this.type === types$1.name || + this.type === types$1.privateId || + this.type === types$1.num || + this.type === types$1.string || + this.type === types$1.bracketL || + this.type.keyword + ) + }; + + pp$8.parseClassElementName = function(element) { + if (this.type === types$1.privateId) { + if (this.value === "constructor") { + this.raise(this.start, "Classes can't have an element named '#constructor'"); + } + element.computed = false; + element.key = this.parsePrivateIdent(); + } else { + this.parsePropertyName(element); + } + }; + + pp$8.parseClassMethod = function(method, isGenerator, isAsync, allowsDirectSuper) { + // Check key and flags + var key = method.key; + if (method.kind === "constructor") { + if (isGenerator) { this.raise(key.start, "Constructor can't be a generator"); } + if (isAsync) { this.raise(key.start, "Constructor can't be an async method"); } + } else if (method.static && checkKeyName(method, "prototype")) { + this.raise(key.start, "Classes may not have a static property named prototype"); + } + + // Parse value + var value = method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper); + + // Check value + if (method.kind === "get" && value.params.length !== 0) + { this.raiseRecoverable(value.start, "getter should have no params"); } + if (method.kind === "set" && value.params.length !== 1) + { this.raiseRecoverable(value.start, "setter should have exactly one param"); } + if (method.kind === "set" && value.params[0].type === "RestElement") + { this.raiseRecoverable(value.params[0].start, "Setter cannot use rest params"); } + + return this.finishNode(method, "MethodDefinition") + }; + + pp$8.parseClassField = function(field) { + if (checkKeyName(field, "constructor")) { + this.raise(field.key.start, "Classes can't have a field named 'constructor'"); + } else if (field.static && checkKeyName(field, "prototype")) { + this.raise(field.key.start, "Classes can't have a static field named 'prototype'"); + } + + if (this.eat(types$1.eq)) { + // To raise SyntaxError if 'arguments' exists in the initializer. + var scope = this.currentThisScope(); + var inClassFieldInit = scope.inClassFieldInit; + scope.inClassFieldInit = true; + field.value = this.parseMaybeAssign(); + scope.inClassFieldInit = inClassFieldInit; + } else { + field.value = null; + } + this.semicolon(); + + return this.finishNode(field, "PropertyDefinition") + }; + + pp$8.parseClassStaticBlock = function(node) { + node.body = []; + + var oldLabels = this.labels; + this.labels = []; + this.enterScope(SCOPE_CLASS_STATIC_BLOCK | SCOPE_SUPER); + while (this.type !== types$1.braceR) { + var stmt = this.parseStatement(null); + node.body.push(stmt); + } + this.next(); + this.exitScope(); + this.labels = oldLabels; + + return this.finishNode(node, "StaticBlock") + }; + + pp$8.parseClassId = function(node, isStatement) { + if (this.type === types$1.name) { + node.id = this.parseIdent(); + if (isStatement) + { this.checkLValSimple(node.id, BIND_LEXICAL, false); } + } else { + if (isStatement === true) + { this.unexpected(); } + node.id = null; + } + }; + + pp$8.parseClassSuper = function(node) { + node.superClass = this.eat(types$1._extends) ? this.parseExprSubscripts(null, false) : null; + }; + + pp$8.enterClassBody = function() { + var element = {declared: Object.create(null), used: []}; + this.privateNameStack.push(element); + return element.declared + }; + + pp$8.exitClassBody = function() { + var ref = this.privateNameStack.pop(); + var declared = ref.declared; + var used = ref.used; + if (!this.options.checkPrivateFields) { return } + var len = this.privateNameStack.length; + var parent = len === 0 ? null : this.privateNameStack[len - 1]; + for (var i = 0; i < used.length; ++i) { + var id = used[i]; + if (!hasOwn(declared, id.name)) { + if (parent) { + parent.used.push(id); + } else { + this.raiseRecoverable(id.start, ("Private field '#" + (id.name) + "' must be declared in an enclosing class")); + } + } + } + }; + + function isPrivateNameConflicted(privateNameMap, element) { + var name = element.key.name; + var curr = privateNameMap[name]; + + var next = "true"; + if (element.type === "MethodDefinition" && (element.kind === "get" || element.kind === "set")) { + next = (element.static ? "s" : "i") + element.kind; + } + + // `class { get #a(){}; static set #a(_){} }` is also conflict. + if ( + curr === "iget" && next === "iset" || + curr === "iset" && next === "iget" || + curr === "sget" && next === "sset" || + curr === "sset" && next === "sget" + ) { + privateNameMap[name] = "true"; + return false + } else if (!curr) { + privateNameMap[name] = next; + return false + } else { + return true + } + } + + function checkKeyName(node, name) { + var computed = node.computed; + var key = node.key; + return !computed && ( + key.type === "Identifier" && key.name === name || + key.type === "Literal" && key.value === name + ) + } + + // Parses module export declaration. + + pp$8.parseExportAllDeclaration = function(node, exports) { + if (this.options.ecmaVersion >= 11) { + if (this.eatContextual("as")) { + node.exported = this.parseModuleExportName(); + this.checkExport(exports, node.exported, this.lastTokStart); + } else { + node.exported = null; + } + } + this.expectContextual("from"); + if (this.type !== types$1.string) { this.unexpected(); } + node.source = this.parseExprAtom(); + if (this.options.ecmaVersion >= 16) + { node.attributes = this.parseWithClause(); } + this.semicolon(); + return this.finishNode(node, "ExportAllDeclaration") + }; + + pp$8.parseExport = function(node, exports) { + this.next(); + // export * from '...' + if (this.eat(types$1.star)) { + return this.parseExportAllDeclaration(node, exports) + } + if (this.eat(types$1._default)) { // export default ... + this.checkExport(exports, "default", this.lastTokStart); + node.declaration = this.parseExportDefaultDeclaration(); + return this.finishNode(node, "ExportDefaultDeclaration") + } + // export var|const|let|function|class ... + if (this.shouldParseExportStatement()) { + node.declaration = this.parseExportDeclaration(node); + if (node.declaration.type === "VariableDeclaration") + { this.checkVariableExport(exports, node.declaration.declarations); } + else + { this.checkExport(exports, node.declaration.id, node.declaration.id.start); } + node.specifiers = []; + node.source = null; + } else { // export { x, y as z } [from '...'] + node.declaration = null; + node.specifiers = this.parseExportSpecifiers(exports); + if (this.eatContextual("from")) { + if (this.type !== types$1.string) { this.unexpected(); } + node.source = this.parseExprAtom(); + if (this.options.ecmaVersion >= 16) + { node.attributes = this.parseWithClause(); } + } else { + for (var i = 0, list = node.specifiers; i < list.length; i += 1) { + // check for keywords used as local names + var spec = list[i]; + + this.checkUnreserved(spec.local); + // check if export is defined + this.checkLocalExport(spec.local); + + if (spec.local.type === "Literal") { + this.raise(spec.local.start, "A string literal cannot be used as an exported binding without `from`."); + } + } + + node.source = null; + } + this.semicolon(); + } + return this.finishNode(node, "ExportNamedDeclaration") + }; + + pp$8.parseExportDeclaration = function(node) { + return this.parseStatement(null) + }; + + pp$8.parseExportDefaultDeclaration = function() { + var isAsync; + if (this.type === types$1._function || (isAsync = this.isAsyncFunction())) { + var fNode = this.startNode(); + this.next(); + if (isAsync) { this.next(); } + return this.parseFunction(fNode, FUNC_STATEMENT | FUNC_NULLABLE_ID, false, isAsync) + } else if (this.type === types$1._class) { + var cNode = this.startNode(); + return this.parseClass(cNode, "nullableID") + } else { + var declaration = this.parseMaybeAssign(); + this.semicolon(); + return declaration + } + }; + + pp$8.checkExport = function(exports, name, pos) { + if (!exports) { return } + if (typeof name !== "string") + { name = name.type === "Identifier" ? name.name : name.value; } + if (hasOwn(exports, name)) + { this.raiseRecoverable(pos, "Duplicate export '" + name + "'"); } + exports[name] = true; + }; + + pp$8.checkPatternExport = function(exports, pat) { + var type = pat.type; + if (type === "Identifier") + { this.checkExport(exports, pat, pat.start); } + else if (type === "ObjectPattern") + { for (var i = 0, list = pat.properties; i < list.length; i += 1) + { + var prop = list[i]; + + this.checkPatternExport(exports, prop); + } } + else if (type === "ArrayPattern") + { for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) { + var elt = list$1[i$1]; + + if (elt) { this.checkPatternExport(exports, elt); } + } } + else if (type === "Property") + { this.checkPatternExport(exports, pat.value); } + else if (type === "AssignmentPattern") + { this.checkPatternExport(exports, pat.left); } + else if (type === "RestElement") + { this.checkPatternExport(exports, pat.argument); } + }; + + pp$8.checkVariableExport = function(exports, decls) { + if (!exports) { return } + for (var i = 0, list = decls; i < list.length; i += 1) + { + var decl = list[i]; + + this.checkPatternExport(exports, decl.id); + } + }; + + pp$8.shouldParseExportStatement = function() { + return this.type.keyword === "var" || + this.type.keyword === "const" || + this.type.keyword === "class" || + this.type.keyword === "function" || + this.isLet() || + this.isAsyncFunction() + }; + + // Parses a comma-separated list of module exports. + + pp$8.parseExportSpecifier = function(exports) { + var node = this.startNode(); + node.local = this.parseModuleExportName(); + + node.exported = this.eatContextual("as") ? this.parseModuleExportName() : node.local; + this.checkExport( + exports, + node.exported, + node.exported.start + ); + + return this.finishNode(node, "ExportSpecifier") + }; + + pp$8.parseExportSpecifiers = function(exports) { + var nodes = [], first = true; + // export { x, y as z } [from '...'] + this.expect(types$1.braceL); + while (!this.eat(types$1.braceR)) { + if (!first) { + this.expect(types$1.comma); + if (this.afterTrailingComma(types$1.braceR)) { break } + } else { first = false; } + + nodes.push(this.parseExportSpecifier(exports)); + } + return nodes + }; + + // Parses import declaration. + + pp$8.parseImport = function(node) { + this.next(); + + // import '...' + if (this.type === types$1.string) { + node.specifiers = empty$1; + node.source = this.parseExprAtom(); + } else { + node.specifiers = this.parseImportSpecifiers(); + this.expectContextual("from"); + node.source = this.type === types$1.string ? this.parseExprAtom() : this.unexpected(); + } + if (this.options.ecmaVersion >= 16) + { node.attributes = this.parseWithClause(); } + this.semicolon(); + return this.finishNode(node, "ImportDeclaration") + }; + + // Parses a comma-separated list of module imports. + + pp$8.parseImportSpecifier = function() { + var node = this.startNode(); + node.imported = this.parseModuleExportName(); + + if (this.eatContextual("as")) { + node.local = this.parseIdent(); + } else { + this.checkUnreserved(node.imported); + node.local = node.imported; + } + this.checkLValSimple(node.local, BIND_LEXICAL); + + return this.finishNode(node, "ImportSpecifier") + }; + + pp$8.parseImportDefaultSpecifier = function() { + // import defaultObj, { x, y as z } from '...' + var node = this.startNode(); + node.local = this.parseIdent(); + this.checkLValSimple(node.local, BIND_LEXICAL); + return this.finishNode(node, "ImportDefaultSpecifier") + }; + + pp$8.parseImportNamespaceSpecifier = function() { + var node = this.startNode(); + this.next(); + this.expectContextual("as"); + node.local = this.parseIdent(); + this.checkLValSimple(node.local, BIND_LEXICAL); + return this.finishNode(node, "ImportNamespaceSpecifier") + }; + + pp$8.parseImportSpecifiers = function() { + var nodes = [], first = true; + if (this.type === types$1.name) { + nodes.push(this.parseImportDefaultSpecifier()); + if (!this.eat(types$1.comma)) { return nodes } + } + if (this.type === types$1.star) { + nodes.push(this.parseImportNamespaceSpecifier()); + return nodes + } + this.expect(types$1.braceL); + while (!this.eat(types$1.braceR)) { + if (!first) { + this.expect(types$1.comma); + if (this.afterTrailingComma(types$1.braceR)) { break } + } else { first = false; } + + nodes.push(this.parseImportSpecifier()); + } + return nodes + }; + + pp$8.parseWithClause = function() { + var nodes = []; + if (!this.eat(types$1._with)) { + return nodes + } + this.expect(types$1.braceL); + var attributeKeys = {}; + var first = true; + while (!this.eat(types$1.braceR)) { + if (!first) { + this.expect(types$1.comma); + if (this.afterTrailingComma(types$1.braceR)) { break } + } else { first = false; } + + var attr = this.parseImportAttribute(); + var keyName = attr.key.type === "Identifier" ? attr.key.name : attr.key.value; + if (hasOwn(attributeKeys, keyName)) + { this.raiseRecoverable(attr.key.start, "Duplicate attribute key '" + keyName + "'"); } + attributeKeys[keyName] = true; + nodes.push(attr); + } + return nodes + }; + + pp$8.parseImportAttribute = function() { + var node = this.startNode(); + node.key = this.type === types$1.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never"); + this.expect(types$1.colon); + if (this.type !== types$1.string) { + this.unexpected(); + } + node.value = this.parseExprAtom(); + return this.finishNode(node, "ImportAttribute") + }; + + pp$8.parseModuleExportName = function() { + if (this.options.ecmaVersion >= 13 && this.type === types$1.string) { + var stringLiteral = this.parseLiteral(this.value); + if (loneSurrogate.test(stringLiteral.value)) { + this.raise(stringLiteral.start, "An export name cannot include a lone surrogate."); + } + return stringLiteral + } + return this.parseIdent(true) + }; + + // Set `ExpressionStatement#directive` property for directive prologues. + pp$8.adaptDirectivePrologue = function(statements) { + for (var i = 0; i < statements.length && this.isDirectiveCandidate(statements[i]); ++i) { + statements[i].directive = statements[i].expression.raw.slice(1, -1); + } + }; + pp$8.isDirectiveCandidate = function(statement) { + return ( + this.options.ecmaVersion >= 5 && + statement.type === "ExpressionStatement" && + statement.expression.type === "Literal" && + typeof statement.expression.value === "string" && + // Reject parenthesized strings. + (this.input[statement.start] === "\"" || this.input[statement.start] === "'") + ) + }; + + var pp$7 = Parser.prototype; + + // Convert existing expression atom to assignable pattern + // if possible. + + pp$7.toAssignable = function(node, isBinding, refDestructuringErrors) { + if (this.options.ecmaVersion >= 6 && node) { + switch (node.type) { + case "Identifier": + if (this.inAsync && node.name === "await") + { this.raise(node.start, "Cannot use 'await' as identifier inside an async function"); } + break + + case "ObjectPattern": + case "ArrayPattern": + case "AssignmentPattern": + case "RestElement": + break + + case "ObjectExpression": + node.type = "ObjectPattern"; + if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } + for (var i = 0, list = node.properties; i < list.length; i += 1) { + var prop = list[i]; + + this.toAssignable(prop, isBinding); + // Early error: + // AssignmentRestProperty[Yield, Await] : + // `...` DestructuringAssignmentTarget[Yield, Await] + // + // It is a Syntax Error if |DestructuringAssignmentTarget| is an |ArrayLiteral| or an |ObjectLiteral|. + if ( + prop.type === "RestElement" && + (prop.argument.type === "ArrayPattern" || prop.argument.type === "ObjectPattern") + ) { + this.raise(prop.argument.start, "Unexpected token"); + } + } + break + + case "Property": + // AssignmentProperty has type === "Property" + if (node.kind !== "init") { this.raise(node.key.start, "Object pattern can't contain getter or setter"); } + this.toAssignable(node.value, isBinding); + break + + case "ArrayExpression": + node.type = "ArrayPattern"; + if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } + this.toAssignableList(node.elements, isBinding); + break + + case "SpreadElement": + node.type = "RestElement"; + this.toAssignable(node.argument, isBinding); + if (node.argument.type === "AssignmentPattern") + { this.raise(node.argument.start, "Rest elements cannot have a default value"); } + break + + case "AssignmentExpression": + if (node.operator !== "=") { this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); } + node.type = "AssignmentPattern"; + delete node.operator; + this.toAssignable(node.left, isBinding); + break + + case "ParenthesizedExpression": + this.toAssignable(node.expression, isBinding, refDestructuringErrors); + break + + case "ChainExpression": + this.raiseRecoverable(node.start, "Optional chaining cannot appear in left-hand side"); + break + + case "MemberExpression": + if (!isBinding) { break } + + default: + this.raise(node.start, "Assigning to rvalue"); + } + } else if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } + return node + }; + + // Convert list of expression atoms to binding list. + + pp$7.toAssignableList = function(exprList, isBinding) { + var end = exprList.length; + for (var i = 0; i < end; i++) { + var elt = exprList[i]; + if (elt) { this.toAssignable(elt, isBinding); } + } + if (end) { + var last = exprList[end - 1]; + if (this.options.ecmaVersion === 6 && isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier") + { this.unexpected(last.argument.start); } + } + return exprList + }; + + // Parses spread element. + + pp$7.parseSpread = function(refDestructuringErrors) { + var node = this.startNode(); + this.next(); + node.argument = this.parseMaybeAssign(false, refDestructuringErrors); + return this.finishNode(node, "SpreadElement") + }; + + pp$7.parseRestBinding = function() { + var node = this.startNode(); + this.next(); + + // RestElement inside of a function parameter must be an identifier + if (this.options.ecmaVersion === 6 && this.type !== types$1.name) + { this.unexpected(); } + + node.argument = this.parseBindingAtom(); + + return this.finishNode(node, "RestElement") + }; + + // Parses lvalue (assignable) atom. + + pp$7.parseBindingAtom = function() { + if (this.options.ecmaVersion >= 6) { + switch (this.type) { + case types$1.bracketL: + var node = this.startNode(); + this.next(); + node.elements = this.parseBindingList(types$1.bracketR, true, true); + return this.finishNode(node, "ArrayPattern") + + case types$1.braceL: + return this.parseObj(true) + } + } + return this.parseIdent() + }; + + pp$7.parseBindingList = function(close, allowEmpty, allowTrailingComma, allowModifiers) { + var elts = [], first = true; + while (!this.eat(close)) { + if (first) { first = false; } + else { this.expect(types$1.comma); } + if (allowEmpty && this.type === types$1.comma) { + elts.push(null); + } else if (allowTrailingComma && this.afterTrailingComma(close)) { + break + } else if (this.type === types$1.ellipsis) { + var rest = this.parseRestBinding(); + this.parseBindingListItem(rest); + elts.push(rest); + if (this.type === types$1.comma) { this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"); } + this.expect(close); + break + } else { + elts.push(this.parseAssignableListItem(allowModifiers)); + } + } + return elts + }; + + pp$7.parseAssignableListItem = function(allowModifiers) { + var elem = this.parseMaybeDefault(this.start, this.startLoc); + this.parseBindingListItem(elem); + return elem + }; + + pp$7.parseBindingListItem = function(param) { + return param + }; + + // Parses assignment pattern around given atom if possible. + + pp$7.parseMaybeDefault = function(startPos, startLoc, left) { + left = left || this.parseBindingAtom(); + if (this.options.ecmaVersion < 6 || !this.eat(types$1.eq)) { return left } + var node = this.startNodeAt(startPos, startLoc); + node.left = left; + node.right = this.parseMaybeAssign(); + return this.finishNode(node, "AssignmentPattern") + }; + + // The following three functions all verify that a node is an lvalue — + // something that can be bound, or assigned to. In order to do so, they perform + // a variety of checks: + // + // - Check that none of the bound/assigned-to identifiers are reserved words. + // - Record name declarations for bindings in the appropriate scope. + // - Check duplicate argument names, if checkClashes is set. + // + // If a complex binding pattern is encountered (e.g., object and array + // destructuring), the entire pattern is recursively checked. + // + // There are three versions of checkLVal*() appropriate for different + // circumstances: + // + // - checkLValSimple() shall be used if the syntactic construct supports + // nothing other than identifiers and member expressions. Parenthesized + // expressions are also correctly handled. This is generally appropriate for + // constructs for which the spec says + // + // > It is a Syntax Error if AssignmentTargetType of [the production] is not + // > simple. + // + // It is also appropriate for checking if an identifier is valid and not + // defined elsewhere, like import declarations or function/class identifiers. + // + // Examples where this is used include: + // a += …; + // import a from '…'; + // where a is the node to be checked. + // + // - checkLValPattern() shall be used if the syntactic construct supports + // anything checkLValSimple() supports, as well as object and array + // destructuring patterns. This is generally appropriate for constructs for + // which the spec says + // + // > It is a Syntax Error if [the production] is neither an ObjectLiteral nor + // > an ArrayLiteral and AssignmentTargetType of [the production] is not + // > simple. + // + // Examples where this is used include: + // (a = …); + // const a = …; + // try { … } catch (a) { … } + // where a is the node to be checked. + // + // - checkLValInnerPattern() shall be used if the syntactic construct supports + // anything checkLValPattern() supports, as well as default assignment + // patterns, rest elements, and other constructs that may appear within an + // object or array destructuring pattern. + // + // As a special case, function parameters also use checkLValInnerPattern(), + // as they also support defaults and rest constructs. + // + // These functions deliberately support both assignment and binding constructs, + // as the logic for both is exceedingly similar. If the node is the target of + // an assignment, then bindingType should be set to BIND_NONE. Otherwise, it + // should be set to the appropriate BIND_* constant, like BIND_VAR or + // BIND_LEXICAL. + // + // If the function is called with a non-BIND_NONE bindingType, then + // additionally a checkClashes object may be specified to allow checking for + // duplicate argument names. checkClashes is ignored if the provided construct + // is an assignment (i.e., bindingType is BIND_NONE). + + pp$7.checkLValSimple = function(expr, bindingType, checkClashes) { + if ( bindingType === void 0 ) bindingType = BIND_NONE; + + var isBind = bindingType !== BIND_NONE; + + switch (expr.type) { + case "Identifier": + if (this.strict && this.reservedWordsStrictBind.test(expr.name)) + { this.raiseRecoverable(expr.start, (isBind ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); } + if (isBind) { + if (bindingType === BIND_LEXICAL && expr.name === "let") + { this.raiseRecoverable(expr.start, "let is disallowed as a lexically bound name"); } + if (checkClashes) { + if (hasOwn(checkClashes, expr.name)) + { this.raiseRecoverable(expr.start, "Argument name clash"); } + checkClashes[expr.name] = true; + } + if (bindingType !== BIND_OUTSIDE) { this.declareName(expr.name, bindingType, expr.start); } + } + break + + case "ChainExpression": + this.raiseRecoverable(expr.start, "Optional chaining cannot appear in left-hand side"); + break + + case "MemberExpression": + if (isBind) { this.raiseRecoverable(expr.start, "Binding member expression"); } + break + + case "ParenthesizedExpression": + if (isBind) { this.raiseRecoverable(expr.start, "Binding parenthesized expression"); } + return this.checkLValSimple(expr.expression, bindingType, checkClashes) + + default: + this.raise(expr.start, (isBind ? "Binding" : "Assigning to") + " rvalue"); + } + }; + + pp$7.checkLValPattern = function(expr, bindingType, checkClashes) { + if ( bindingType === void 0 ) bindingType = BIND_NONE; + + switch (expr.type) { + case "ObjectPattern": + for (var i = 0, list = expr.properties; i < list.length; i += 1) { + var prop = list[i]; + + this.checkLValInnerPattern(prop, bindingType, checkClashes); + } + break + + case "ArrayPattern": + for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) { + var elem = list$1[i$1]; + + if (elem) { this.checkLValInnerPattern(elem, bindingType, checkClashes); } + } + break + + default: + this.checkLValSimple(expr, bindingType, checkClashes); + } + }; + + pp$7.checkLValInnerPattern = function(expr, bindingType, checkClashes) { + if ( bindingType === void 0 ) bindingType = BIND_NONE; + + switch (expr.type) { + case "Property": + // AssignmentProperty has type === "Property" + this.checkLValInnerPattern(expr.value, bindingType, checkClashes); + break + + case "AssignmentPattern": + this.checkLValPattern(expr.left, bindingType, checkClashes); + break + + case "RestElement": + this.checkLValPattern(expr.argument, bindingType, checkClashes); + break + + default: + this.checkLValPattern(expr, bindingType, checkClashes); + } + }; + + // The algorithm used to determine whether a regexp can appear at a + // given point in the program is loosely based on sweet.js' approach. + // See https://github.com/mozilla/sweet.js/wiki/design + + + var TokContext = function TokContext(token, isExpr, preserveSpace, override, generator) { + this.token = token; + this.isExpr = !!isExpr; + this.preserveSpace = !!preserveSpace; + this.override = override; + this.generator = !!generator; + }; + + var types = { + b_stat: new TokContext("{", false), + b_expr: new TokContext("{", true), + b_tmpl: new TokContext("${", false), + p_stat: new TokContext("(", false), + p_expr: new TokContext("(", true), + q_tmpl: new TokContext("`", true, true, function (p) { return p.tryReadTemplateToken(); }), + f_stat: new TokContext("function", false), + f_expr: new TokContext("function", true), + f_expr_gen: new TokContext("function", true, false, null, true), + f_gen: new TokContext("function", false, false, null, true) + }; + + var pp$6 = Parser.prototype; + + pp$6.initialContext = function() { + return [types.b_stat] + }; + + pp$6.curContext = function() { + return this.context[this.context.length - 1] + }; + + pp$6.braceIsBlock = function(prevType) { + var parent = this.curContext(); + if (parent === types.f_expr || parent === types.f_stat) + { return true } + if (prevType === types$1.colon && (parent === types.b_stat || parent === types.b_expr)) + { return !parent.isExpr } + + // The check for `tt.name && exprAllowed` detects whether we are + // after a `yield` or `of` construct. See the `updateContext` for + // `tt.name`. + if (prevType === types$1._return || prevType === types$1.name && this.exprAllowed) + { return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) } + if (prevType === types$1._else || prevType === types$1.semi || prevType === types$1.eof || prevType === types$1.parenR || prevType === types$1.arrow) + { return true } + if (prevType === types$1.braceL) + { return parent === types.b_stat } + if (prevType === types$1._var || prevType === types$1._const || prevType === types$1.name) + { return false } + return !this.exprAllowed + }; + + pp$6.inGeneratorContext = function() { + for (var i = this.context.length - 1; i >= 1; i--) { + var context = this.context[i]; + if (context.token === "function") + { return context.generator } + } + return false + }; + + pp$6.updateContext = function(prevType) { + var update, type = this.type; + if (type.keyword && prevType === types$1.dot) + { this.exprAllowed = false; } + else if (update = type.updateContext) + { update.call(this, prevType); } + else + { this.exprAllowed = type.beforeExpr; } + }; + + // Used to handle edge cases when token context could not be inferred correctly during tokenization phase + + pp$6.overrideContext = function(tokenCtx) { + if (this.curContext() !== tokenCtx) { + this.context[this.context.length - 1] = tokenCtx; + } + }; + + // Token-specific context update code + + types$1.parenR.updateContext = types$1.braceR.updateContext = function() { + if (this.context.length === 1) { + this.exprAllowed = true; + return + } + var out = this.context.pop(); + if (out === types.b_stat && this.curContext().token === "function") { + out = this.context.pop(); + } + this.exprAllowed = !out.isExpr; + }; + + types$1.braceL.updateContext = function(prevType) { + this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr); + this.exprAllowed = true; + }; + + types$1.dollarBraceL.updateContext = function() { + this.context.push(types.b_tmpl); + this.exprAllowed = true; + }; + + types$1.parenL.updateContext = function(prevType) { + var statementParens = prevType === types$1._if || prevType === types$1._for || prevType === types$1._with || prevType === types$1._while; + this.context.push(statementParens ? types.p_stat : types.p_expr); + this.exprAllowed = true; + }; + + types$1.incDec.updateContext = function() { + // tokExprAllowed stays unchanged + }; + + types$1._function.updateContext = types$1._class.updateContext = function(prevType) { + if (prevType.beforeExpr && prevType !== types$1._else && + !(prevType === types$1.semi && this.curContext() !== types.p_stat) && + !(prevType === types$1._return && lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) && + !((prevType === types$1.colon || prevType === types$1.braceL) && this.curContext() === types.b_stat)) + { this.context.push(types.f_expr); } + else + { this.context.push(types.f_stat); } + this.exprAllowed = false; + }; + + types$1.colon.updateContext = function() { + if (this.curContext().token === "function") { this.context.pop(); } + this.exprAllowed = true; + }; + + types$1.backQuote.updateContext = function() { + if (this.curContext() === types.q_tmpl) + { this.context.pop(); } + else + { this.context.push(types.q_tmpl); } + this.exprAllowed = false; + }; + + types$1.star.updateContext = function(prevType) { + if (prevType === types$1._function) { + var index = this.context.length - 1; + if (this.context[index] === types.f_expr) + { this.context[index] = types.f_expr_gen; } + else + { this.context[index] = types.f_gen; } + } + this.exprAllowed = true; + }; + + types$1.name.updateContext = function(prevType) { + var allowed = false; + if (this.options.ecmaVersion >= 6 && prevType !== types$1.dot) { + if (this.value === "of" && !this.exprAllowed || + this.value === "yield" && this.inGeneratorContext()) + { allowed = true; } + } + this.exprAllowed = allowed; + }; + + // A recursive descent parser operates by defining functions for all + // syntactic elements, and recursively calling those, each function + // advancing the input stream and returning an AST node. Precedence + // of constructs (for example, the fact that `!x[1]` means `!(x[1])` + // instead of `(!x)[1]` is handled by the fact that the parser + // function that parses unary prefix operators is called first, and + // in turn calls the function that parses `[]` subscripts — that + // way, it'll receive the node for `x[1]` already parsed, and wraps + // *that* in the unary operator node. + // + // Acorn uses an [operator precedence parser][opp] to handle binary + // operator precedence, because it is much more compact than using + // the technique outlined above, which uses different, nesting + // functions to specify precedence, for all of the ten binary + // precedence levels that JavaScript defines. + // + // [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser + + + var pp$5 = Parser.prototype; + + // Check if property name clashes with already added. + // Object/class getters and setters are not allowed to clash — + // either with each other or with an init property — and in + // strict mode, init properties are also not allowed to be repeated. + + pp$5.checkPropClash = function(prop, propHash, refDestructuringErrors) { + if (this.options.ecmaVersion >= 9 && prop.type === "SpreadElement") + { return } + if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) + { return } + var key = prop.key; + var name; + switch (key.type) { + case "Identifier": name = key.name; break + case "Literal": name = String(key.value); break + default: return + } + var kind = prop.kind; + if (this.options.ecmaVersion >= 6) { + if (name === "__proto__" && kind === "init") { + if (propHash.proto) { + if (refDestructuringErrors) { + if (refDestructuringErrors.doubleProto < 0) { + refDestructuringErrors.doubleProto = key.start; + } + } else { + this.raiseRecoverable(key.start, "Redefinition of __proto__ property"); + } + } + propHash.proto = true; + } + return + } + name = "$" + name; + var other = propHash[name]; + if (other) { + var redefinition; + if (kind === "init") { + redefinition = this.strict && other.init || other.get || other.set; + } else { + redefinition = other.init || other[kind]; + } + if (redefinition) + { this.raiseRecoverable(key.start, "Redefinition of property"); } + } else { + other = propHash[name] = { + init: false, + get: false, + set: false + }; + } + other[kind] = true; + }; + + // ### Expression parsing + + // These nest, from the most general expression type at the top to + // 'atomic', nondivisible expression types at the bottom. Most of + // the functions will simply let the function(s) below them parse, + // and, *if* the syntactic construct they handle is present, wrap + // the AST node that the inner parser gave them in another node. + + // Parse a full expression. The optional arguments are used to + // forbid the `in` operator (in for loops initalization expressions) + // and provide reference for storing '=' operator inside shorthand + // property assignment in contexts where both object expression + // and object pattern might appear (so it's possible to raise + // delayed syntax error at correct position). + + pp$5.parseExpression = function(forInit, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseMaybeAssign(forInit, refDestructuringErrors); + if (this.type === types$1.comma) { + var node = this.startNodeAt(startPos, startLoc); + node.expressions = [expr]; + while (this.eat(types$1.comma)) { node.expressions.push(this.parseMaybeAssign(forInit, refDestructuringErrors)); } + return this.finishNode(node, "SequenceExpression") + } + return expr + }; + + // Parse an assignment expression. This includes applications of + // operators like `+=`. + + pp$5.parseMaybeAssign = function(forInit, refDestructuringErrors, afterLeftParse) { + if (this.isContextual("yield")) { + if (this.inGenerator) { return this.parseYield(forInit) } + // The tokenizer will assume an expression is allowed after + // `yield`, but this isn't that kind of yield + else { this.exprAllowed = false; } + } + + var ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1, oldDoubleProto = -1; + if (refDestructuringErrors) { + oldParenAssign = refDestructuringErrors.parenthesizedAssign; + oldTrailingComma = refDestructuringErrors.trailingComma; + oldDoubleProto = refDestructuringErrors.doubleProto; + refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = -1; + } else { + refDestructuringErrors = new DestructuringErrors; + ownDestructuringErrors = true; + } + + var startPos = this.start, startLoc = this.startLoc; + if (this.type === types$1.parenL || this.type === types$1.name) { + this.potentialArrowAt = this.start; + this.potentialArrowInForAwait = forInit === "await"; + } + var left = this.parseMaybeConditional(forInit, refDestructuringErrors); + if (afterLeftParse) { left = afterLeftParse.call(this, left, startPos, startLoc); } + if (this.type.isAssign) { + var node = this.startNodeAt(startPos, startLoc); + node.operator = this.value; + if (this.type === types$1.eq) + { left = this.toAssignable(left, false, refDestructuringErrors); } + if (!ownDestructuringErrors) { + refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.doubleProto = -1; + } + if (refDestructuringErrors.shorthandAssign >= left.start) + { refDestructuringErrors.shorthandAssign = -1; } // reset because shorthand default was used correctly + if (this.type === types$1.eq) + { this.checkLValPattern(left); } + else + { this.checkLValSimple(left); } + node.left = left; + this.next(); + node.right = this.parseMaybeAssign(forInit); + if (oldDoubleProto > -1) { refDestructuringErrors.doubleProto = oldDoubleProto; } + return this.finishNode(node, "AssignmentExpression") + } else { + if (ownDestructuringErrors) { this.checkExpressionErrors(refDestructuringErrors, true); } + } + if (oldParenAssign > -1) { refDestructuringErrors.parenthesizedAssign = oldParenAssign; } + if (oldTrailingComma > -1) { refDestructuringErrors.trailingComma = oldTrailingComma; } + return left + }; + + // Parse a ternary conditional (`?:`) operator. + + pp$5.parseMaybeConditional = function(forInit, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseExprOps(forInit, refDestructuringErrors); + if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } + if (this.eat(types$1.question)) { + var node = this.startNodeAt(startPos, startLoc); + node.test = expr; + node.consequent = this.parseMaybeAssign(); + this.expect(types$1.colon); + node.alternate = this.parseMaybeAssign(forInit); + return this.finishNode(node, "ConditionalExpression") + } + return expr + }; + + // Start the precedence parser. + + pp$5.parseExprOps = function(forInit, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseMaybeUnary(refDestructuringErrors, false, false, forInit); + if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } + return expr.start === startPos && expr.type === "ArrowFunctionExpression" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, forInit) + }; + + // Parse binary operators with the operator precedence parsing + // algorithm. `left` is the left-hand side of the operator. + // `minPrec` provides context that allows the function to stop and + // defer further parser to one of its callers when it encounters an + // operator that has a lower precedence than the set it is parsing. + + pp$5.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, forInit) { + var prec = this.type.binop; + if (prec != null && (!forInit || this.type !== types$1._in)) { + if (prec > minPrec) { + var logical = this.type === types$1.logicalOR || this.type === types$1.logicalAND; + var coalesce = this.type === types$1.coalesce; + if (coalesce) { + // Handle the precedence of `tt.coalesce` as equal to the range of logical expressions. + // In other words, `node.right` shouldn't contain logical expressions in order to check the mixed error. + prec = types$1.logicalAND.binop; + } + var op = this.value; + this.next(); + var startPos = this.start, startLoc = this.startLoc; + var right = this.parseExprOp(this.parseMaybeUnary(null, false, false, forInit), startPos, startLoc, prec, forInit); + var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical || coalesce); + if ((logical && this.type === types$1.coalesce) || (coalesce && (this.type === types$1.logicalOR || this.type === types$1.logicalAND))) { + this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"); + } + return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, forInit) + } + } + return left + }; + + pp$5.buildBinary = function(startPos, startLoc, left, right, op, logical) { + if (right.type === "PrivateIdentifier") { this.raise(right.start, "Private identifier can only be left side of binary expression"); } + var node = this.startNodeAt(startPos, startLoc); + node.left = left; + node.operator = op; + node.right = right; + return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression") + }; + + // Parse unary operators, both prefix and postfix. + + pp$5.parseMaybeUnary = function(refDestructuringErrors, sawUnary, incDec, forInit) { + var startPos = this.start, startLoc = this.startLoc, expr; + if (this.isContextual("await") && this.canAwait) { + expr = this.parseAwait(forInit); + sawUnary = true; + } else if (this.type.prefix) { + var node = this.startNode(), update = this.type === types$1.incDec; + node.operator = this.value; + node.prefix = true; + this.next(); + node.argument = this.parseMaybeUnary(null, true, update, forInit); + this.checkExpressionErrors(refDestructuringErrors, true); + if (update) { this.checkLValSimple(node.argument); } + else if (this.strict && node.operator === "delete" && isLocalVariableAccess(node.argument)) + { this.raiseRecoverable(node.start, "Deleting local variable in strict mode"); } + else if (node.operator === "delete" && isPrivateFieldAccess(node.argument)) + { this.raiseRecoverable(node.start, "Private fields can not be deleted"); } + else { sawUnary = true; } + expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); + } else if (!sawUnary && this.type === types$1.privateId) { + if ((forInit || this.privateNameStack.length === 0) && this.options.checkPrivateFields) { this.unexpected(); } + expr = this.parsePrivateIdent(); + // only could be private fields in 'in', such as #x in obj + if (this.type !== types$1._in) { this.unexpected(); } + } else { + expr = this.parseExprSubscripts(refDestructuringErrors, forInit); + if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } + while (this.type.postfix && !this.canInsertSemicolon()) { + var node$1 = this.startNodeAt(startPos, startLoc); + node$1.operator = this.value; + node$1.prefix = false; + node$1.argument = expr; + this.checkLValSimple(expr); + this.next(); + expr = this.finishNode(node$1, "UpdateExpression"); + } + } + + if (!incDec && this.eat(types$1.starstar)) { + if (sawUnary) + { this.unexpected(this.lastTokStart); } + else + { return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false, false, forInit), "**", false) } + } else { + return expr + } + }; + + function isLocalVariableAccess(node) { + return ( + node.type === "Identifier" || + node.type === "ParenthesizedExpression" && isLocalVariableAccess(node.expression) + ) + } + + function isPrivateFieldAccess(node) { + return ( + node.type === "MemberExpression" && node.property.type === "PrivateIdentifier" || + node.type === "ChainExpression" && isPrivateFieldAccess(node.expression) || + node.type === "ParenthesizedExpression" && isPrivateFieldAccess(node.expression) + ) + } + + // Parse call, dot, and `[]`-subscript expressions. + + pp$5.parseExprSubscripts = function(refDestructuringErrors, forInit) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseExprAtom(refDestructuringErrors, forInit); + if (expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")") + { return expr } + var result = this.parseSubscripts(expr, startPos, startLoc, false, forInit); + if (refDestructuringErrors && result.type === "MemberExpression") { + if (refDestructuringErrors.parenthesizedAssign >= result.start) { refDestructuringErrors.parenthesizedAssign = -1; } + if (refDestructuringErrors.parenthesizedBind >= result.start) { refDestructuringErrors.parenthesizedBind = -1; } + if (refDestructuringErrors.trailingComma >= result.start) { refDestructuringErrors.trailingComma = -1; } + } + return result + }; + + pp$5.parseSubscripts = function(base, startPos, startLoc, noCalls, forInit) { + var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" && + this.lastTokEnd === base.end && !this.canInsertSemicolon() && base.end - base.start === 5 && + this.potentialArrowAt === base.start; + var optionalChained = false; + + while (true) { + var element = this.parseSubscript(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit); + + if (element.optional) { optionalChained = true; } + if (element === base || element.type === "ArrowFunctionExpression") { + if (optionalChained) { + var chainNode = this.startNodeAt(startPos, startLoc); + chainNode.expression = element; + element = this.finishNode(chainNode, "ChainExpression"); + } + return element + } + + base = element; + } + }; + + pp$5.shouldParseAsyncArrow = function() { + return !this.canInsertSemicolon() && this.eat(types$1.arrow) + }; + + pp$5.parseSubscriptAsyncArrow = function(startPos, startLoc, exprList, forInit) { + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, true, forInit) + }; + + pp$5.parseSubscript = function(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit) { + var optionalSupported = this.options.ecmaVersion >= 11; + var optional = optionalSupported && this.eat(types$1.questionDot); + if (noCalls && optional) { this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions"); } + + var computed = this.eat(types$1.bracketL); + if (computed || (optional && this.type !== types$1.parenL && this.type !== types$1.backQuote) || this.eat(types$1.dot)) { + var node = this.startNodeAt(startPos, startLoc); + node.object = base; + if (computed) { + node.property = this.parseExpression(); + this.expect(types$1.bracketR); + } else if (this.type === types$1.privateId && base.type !== "Super") { + node.property = this.parsePrivateIdent(); + } else { + node.property = this.parseIdent(this.options.allowReserved !== "never"); + } + node.computed = !!computed; + if (optionalSupported) { + node.optional = optional; + } + base = this.finishNode(node, "MemberExpression"); + } else if (!noCalls && this.eat(types$1.parenL)) { + var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + var exprList = this.parseExprList(types$1.parenR, this.options.ecmaVersion >= 8, false, refDestructuringErrors); + if (maybeAsyncArrow && !optional && this.shouldParseAsyncArrow()) { + this.checkPatternErrors(refDestructuringErrors, false); + this.checkYieldAwaitInDefaultParams(); + if (this.awaitIdentPos > 0) + { this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"); } + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.parseSubscriptAsyncArrow(startPos, startLoc, exprList, forInit) + } + this.checkExpressionErrors(refDestructuringErrors, true); + this.yieldPos = oldYieldPos || this.yieldPos; + this.awaitPos = oldAwaitPos || this.awaitPos; + this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos; + var node$1 = this.startNodeAt(startPos, startLoc); + node$1.callee = base; + node$1.arguments = exprList; + if (optionalSupported) { + node$1.optional = optional; + } + base = this.finishNode(node$1, "CallExpression"); + } else if (this.type === types$1.backQuote) { + if (optional || optionalChained) { + this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions"); + } + var node$2 = this.startNodeAt(startPos, startLoc); + node$2.tag = base; + node$2.quasi = this.parseTemplate({isTagged: true}); + base = this.finishNode(node$2, "TaggedTemplateExpression"); + } + return base + }; + + // Parse an atomic expression — either a single token that is an + // expression, an expression started by a keyword like `function` or + // `new`, or an expression wrapped in punctuation like `()`, `[]`, + // or `{}`. + + pp$5.parseExprAtom = function(refDestructuringErrors, forInit, forNew) { + // If a division operator appears in an expression position, the + // tokenizer got confused, and we force it to read a regexp instead. + if (this.type === types$1.slash) { this.readRegexp(); } + + var node, canBeArrow = this.potentialArrowAt === this.start; + switch (this.type) { + case types$1._super: + if (!this.allowSuper) + { this.raise(this.start, "'super' keyword outside a method"); } + node = this.startNode(); + this.next(); + if (this.type === types$1.parenL && !this.allowDirectSuper) + { this.raise(node.start, "super() call outside constructor of a subclass"); } + // The `super` keyword can appear at below: + // SuperProperty: + // super [ Expression ] + // super . IdentifierName + // SuperCall: + // super ( Arguments ) + if (this.type !== types$1.dot && this.type !== types$1.bracketL && this.type !== types$1.parenL) + { this.unexpected(); } + return this.finishNode(node, "Super") + + case types$1._this: + node = this.startNode(); + this.next(); + return this.finishNode(node, "ThisExpression") + + case types$1.name: + var startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc; + var id = this.parseIdent(false); + if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === "async" && !this.canInsertSemicolon() && this.eat(types$1._function)) { + this.overrideContext(types.f_expr); + return this.parseFunction(this.startNodeAt(startPos, startLoc), 0, false, true, forInit) + } + if (canBeArrow && !this.canInsertSemicolon()) { + if (this.eat(types$1.arrow)) + { return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false, forInit) } + if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === types$1.name && !containsEsc && + (!this.potentialArrowInForAwait || this.value !== "of" || this.containsEsc)) { + id = this.parseIdent(false); + if (this.canInsertSemicolon() || !this.eat(types$1.arrow)) + { this.unexpected(); } + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true, forInit) + } + } + return id + + case types$1.regexp: + var value = this.value; + node = this.parseLiteral(value.value); + node.regex = {pattern: value.pattern, flags: value.flags}; + return node + + case types$1.num: case types$1.string: + return this.parseLiteral(this.value) + + case types$1._null: case types$1._true: case types$1._false: + node = this.startNode(); + node.value = this.type === types$1._null ? null : this.type === types$1._true; + node.raw = this.type.keyword; + this.next(); + return this.finishNode(node, "Literal") + + case types$1.parenL: + var start = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow, forInit); + if (refDestructuringErrors) { + if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr)) + { refDestructuringErrors.parenthesizedAssign = start; } + if (refDestructuringErrors.parenthesizedBind < 0) + { refDestructuringErrors.parenthesizedBind = start; } + } + return expr + + case types$1.bracketL: + node = this.startNode(); + this.next(); + node.elements = this.parseExprList(types$1.bracketR, true, true, refDestructuringErrors); + return this.finishNode(node, "ArrayExpression") + + case types$1.braceL: + this.overrideContext(types.b_expr); + return this.parseObj(false, refDestructuringErrors) + + case types$1._function: + node = this.startNode(); + this.next(); + return this.parseFunction(node, 0) + + case types$1._class: + return this.parseClass(this.startNode(), false) + + case types$1._new: + return this.parseNew() + + case types$1.backQuote: + return this.parseTemplate() + + case types$1._import: + if (this.options.ecmaVersion >= 11) { + return this.parseExprImport(forNew) + } else { + return this.unexpected() + } + + default: + return this.parseExprAtomDefault() + } + }; + + pp$5.parseExprAtomDefault = function() { + this.unexpected(); + }; + + pp$5.parseExprImport = function(forNew) { + var node = this.startNode(); + + // Consume `import` as an identifier for `import.meta`. + // Because `this.parseIdent(true)` doesn't check escape sequences, it needs the check of `this.containsEsc`. + if (this.containsEsc) { this.raiseRecoverable(this.start, "Escape sequence in keyword import"); } + this.next(); + + if (this.type === types$1.parenL && !forNew) { + return this.parseDynamicImport(node) + } else if (this.type === types$1.dot) { + var meta = this.startNodeAt(node.start, node.loc && node.loc.start); + meta.name = "import"; + node.meta = this.finishNode(meta, "Identifier"); + return this.parseImportMeta(node) + } else { + this.unexpected(); + } + }; + + pp$5.parseDynamicImport = function(node) { + this.next(); // skip `(` + + // Parse node.source. + node.source = this.parseMaybeAssign(); + + if (this.options.ecmaVersion >= 16) { + if (!this.eat(types$1.parenR)) { + this.expect(types$1.comma); + if (!this.afterTrailingComma(types$1.parenR)) { + node.options = this.parseMaybeAssign(); + if (!this.eat(types$1.parenR)) { + this.expect(types$1.comma); + if (!this.afterTrailingComma(types$1.parenR)) { + this.unexpected(); + } + } + } else { + node.options = null; + } + } else { + node.options = null; + } + } else { + // Verify ending. + if (!this.eat(types$1.parenR)) { + var errorPos = this.start; + if (this.eat(types$1.comma) && this.eat(types$1.parenR)) { + this.raiseRecoverable(errorPos, "Trailing comma is not allowed in import()"); + } else { + this.unexpected(errorPos); + } + } + } + + return this.finishNode(node, "ImportExpression") + }; + + pp$5.parseImportMeta = function(node) { + this.next(); // skip `.` + + var containsEsc = this.containsEsc; + node.property = this.parseIdent(true); + + if (node.property.name !== "meta") + { this.raiseRecoverable(node.property.start, "The only valid meta property for import is 'import.meta'"); } + if (containsEsc) + { this.raiseRecoverable(node.start, "'import.meta' must not contain escaped characters"); } + if (this.options.sourceType !== "module" && !this.options.allowImportExportEverywhere) + { this.raiseRecoverable(node.start, "Cannot use 'import.meta' outside a module"); } + + return this.finishNode(node, "MetaProperty") + }; + + pp$5.parseLiteral = function(value) { + var node = this.startNode(); + node.value = value; + node.raw = this.input.slice(this.start, this.end); + if (node.raw.charCodeAt(node.raw.length - 1) === 110) { node.bigint = node.raw.slice(0, -1).replace(/_/g, ""); } + this.next(); + return this.finishNode(node, "Literal") + }; + + pp$5.parseParenExpression = function() { + this.expect(types$1.parenL); + var val = this.parseExpression(); + this.expect(types$1.parenR); + return val + }; + + pp$5.shouldParseArrow = function(exprList) { + return !this.canInsertSemicolon() + }; + + pp$5.parseParenAndDistinguishExpression = function(canBeArrow, forInit) { + var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8; + if (this.options.ecmaVersion >= 6) { + this.next(); + + var innerStartPos = this.start, innerStartLoc = this.startLoc; + var exprList = [], first = true, lastIsComma = false; + var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart; + this.yieldPos = 0; + this.awaitPos = 0; + // Do not save awaitIdentPos to allow checking awaits nested in parameters + while (this.type !== types$1.parenR) { + first ? first = false : this.expect(types$1.comma); + if (allowTrailingComma && this.afterTrailingComma(types$1.parenR, true)) { + lastIsComma = true; + break + } else if (this.type === types$1.ellipsis) { + spreadStart = this.start; + exprList.push(this.parseParenItem(this.parseRestBinding())); + if (this.type === types$1.comma) { + this.raiseRecoverable( + this.start, + "Comma is not permitted after the rest element" + ); + } + break + } else { + exprList.push(this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem)); + } + } + var innerEndPos = this.lastTokEnd, innerEndLoc = this.lastTokEndLoc; + this.expect(types$1.parenR); + + if (canBeArrow && this.shouldParseArrow(exprList) && this.eat(types$1.arrow)) { + this.checkPatternErrors(refDestructuringErrors, false); + this.checkYieldAwaitInDefaultParams(); + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + return this.parseParenArrowList(startPos, startLoc, exprList, forInit) + } + + if (!exprList.length || lastIsComma) { this.unexpected(this.lastTokStart); } + if (spreadStart) { this.unexpected(spreadStart); } + this.checkExpressionErrors(refDestructuringErrors, true); + this.yieldPos = oldYieldPos || this.yieldPos; + this.awaitPos = oldAwaitPos || this.awaitPos; + + if (exprList.length > 1) { + val = this.startNodeAt(innerStartPos, innerStartLoc); + val.expressions = exprList; + this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc); + } else { + val = exprList[0]; + } + } else { + val = this.parseParenExpression(); + } + + if (this.options.preserveParens) { + var par = this.startNodeAt(startPos, startLoc); + par.expression = val; + return this.finishNode(par, "ParenthesizedExpression") + } else { + return val + } + }; + + pp$5.parseParenItem = function(item) { + return item + }; + + pp$5.parseParenArrowList = function(startPos, startLoc, exprList, forInit) { + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, false, forInit) + }; + + // New's precedence is slightly tricky. It must allow its argument to + // be a `[]` or dot subscript expression, but not a call — at least, + // not without wrapping it in parentheses. Thus, it uses the noCalls + // argument to parseSubscripts to prevent it from consuming the + // argument list. + + var empty = []; + + pp$5.parseNew = function() { + if (this.containsEsc) { this.raiseRecoverable(this.start, "Escape sequence in keyword new"); } + var node = this.startNode(); + this.next(); + if (this.options.ecmaVersion >= 6 && this.type === types$1.dot) { + var meta = this.startNodeAt(node.start, node.loc && node.loc.start); + meta.name = "new"; + node.meta = this.finishNode(meta, "Identifier"); + this.next(); + var containsEsc = this.containsEsc; + node.property = this.parseIdent(true); + if (node.property.name !== "target") + { this.raiseRecoverable(node.property.start, "The only valid meta property for new is 'new.target'"); } + if (containsEsc) + { this.raiseRecoverable(node.start, "'new.target' must not contain escaped characters"); } + if (!this.allowNewDotTarget) + { this.raiseRecoverable(node.start, "'new.target' can only be used in functions and class static block"); } + return this.finishNode(node, "MetaProperty") + } + var startPos = this.start, startLoc = this.startLoc; + node.callee = this.parseSubscripts(this.parseExprAtom(null, false, true), startPos, startLoc, true, false); + if (this.eat(types$1.parenL)) { node.arguments = this.parseExprList(types$1.parenR, this.options.ecmaVersion >= 8, false); } + else { node.arguments = empty; } + return this.finishNode(node, "NewExpression") + }; + + // Parse template expression. + + pp$5.parseTemplateElement = function(ref) { + var isTagged = ref.isTagged; + + var elem = this.startNode(); + if (this.type === types$1.invalidTemplate) { + if (!isTagged) { + this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"); + } + elem.value = { + raw: this.value.replace(/\r\n?/g, "\n"), + cooked: null + }; + } else { + elem.value = { + raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"), + cooked: this.value + }; + } + this.next(); + elem.tail = this.type === types$1.backQuote; + return this.finishNode(elem, "TemplateElement") + }; + + pp$5.parseTemplate = function(ref) { + if ( ref === void 0 ) ref = {}; + var isTagged = ref.isTagged; if ( isTagged === void 0 ) isTagged = false; + + var node = this.startNode(); + this.next(); + node.expressions = []; + var curElt = this.parseTemplateElement({isTagged: isTagged}); + node.quasis = [curElt]; + while (!curElt.tail) { + if (this.type === types$1.eof) { this.raise(this.pos, "Unterminated template literal"); } + this.expect(types$1.dollarBraceL); + node.expressions.push(this.parseExpression()); + this.expect(types$1.braceR); + node.quasis.push(curElt = this.parseTemplateElement({isTagged: isTagged})); + } + this.next(); + return this.finishNode(node, "TemplateLiteral") + }; + + pp$5.isAsyncProp = function(prop) { + return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && + (this.type === types$1.name || this.type === types$1.num || this.type === types$1.string || this.type === types$1.bracketL || this.type.keyword || (this.options.ecmaVersion >= 9 && this.type === types$1.star)) && + !lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) + }; + + // Parse an object literal or binding pattern. + + pp$5.parseObj = function(isPattern, refDestructuringErrors) { + var node = this.startNode(), first = true, propHash = {}; + node.properties = []; + this.next(); + while (!this.eat(types$1.braceR)) { + if (!first) { + this.expect(types$1.comma); + if (this.options.ecmaVersion >= 5 && this.afterTrailingComma(types$1.braceR)) { break } + } else { first = false; } + + var prop = this.parseProperty(isPattern, refDestructuringErrors); + if (!isPattern) { this.checkPropClash(prop, propHash, refDestructuringErrors); } + node.properties.push(prop); + } + return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression") + }; + + pp$5.parseProperty = function(isPattern, refDestructuringErrors) { + var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc; + if (this.options.ecmaVersion >= 9 && this.eat(types$1.ellipsis)) { + if (isPattern) { + prop.argument = this.parseIdent(false); + if (this.type === types$1.comma) { + this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"); + } + return this.finishNode(prop, "RestElement") + } + // Parse argument. + prop.argument = this.parseMaybeAssign(false, refDestructuringErrors); + // To disallow trailing comma via `this.toAssignable()`. + if (this.type === types$1.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0) { + refDestructuringErrors.trailingComma = this.start; + } + // Finish + return this.finishNode(prop, "SpreadElement") + } + if (this.options.ecmaVersion >= 6) { + prop.method = false; + prop.shorthand = false; + if (isPattern || refDestructuringErrors) { + startPos = this.start; + startLoc = this.startLoc; + } + if (!isPattern) + { isGenerator = this.eat(types$1.star); } + } + var containsEsc = this.containsEsc; + this.parsePropertyName(prop); + if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) { + isAsync = true; + isGenerator = this.options.ecmaVersion >= 9 && this.eat(types$1.star); + this.parsePropertyName(prop); + } else { + isAsync = false; + } + this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc); + return this.finishNode(prop, "Property") + }; + + pp$5.parseGetterSetter = function(prop) { + prop.kind = prop.key.name; + this.parsePropertyName(prop); + prop.value = this.parseMethod(false); + var paramCount = prop.kind === "get" ? 0 : 1; + if (prop.value.params.length !== paramCount) { + var start = prop.value.start; + if (prop.kind === "get") + { this.raiseRecoverable(start, "getter should have no params"); } + else + { this.raiseRecoverable(start, "setter should have exactly one param"); } + } else { + if (prop.kind === "set" && prop.value.params[0].type === "RestElement") + { this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params"); } + } + }; + + pp$5.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) { + if ((isGenerator || isAsync) && this.type === types$1.colon) + { this.unexpected(); } + + if (this.eat(types$1.colon)) { + prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors); + prop.kind = "init"; + } else if (this.options.ecmaVersion >= 6 && this.type === types$1.parenL) { + if (isPattern) { this.unexpected(); } + prop.kind = "init"; + prop.method = true; + prop.value = this.parseMethod(isGenerator, isAsync); + } else if (!isPattern && !containsEsc && + this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && + (prop.key.name === "get" || prop.key.name === "set") && + (this.type !== types$1.comma && this.type !== types$1.braceR && this.type !== types$1.eq)) { + if (isGenerator || isAsync) { this.unexpected(); } + this.parseGetterSetter(prop); + } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { + if (isGenerator || isAsync) { this.unexpected(); } + this.checkUnreserved(prop.key); + if (prop.key.name === "await" && !this.awaitIdentPos) + { this.awaitIdentPos = startPos; } + prop.kind = "init"; + if (isPattern) { + prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key)); + } else if (this.type === types$1.eq && refDestructuringErrors) { + if (refDestructuringErrors.shorthandAssign < 0) + { refDestructuringErrors.shorthandAssign = this.start; } + prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key)); + } else { + prop.value = this.copyNode(prop.key); + } + prop.shorthand = true; + } else { this.unexpected(); } + }; + + pp$5.parsePropertyName = function(prop) { + if (this.options.ecmaVersion >= 6) { + if (this.eat(types$1.bracketL)) { + prop.computed = true; + prop.key = this.parseMaybeAssign(); + this.expect(types$1.bracketR); + return prop.key + } else { + prop.computed = false; + } + } + return prop.key = this.type === types$1.num || this.type === types$1.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never") + }; + + // Initialize empty function node. + + pp$5.initFunction = function(node) { + node.id = null; + if (this.options.ecmaVersion >= 6) { node.generator = node.expression = false; } + if (this.options.ecmaVersion >= 8) { node.async = false; } + }; + + // Parse object or class method. + + pp$5.parseMethod = function(isGenerator, isAsync, allowDirectSuper) { + var node = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + + this.initFunction(node); + if (this.options.ecmaVersion >= 6) + { node.generator = isGenerator; } + if (this.options.ecmaVersion >= 8) + { node.async = !!isAsync; } + + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + this.enterScope(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0)); + + this.expect(types$1.parenL); + node.params = this.parseBindingList(types$1.parenR, false, this.options.ecmaVersion >= 8); + this.checkYieldAwaitInDefaultParams(); + this.parseFunctionBody(node, false, true, false); + + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.finishNode(node, "FunctionExpression") + }; + + // Parse arrow function expression with given parameters. + + pp$5.parseArrowExpression = function(node, params, isAsync, forInit) { + var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + + this.enterScope(functionFlags(isAsync, false) | SCOPE_ARROW); + this.initFunction(node); + if (this.options.ecmaVersion >= 8) { node.async = !!isAsync; } + + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + + node.params = this.toAssignableList(params, true); + this.parseFunctionBody(node, true, false, forInit); + + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.finishNode(node, "ArrowFunctionExpression") + }; + + // Parse function body and check parameters. + + pp$5.parseFunctionBody = function(node, isArrowFunction, isMethod, forInit) { + var isExpression = isArrowFunction && this.type !== types$1.braceL; + var oldStrict = this.strict, useStrict = false; + + if (isExpression) { + node.body = this.parseMaybeAssign(forInit); + node.expression = true; + this.checkParams(node, false); + } else { + var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params); + if (!oldStrict || nonSimple) { + useStrict = this.strictDirective(this.end); + // If this is a strict mode function, verify that argument names + // are not repeated, and it does not try to bind the words `eval` + // or `arguments`. + if (useStrict && nonSimple) + { this.raiseRecoverable(node.start, "Illegal 'use strict' directive in function with non-simple parameter list"); } + } + // Start a new scope with regard to labels and the `inFunction` + // flag (restore them to their old value afterwards). + var oldLabels = this.labels; + this.labels = []; + if (useStrict) { this.strict = true; } + + // Add the params to varDeclaredNames to ensure that an error is thrown + // if a let/const declaration in the function clashes with one of the params. + this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node.params)); + // Ensure the function name isn't a forbidden identifier in strict mode, e.g. 'eval' + if (this.strict && node.id) { this.checkLValSimple(node.id, BIND_OUTSIDE); } + node.body = this.parseBlock(false, undefined, useStrict && !oldStrict); + node.expression = false; + this.adaptDirectivePrologue(node.body.body); + this.labels = oldLabels; + } + this.exitScope(); + }; + + pp$5.isSimpleParamList = function(params) { + for (var i = 0, list = params; i < list.length; i += 1) + { + var param = list[i]; + + if (param.type !== "Identifier") { return false + } } + return true + }; + + // Checks function params for various disallowed patterns such as using "eval" + // or "arguments" and duplicate parameters. + + pp$5.checkParams = function(node, allowDuplicates) { + var nameHash = Object.create(null); + for (var i = 0, list = node.params; i < list.length; i += 1) + { + var param = list[i]; + + this.checkLValInnerPattern(param, BIND_VAR, allowDuplicates ? null : nameHash); + } + }; + + // Parses a comma-separated list of expressions, and returns them as + // an array. `close` is the token type that ends the list, and + // `allowEmpty` can be turned on to allow subsequent commas with + // nothing in between them to be parsed as `null` (which is needed + // for array literals). + + pp$5.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) { + var elts = [], first = true; + while (!this.eat(close)) { + if (!first) { + this.expect(types$1.comma); + if (allowTrailingComma && this.afterTrailingComma(close)) { break } + } else { first = false; } + + var elt = (void 0); + if (allowEmpty && this.type === types$1.comma) + { elt = null; } + else if (this.type === types$1.ellipsis) { + elt = this.parseSpread(refDestructuringErrors); + if (refDestructuringErrors && this.type === types$1.comma && refDestructuringErrors.trailingComma < 0) + { refDestructuringErrors.trailingComma = this.start; } + } else { + elt = this.parseMaybeAssign(false, refDestructuringErrors); + } + elts.push(elt); + } + return elts + }; + + pp$5.checkUnreserved = function(ref) { + var start = ref.start; + var end = ref.end; + var name = ref.name; + + if (this.inGenerator && name === "yield") + { this.raiseRecoverable(start, "Cannot use 'yield' as identifier inside a generator"); } + if (this.inAsync && name === "await") + { this.raiseRecoverable(start, "Cannot use 'await' as identifier inside an async function"); } + if (this.currentThisScope().inClassFieldInit && name === "arguments") + { this.raiseRecoverable(start, "Cannot use 'arguments' in class field initializer"); } + if (this.inClassStaticBlock && (name === "arguments" || name === "await")) + { this.raise(start, ("Cannot use " + name + " in class static initialization block")); } + if (this.keywords.test(name)) + { this.raise(start, ("Unexpected keyword '" + name + "'")); } + if (this.options.ecmaVersion < 6 && + this.input.slice(start, end).indexOf("\\") !== -1) { return } + var re = this.strict ? this.reservedWordsStrict : this.reservedWords; + if (re.test(name)) { + if (!this.inAsync && name === "await") + { this.raiseRecoverable(start, "Cannot use keyword 'await' outside an async function"); } + this.raiseRecoverable(start, ("The keyword '" + name + "' is reserved")); + } + }; + + // Parse the next token as an identifier. If `liberal` is true (used + // when parsing properties), it will also convert keywords into + // identifiers. + + pp$5.parseIdent = function(liberal) { + var node = this.parseIdentNode(); + this.next(!!liberal); + this.finishNode(node, "Identifier"); + if (!liberal) { + this.checkUnreserved(node); + if (node.name === "await" && !this.awaitIdentPos) + { this.awaitIdentPos = node.start; } + } + return node + }; + + pp$5.parseIdentNode = function() { + var node = this.startNode(); + if (this.type === types$1.name) { + node.name = this.value; + } else if (this.type.keyword) { + node.name = this.type.keyword; + + // To fix https://github.com/acornjs/acorn/issues/575 + // `class` and `function` keywords push new context into this.context. + // But there is no chance to pop the context if the keyword is consumed as an identifier such as a property name. + // If the previous token is a dot, this does not apply because the context-managing code already ignored the keyword + if ((node.name === "class" || node.name === "function") && + (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) { + this.context.pop(); + } + this.type = types$1.name; + } else { + this.unexpected(); + } + return node + }; + + pp$5.parsePrivateIdent = function() { + var node = this.startNode(); + if (this.type === types$1.privateId) { + node.name = this.value; + } else { + this.unexpected(); + } + this.next(); + this.finishNode(node, "PrivateIdentifier"); + + // For validating existence + if (this.options.checkPrivateFields) { + if (this.privateNameStack.length === 0) { + this.raise(node.start, ("Private field '#" + (node.name) + "' must be declared in an enclosing class")); + } else { + this.privateNameStack[this.privateNameStack.length - 1].used.push(node); + } + } + + return node + }; + + // Parses yield expression inside generator. + + pp$5.parseYield = function(forInit) { + if (!this.yieldPos) { this.yieldPos = this.start; } + + var node = this.startNode(); + this.next(); + if (this.type === types$1.semi || this.canInsertSemicolon() || (this.type !== types$1.star && !this.type.startsExpr)) { + node.delegate = false; + node.argument = null; + } else { + node.delegate = this.eat(types$1.star); + node.argument = this.parseMaybeAssign(forInit); + } + return this.finishNode(node, "YieldExpression") + }; + + pp$5.parseAwait = function(forInit) { + if (!this.awaitPos) { this.awaitPos = this.start; } + + var node = this.startNode(); + this.next(); + node.argument = this.parseMaybeUnary(null, true, false, forInit); + return this.finishNode(node, "AwaitExpression") + }; + + var pp$4 = Parser.prototype; + + // This function is used to raise exceptions on parse errors. It + // takes an offset integer (into the current `input`) to indicate + // the location of the error, attaches the position to the end + // of the error message, and then raises a `SyntaxError` with that + // message. + + pp$4.raise = function(pos, message) { + var loc = getLineInfo(this.input, pos); + message += " (" + loc.line + ":" + loc.column + ")"; + var err = new SyntaxError(message); + err.pos = pos; err.loc = loc; err.raisedAt = this.pos; + throw err + }; + + pp$4.raiseRecoverable = pp$4.raise; + + pp$4.curPosition = function() { + if (this.options.locations) { + return new Position(this.curLine, this.pos - this.lineStart) + } + }; + + var pp$3 = Parser.prototype; + + var Scope = function Scope(flags) { + this.flags = flags; + // A list of var-declared names in the current lexical scope + this.var = []; + // A list of lexically-declared names in the current lexical scope + this.lexical = []; + // A list of lexically-declared FunctionDeclaration names in the current lexical scope + this.functions = []; + // A switch to disallow the identifier reference 'arguments' + this.inClassFieldInit = false; + }; + + // The functions in this module keep track of declared variables in the current scope in order to detect duplicate variable names. + + pp$3.enterScope = function(flags) { + this.scopeStack.push(new Scope(flags)); + }; + + pp$3.exitScope = function() { + this.scopeStack.pop(); + }; + + // The spec says: + // > At the top level of a function, or script, function declarations are + // > treated like var declarations rather than like lexical declarations. + pp$3.treatFunctionsAsVarInScope = function(scope) { + return (scope.flags & SCOPE_FUNCTION) || !this.inModule && (scope.flags & SCOPE_TOP) + }; + + pp$3.declareName = function(name, bindingType, pos) { + var redeclared = false; + if (bindingType === BIND_LEXICAL) { + var scope = this.currentScope(); + redeclared = scope.lexical.indexOf(name) > -1 || scope.functions.indexOf(name) > -1 || scope.var.indexOf(name) > -1; + scope.lexical.push(name); + if (this.inModule && (scope.flags & SCOPE_TOP)) + { delete this.undefinedExports[name]; } + } else if (bindingType === BIND_SIMPLE_CATCH) { + var scope$1 = this.currentScope(); + scope$1.lexical.push(name); + } else if (bindingType === BIND_FUNCTION) { + var scope$2 = this.currentScope(); + if (this.treatFunctionsAsVar) + { redeclared = scope$2.lexical.indexOf(name) > -1; } + else + { redeclared = scope$2.lexical.indexOf(name) > -1 || scope$2.var.indexOf(name) > -1; } + scope$2.functions.push(name); + } else { + for (var i = this.scopeStack.length - 1; i >= 0; --i) { + var scope$3 = this.scopeStack[i]; + if (scope$3.lexical.indexOf(name) > -1 && !((scope$3.flags & SCOPE_SIMPLE_CATCH) && scope$3.lexical[0] === name) || + !this.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name) > -1) { + redeclared = true; + break + } + scope$3.var.push(name); + if (this.inModule && (scope$3.flags & SCOPE_TOP)) + { delete this.undefinedExports[name]; } + if (scope$3.flags & SCOPE_VAR) { break } + } + } + if (redeclared) { this.raiseRecoverable(pos, ("Identifier '" + name + "' has already been declared")); } + }; + + pp$3.checkLocalExport = function(id) { + // scope.functions must be empty as Module code is always strict. + if (this.scopeStack[0].lexical.indexOf(id.name) === -1 && + this.scopeStack[0].var.indexOf(id.name) === -1) { + this.undefinedExports[id.name] = id; + } + }; + + pp$3.currentScope = function() { + return this.scopeStack[this.scopeStack.length - 1] + }; + + pp$3.currentVarScope = function() { + for (var i = this.scopeStack.length - 1;; i--) { + var scope = this.scopeStack[i]; + if (scope.flags & SCOPE_VAR) { return scope } + } + }; + + // Could be useful for `this`, `new.target`, `super()`, `super.property`, and `super[property]`. + pp$3.currentThisScope = function() { + for (var i = this.scopeStack.length - 1;; i--) { + var scope = this.scopeStack[i]; + if (scope.flags & SCOPE_VAR && !(scope.flags & SCOPE_ARROW)) { return scope } + } + }; + + var Node = function Node(parser, pos, loc) { + this.type = ""; + this.start = pos; + this.end = 0; + if (parser.options.locations) + { this.loc = new SourceLocation(parser, loc); } + if (parser.options.directSourceFile) + { this.sourceFile = parser.options.directSourceFile; } + if (parser.options.ranges) + { this.range = [pos, 0]; } + }; + + // Start an AST node, attaching a start offset. + + var pp$2 = Parser.prototype; + + pp$2.startNode = function() { + return new Node(this, this.start, this.startLoc) + }; + + pp$2.startNodeAt = function(pos, loc) { + return new Node(this, pos, loc) + }; + + // Finish an AST node, adding `type` and `end` properties. + + function finishNodeAt(node, type, pos, loc) { + node.type = type; + node.end = pos; + if (this.options.locations) + { node.loc.end = loc; } + if (this.options.ranges) + { node.range[1] = pos; } + return node + } + + pp$2.finishNode = function(node, type) { + return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc) + }; + + // Finish node at given position + + pp$2.finishNodeAt = function(node, type, pos, loc) { + return finishNodeAt.call(this, node, type, pos, loc) + }; + + pp$2.copyNode = function(node) { + var newNode = new Node(this, node.start, this.startLoc); + for (var prop in node) { newNode[prop] = node[prop]; } + return newNode + }; + + // This file was generated by "bin/generate-unicode-script-values.js". Do not modify manually! + var scriptValuesAddedInUnicode = "Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz"; + + // This file contains Unicode properties extracted from the ECMAScript specification. + // The lists are extracted like so: + // $$('#table-binary-unicode-properties > figure > table > tbody > tr > td:nth-child(1) code').map(el => el.innerText) + + // #table-binary-unicode-properties + var ecma9BinaryProperties = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS"; + var ecma10BinaryProperties = ecma9BinaryProperties + " Extended_Pictographic"; + var ecma11BinaryProperties = ecma10BinaryProperties; + var ecma12BinaryProperties = ecma11BinaryProperties + " EBase EComp EMod EPres ExtPict"; + var ecma13BinaryProperties = ecma12BinaryProperties; + var ecma14BinaryProperties = ecma13BinaryProperties; + + var unicodeBinaryProperties = { + 9: ecma9BinaryProperties, + 10: ecma10BinaryProperties, + 11: ecma11BinaryProperties, + 12: ecma12BinaryProperties, + 13: ecma13BinaryProperties, + 14: ecma14BinaryProperties + }; + + // #table-binary-unicode-properties-of-strings + var ecma14BinaryPropertiesOfStrings = "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"; + + var unicodeBinaryPropertiesOfStrings = { + 9: "", + 10: "", + 11: "", + 12: "", + 13: "", + 14: ecma14BinaryPropertiesOfStrings + }; + + // #table-unicode-general-category-values + var unicodeGeneralCategoryValues = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu"; + + // #table-unicode-script-values + var ecma9ScriptValues = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb"; + var ecma10ScriptValues = ecma9ScriptValues + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd"; + var ecma11ScriptValues = ecma10ScriptValues + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho"; + var ecma12ScriptValues = ecma11ScriptValues + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi"; + var ecma13ScriptValues = ecma12ScriptValues + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith"; + var ecma14ScriptValues = ecma13ScriptValues + " " + scriptValuesAddedInUnicode; + + var unicodeScriptValues = { + 9: ecma9ScriptValues, + 10: ecma10ScriptValues, + 11: ecma11ScriptValues, + 12: ecma12ScriptValues, + 13: ecma13ScriptValues, + 14: ecma14ScriptValues + }; + + var data = {}; + function buildUnicodeData(ecmaVersion) { + var d = data[ecmaVersion] = { + binary: wordsRegexp(unicodeBinaryProperties[ecmaVersion] + " " + unicodeGeneralCategoryValues), + binaryOfStrings: wordsRegexp(unicodeBinaryPropertiesOfStrings[ecmaVersion]), + nonBinary: { + General_Category: wordsRegexp(unicodeGeneralCategoryValues), + Script: wordsRegexp(unicodeScriptValues[ecmaVersion]) + } + }; + d.nonBinary.Script_Extensions = d.nonBinary.Script; + + d.nonBinary.gc = d.nonBinary.General_Category; + d.nonBinary.sc = d.nonBinary.Script; + d.nonBinary.scx = d.nonBinary.Script_Extensions; + } + + for (var i = 0, list = [9, 10, 11, 12, 13, 14]; i < list.length; i += 1) { + var ecmaVersion = list[i]; + + buildUnicodeData(ecmaVersion); + } + + var pp$1 = Parser.prototype; + + // Track disjunction structure to determine whether a duplicate + // capture group name is allowed because it is in a separate branch. + var BranchID = function BranchID(parent, base) { + // Parent disjunction branch + this.parent = parent; + // Identifies this set of sibling branches + this.base = base || this; + }; + + BranchID.prototype.separatedFrom = function separatedFrom (alt) { + // A branch is separate from another branch if they or any of + // their parents are siblings in a given disjunction + for (var self = this; self; self = self.parent) { + for (var other = alt; other; other = other.parent) { + if (self.base === other.base && self !== other) { return true } + } + } + return false + }; + + BranchID.prototype.sibling = function sibling () { + return new BranchID(this.parent, this.base) + }; + + var RegExpValidationState = function RegExpValidationState(parser) { + this.parser = parser; + this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : "") + (parser.options.ecmaVersion >= 13 ? "d" : "") + (parser.options.ecmaVersion >= 15 ? "v" : ""); + this.unicodeProperties = data[parser.options.ecmaVersion >= 14 ? 14 : parser.options.ecmaVersion]; + this.source = ""; + this.flags = ""; + this.start = 0; + this.switchU = false; + this.switchV = false; + this.switchN = false; + this.pos = 0; + this.lastIntValue = 0; + this.lastStringValue = ""; + this.lastAssertionIsQuantifiable = false; + this.numCapturingParens = 0; + this.maxBackReference = 0; + this.groupNames = Object.create(null); + this.backReferenceNames = []; + this.branchID = null; + }; + + RegExpValidationState.prototype.reset = function reset (start, pattern, flags) { + var unicodeSets = flags.indexOf("v") !== -1; + var unicode = flags.indexOf("u") !== -1; + this.start = start | 0; + this.source = pattern + ""; + this.flags = flags; + if (unicodeSets && this.parser.options.ecmaVersion >= 15) { + this.switchU = true; + this.switchV = true; + this.switchN = true; + } else { + this.switchU = unicode && this.parser.options.ecmaVersion >= 6; + this.switchV = false; + this.switchN = unicode && this.parser.options.ecmaVersion >= 9; + } + }; + + RegExpValidationState.prototype.raise = function raise (message) { + this.parser.raiseRecoverable(this.start, ("Invalid regular expression: /" + (this.source) + "/: " + message)); + }; + + // If u flag is given, this returns the code point at the index (it combines a surrogate pair). + // Otherwise, this returns the code unit of the index (can be a part of a surrogate pair). + RegExpValidationState.prototype.at = function at (i, forceU) { + if ( forceU === void 0 ) forceU = false; + + var s = this.source; + var l = s.length; + if (i >= l) { + return -1 + } + var c = s.charCodeAt(i); + if (!(forceU || this.switchU) || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) { + return c + } + var next = s.charCodeAt(i + 1); + return next >= 0xDC00 && next <= 0xDFFF ? (c << 10) + next - 0x35FDC00 : c + }; + + RegExpValidationState.prototype.nextIndex = function nextIndex (i, forceU) { + if ( forceU === void 0 ) forceU = false; + + var s = this.source; + var l = s.length; + if (i >= l) { + return l + } + var c = s.charCodeAt(i), next; + if (!(forceU || this.switchU) || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l || + (next = s.charCodeAt(i + 1)) < 0xDC00 || next > 0xDFFF) { + return i + 1 + } + return i + 2 + }; + + RegExpValidationState.prototype.current = function current (forceU) { + if ( forceU === void 0 ) forceU = false; + + return this.at(this.pos, forceU) + }; + + RegExpValidationState.prototype.lookahead = function lookahead (forceU) { + if ( forceU === void 0 ) forceU = false; + + return this.at(this.nextIndex(this.pos, forceU), forceU) + }; + + RegExpValidationState.prototype.advance = function advance (forceU) { + if ( forceU === void 0 ) forceU = false; + + this.pos = this.nextIndex(this.pos, forceU); + }; + + RegExpValidationState.prototype.eat = function eat (ch, forceU) { + if ( forceU === void 0 ) forceU = false; + + if (this.current(forceU) === ch) { + this.advance(forceU); + return true + } + return false + }; + + RegExpValidationState.prototype.eatChars = function eatChars (chs, forceU) { + if ( forceU === void 0 ) forceU = false; + + var pos = this.pos; + for (var i = 0, list = chs; i < list.length; i += 1) { + var ch = list[i]; + + var current = this.at(pos, forceU); + if (current === -1 || current !== ch) { + return false + } + pos = this.nextIndex(pos, forceU); + } + this.pos = pos; + return true + }; + + /** + * Validate the flags part of a given RegExpLiteral. + * + * @param {RegExpValidationState} state The state to validate RegExp. + * @returns {void} + */ + pp$1.validateRegExpFlags = function(state) { + var validFlags = state.validFlags; + var flags = state.flags; + + var u = false; + var v = false; + + for (var i = 0; i < flags.length; i++) { + var flag = flags.charAt(i); + if (validFlags.indexOf(flag) === -1) { + this.raise(state.start, "Invalid regular expression flag"); + } + if (flags.indexOf(flag, i + 1) > -1) { + this.raise(state.start, "Duplicate regular expression flag"); + } + if (flag === "u") { u = true; } + if (flag === "v") { v = true; } + } + if (this.options.ecmaVersion >= 15 && u && v) { + this.raise(state.start, "Invalid regular expression flag"); + } + }; + + function hasProp(obj) { + for (var _ in obj) { return true } + return false + } + + /** + * Validate the pattern part of a given RegExpLiteral. + * + * @param {RegExpValidationState} state The state to validate RegExp. + * @returns {void} + */ + pp$1.validateRegExpPattern = function(state) { + this.regexp_pattern(state); + + // The goal symbol for the parse is |Pattern[~U, ~N]|. If the result of + // parsing contains a |GroupName|, reparse with the goal symbol + // |Pattern[~U, +N]| and use this result instead. Throw a *SyntaxError* + // exception if _P_ did not conform to the grammar, if any elements of _P_ + // were not matched by the parse, or if any Early Error conditions exist. + if (!state.switchN && this.options.ecmaVersion >= 9 && hasProp(state.groupNames)) { + state.switchN = true; + this.regexp_pattern(state); + } + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-Pattern + pp$1.regexp_pattern = function(state) { + state.pos = 0; + state.lastIntValue = 0; + state.lastStringValue = ""; + state.lastAssertionIsQuantifiable = false; + state.numCapturingParens = 0; + state.maxBackReference = 0; + state.groupNames = Object.create(null); + state.backReferenceNames.length = 0; + state.branchID = null; + + this.regexp_disjunction(state); + + if (state.pos !== state.source.length) { + // Make the same messages as V8. + if (state.eat(0x29 /* ) */)) { + state.raise("Unmatched ')'"); + } + if (state.eat(0x5D /* ] */) || state.eat(0x7D /* } */)) { + state.raise("Lone quantifier brackets"); + } + } + if (state.maxBackReference > state.numCapturingParens) { + state.raise("Invalid escape"); + } + for (var i = 0, list = state.backReferenceNames; i < list.length; i += 1) { + var name = list[i]; + + if (!state.groupNames[name]) { + state.raise("Invalid named capture referenced"); + } + } + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-Disjunction + pp$1.regexp_disjunction = function(state) { + var trackDisjunction = this.options.ecmaVersion >= 16; + if (trackDisjunction) { state.branchID = new BranchID(state.branchID, null); } + this.regexp_alternative(state); + while (state.eat(0x7C /* | */)) { + if (trackDisjunction) { state.branchID = state.branchID.sibling(); } + this.regexp_alternative(state); + } + if (trackDisjunction) { state.branchID = state.branchID.parent; } + + // Make the same message as V8. + if (this.regexp_eatQuantifier(state, true)) { + state.raise("Nothing to repeat"); + } + if (state.eat(0x7B /* { */)) { + state.raise("Lone quantifier brackets"); + } + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-Alternative + pp$1.regexp_alternative = function(state) { + while (state.pos < state.source.length && this.regexp_eatTerm(state)) {} + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Term + pp$1.regexp_eatTerm = function(state) { + if (this.regexp_eatAssertion(state)) { + // Handle `QuantifiableAssertion Quantifier` alternative. + // `state.lastAssertionIsQuantifiable` is true if the last eaten Assertion + // is a QuantifiableAssertion. + if (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state)) { + // Make the same message as V8. + if (state.switchU) { + state.raise("Invalid quantifier"); + } + } + return true + } + + if (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) { + this.regexp_eatQuantifier(state); + return true + } + + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Assertion + pp$1.regexp_eatAssertion = function(state) { + var start = state.pos; + state.lastAssertionIsQuantifiable = false; + + // ^, $ + if (state.eat(0x5E /* ^ */) || state.eat(0x24 /* $ */)) { + return true + } + + // \b \B + if (state.eat(0x5C /* \ */)) { + if (state.eat(0x42 /* B */) || state.eat(0x62 /* b */)) { + return true + } + state.pos = start; + } + + // Lookahead / Lookbehind + if (state.eat(0x28 /* ( */) && state.eat(0x3F /* ? */)) { + var lookbehind = false; + if (this.options.ecmaVersion >= 9) { + lookbehind = state.eat(0x3C /* < */); + } + if (state.eat(0x3D /* = */) || state.eat(0x21 /* ! */)) { + this.regexp_disjunction(state); + if (!state.eat(0x29 /* ) */)) { + state.raise("Unterminated group"); + } + state.lastAssertionIsQuantifiable = !lookbehind; + return true + } + } + + state.pos = start; + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-Quantifier + pp$1.regexp_eatQuantifier = function(state, noError) { + if ( noError === void 0 ) noError = false; + + if (this.regexp_eatQuantifierPrefix(state, noError)) { + state.eat(0x3F /* ? */); + return true + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-QuantifierPrefix + pp$1.regexp_eatQuantifierPrefix = function(state, noError) { + return ( + state.eat(0x2A /* * */) || + state.eat(0x2B /* + */) || + state.eat(0x3F /* ? */) || + this.regexp_eatBracedQuantifier(state, noError) + ) + }; + pp$1.regexp_eatBracedQuantifier = function(state, noError) { + var start = state.pos; + if (state.eat(0x7B /* { */)) { + var min = 0, max = -1; + if (this.regexp_eatDecimalDigits(state)) { + min = state.lastIntValue; + if (state.eat(0x2C /* , */) && this.regexp_eatDecimalDigits(state)) { + max = state.lastIntValue; + } + if (state.eat(0x7D /* } */)) { + // SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-term + if (max !== -1 && max < min && !noError) { + state.raise("numbers out of order in {} quantifier"); + } + return true + } + } + if (state.switchU && !noError) { + state.raise("Incomplete quantifier"); + } + state.pos = start; + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-Atom + pp$1.regexp_eatAtom = function(state) { + return ( + this.regexp_eatPatternCharacters(state) || + state.eat(0x2E /* . */) || + this.regexp_eatReverseSolidusAtomEscape(state) || + this.regexp_eatCharacterClass(state) || + this.regexp_eatUncapturingGroup(state) || + this.regexp_eatCapturingGroup(state) + ) + }; + pp$1.regexp_eatReverseSolidusAtomEscape = function(state) { + var start = state.pos; + if (state.eat(0x5C /* \ */)) { + if (this.regexp_eatAtomEscape(state)) { + return true + } + state.pos = start; + } + return false + }; + pp$1.regexp_eatUncapturingGroup = function(state) { + var start = state.pos; + if (state.eat(0x28 /* ( */)) { + if (state.eat(0x3F /* ? */)) { + if (this.options.ecmaVersion >= 16) { + var addModifiers = this.regexp_eatModifiers(state); + var hasHyphen = state.eat(0x2D /* - */); + if (addModifiers || hasHyphen) { + for (var i = 0; i < addModifiers.length; i++) { + var modifier = addModifiers.charAt(i); + if (addModifiers.indexOf(modifier, i + 1) > -1) { + state.raise("Duplicate regular expression modifiers"); + } + } + if (hasHyphen) { + var removeModifiers = this.regexp_eatModifiers(state); + if (!addModifiers && !removeModifiers && state.current() === 0x3A /* : */) { + state.raise("Invalid regular expression modifiers"); + } + for (var i$1 = 0; i$1 < removeModifiers.length; i$1++) { + var modifier$1 = removeModifiers.charAt(i$1); + if ( + removeModifiers.indexOf(modifier$1, i$1 + 1) > -1 || + addModifiers.indexOf(modifier$1) > -1 + ) { + state.raise("Duplicate regular expression modifiers"); + } + } + } + } + } + if (state.eat(0x3A /* : */)) { + this.regexp_disjunction(state); + if (state.eat(0x29 /* ) */)) { + return true + } + state.raise("Unterminated group"); + } + } + state.pos = start; + } + return false + }; + pp$1.regexp_eatCapturingGroup = function(state) { + if (state.eat(0x28 /* ( */)) { + if (this.options.ecmaVersion >= 9) { + this.regexp_groupSpecifier(state); + } else if (state.current() === 0x3F /* ? */) { + state.raise("Invalid group"); + } + this.regexp_disjunction(state); + if (state.eat(0x29 /* ) */)) { + state.numCapturingParens += 1; + return true + } + state.raise("Unterminated group"); + } + return false + }; + // RegularExpressionModifiers :: + // [empty] + // RegularExpressionModifiers RegularExpressionModifier + pp$1.regexp_eatModifiers = function(state) { + var modifiers = ""; + var ch = 0; + while ((ch = state.current()) !== -1 && isRegularExpressionModifier(ch)) { + modifiers += codePointToString(ch); + state.advance(); + } + return modifiers + }; + // RegularExpressionModifier :: one of + // `i` `m` `s` + function isRegularExpressionModifier(ch) { + return ch === 0x69 /* i */ || ch === 0x6d /* m */ || ch === 0x73 /* s */ + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedAtom + pp$1.regexp_eatExtendedAtom = function(state) { + return ( + state.eat(0x2E /* . */) || + this.regexp_eatReverseSolidusAtomEscape(state) || + this.regexp_eatCharacterClass(state) || + this.regexp_eatUncapturingGroup(state) || + this.regexp_eatCapturingGroup(state) || + this.regexp_eatInvalidBracedQuantifier(state) || + this.regexp_eatExtendedPatternCharacter(state) + ) + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-InvalidBracedQuantifier + pp$1.regexp_eatInvalidBracedQuantifier = function(state) { + if (this.regexp_eatBracedQuantifier(state, true)) { + state.raise("Nothing to repeat"); + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-SyntaxCharacter + pp$1.regexp_eatSyntaxCharacter = function(state) { + var ch = state.current(); + if (isSyntaxCharacter(ch)) { + state.lastIntValue = ch; + state.advance(); + return true + } + return false + }; + function isSyntaxCharacter(ch) { + return ( + ch === 0x24 /* $ */ || + ch >= 0x28 /* ( */ && ch <= 0x2B /* + */ || + ch === 0x2E /* . */ || + ch === 0x3F /* ? */ || + ch >= 0x5B /* [ */ && ch <= 0x5E /* ^ */ || + ch >= 0x7B /* { */ && ch <= 0x7D /* } */ + ) + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-PatternCharacter + // But eat eager. + pp$1.regexp_eatPatternCharacters = function(state) { + var start = state.pos; + var ch = 0; + while ((ch = state.current()) !== -1 && !isSyntaxCharacter(ch)) { + state.advance(); + } + return state.pos !== start + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedPatternCharacter + pp$1.regexp_eatExtendedPatternCharacter = function(state) { + var ch = state.current(); + if ( + ch !== -1 && + ch !== 0x24 /* $ */ && + !(ch >= 0x28 /* ( */ && ch <= 0x2B /* + */) && + ch !== 0x2E /* . */ && + ch !== 0x3F /* ? */ && + ch !== 0x5B /* [ */ && + ch !== 0x5E /* ^ */ && + ch !== 0x7C /* | */ + ) { + state.advance(); + return true + } + return false + }; + + // GroupSpecifier :: + // [empty] + // `?` GroupName + pp$1.regexp_groupSpecifier = function(state) { + if (state.eat(0x3F /* ? */)) { + if (!this.regexp_eatGroupName(state)) { state.raise("Invalid group"); } + var trackDisjunction = this.options.ecmaVersion >= 16; + var known = state.groupNames[state.lastStringValue]; + if (known) { + if (trackDisjunction) { + for (var i = 0, list = known; i < list.length; i += 1) { + var altID = list[i]; + + if (!altID.separatedFrom(state.branchID)) + { state.raise("Duplicate capture group name"); } + } + } else { + state.raise("Duplicate capture group name"); + } + } + if (trackDisjunction) { + (known || (state.groupNames[state.lastStringValue] = [])).push(state.branchID); + } else { + state.groupNames[state.lastStringValue] = true; + } + } + }; + + // GroupName :: + // `<` RegExpIdentifierName `>` + // Note: this updates `state.lastStringValue` property with the eaten name. + pp$1.regexp_eatGroupName = function(state) { + state.lastStringValue = ""; + if (state.eat(0x3C /* < */)) { + if (this.regexp_eatRegExpIdentifierName(state) && state.eat(0x3E /* > */)) { + return true + } + state.raise("Invalid capture group name"); + } + return false + }; + + // RegExpIdentifierName :: + // RegExpIdentifierStart + // RegExpIdentifierName RegExpIdentifierPart + // Note: this updates `state.lastStringValue` property with the eaten name. + pp$1.regexp_eatRegExpIdentifierName = function(state) { + state.lastStringValue = ""; + if (this.regexp_eatRegExpIdentifierStart(state)) { + state.lastStringValue += codePointToString(state.lastIntValue); + while (this.regexp_eatRegExpIdentifierPart(state)) { + state.lastStringValue += codePointToString(state.lastIntValue); + } + return true + } + return false + }; + + // RegExpIdentifierStart :: + // UnicodeIDStart + // `$` + // `_` + // `\` RegExpUnicodeEscapeSequence[+U] + pp$1.regexp_eatRegExpIdentifierStart = function(state) { + var start = state.pos; + var forceU = this.options.ecmaVersion >= 11; + var ch = state.current(forceU); + state.advance(forceU); + + if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) { + ch = state.lastIntValue; + } + if (isRegExpIdentifierStart(ch)) { + state.lastIntValue = ch; + return true + } + + state.pos = start; + return false + }; + function isRegExpIdentifierStart(ch) { + return isIdentifierStart(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ + } + + // RegExpIdentifierPart :: + // UnicodeIDContinue + // `$` + // `_` + // `\` RegExpUnicodeEscapeSequence[+U] + // + // + pp$1.regexp_eatRegExpIdentifierPart = function(state) { + var start = state.pos; + var forceU = this.options.ecmaVersion >= 11; + var ch = state.current(forceU); + state.advance(forceU); + + if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) { + ch = state.lastIntValue; + } + if (isRegExpIdentifierPart(ch)) { + state.lastIntValue = ch; + return true + } + + state.pos = start; + return false + }; + function isRegExpIdentifierPart(ch) { + return isIdentifierChar(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ || ch === 0x200C /* */ || ch === 0x200D /* */ + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-AtomEscape + pp$1.regexp_eatAtomEscape = function(state) { + if ( + this.regexp_eatBackReference(state) || + this.regexp_eatCharacterClassEscape(state) || + this.regexp_eatCharacterEscape(state) || + (state.switchN && this.regexp_eatKGroupName(state)) + ) { + return true + } + if (state.switchU) { + // Make the same message as V8. + if (state.current() === 0x63 /* c */) { + state.raise("Invalid unicode escape"); + } + state.raise("Invalid escape"); + } + return false + }; + pp$1.regexp_eatBackReference = function(state) { + var start = state.pos; + if (this.regexp_eatDecimalEscape(state)) { + var n = state.lastIntValue; + if (state.switchU) { + // For SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-atomescape + if (n > state.maxBackReference) { + state.maxBackReference = n; + } + return true + } + if (n <= state.numCapturingParens) { + return true + } + state.pos = start; + } + return false + }; + pp$1.regexp_eatKGroupName = function(state) { + if (state.eat(0x6B /* k */)) { + if (this.regexp_eatGroupName(state)) { + state.backReferenceNames.push(state.lastStringValue); + return true + } + state.raise("Invalid named reference"); + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-CharacterEscape + pp$1.regexp_eatCharacterEscape = function(state) { + return ( + this.regexp_eatControlEscape(state) || + this.regexp_eatCControlLetter(state) || + this.regexp_eatZero(state) || + this.regexp_eatHexEscapeSequence(state) || + this.regexp_eatRegExpUnicodeEscapeSequence(state, false) || + (!state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state)) || + this.regexp_eatIdentityEscape(state) + ) + }; + pp$1.regexp_eatCControlLetter = function(state) { + var start = state.pos; + if (state.eat(0x63 /* c */)) { + if (this.regexp_eatControlLetter(state)) { + return true + } + state.pos = start; + } + return false + }; + pp$1.regexp_eatZero = function(state) { + if (state.current() === 0x30 /* 0 */ && !isDecimalDigit(state.lookahead())) { + state.lastIntValue = 0; + state.advance(); + return true + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-ControlEscape + pp$1.regexp_eatControlEscape = function(state) { + var ch = state.current(); + if (ch === 0x74 /* t */) { + state.lastIntValue = 0x09; /* \t */ + state.advance(); + return true + } + if (ch === 0x6E /* n */) { + state.lastIntValue = 0x0A; /* \n */ + state.advance(); + return true + } + if (ch === 0x76 /* v */) { + state.lastIntValue = 0x0B; /* \v */ + state.advance(); + return true + } + if (ch === 0x66 /* f */) { + state.lastIntValue = 0x0C; /* \f */ + state.advance(); + return true + } + if (ch === 0x72 /* r */) { + state.lastIntValue = 0x0D; /* \r */ + state.advance(); + return true + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-ControlLetter + pp$1.regexp_eatControlLetter = function(state) { + var ch = state.current(); + if (isControlLetter(ch)) { + state.lastIntValue = ch % 0x20; + state.advance(); + return true + } + return false + }; + function isControlLetter(ch) { + return ( + (ch >= 0x41 /* A */ && ch <= 0x5A /* Z */) || + (ch >= 0x61 /* a */ && ch <= 0x7A /* z */) + ) + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-RegExpUnicodeEscapeSequence + pp$1.regexp_eatRegExpUnicodeEscapeSequence = function(state, forceU) { + if ( forceU === void 0 ) forceU = false; + + var start = state.pos; + var switchU = forceU || state.switchU; + + if (state.eat(0x75 /* u */)) { + if (this.regexp_eatFixedHexDigits(state, 4)) { + var lead = state.lastIntValue; + if (switchU && lead >= 0xD800 && lead <= 0xDBFF) { + var leadSurrogateEnd = state.pos; + if (state.eat(0x5C /* \ */) && state.eat(0x75 /* u */) && this.regexp_eatFixedHexDigits(state, 4)) { + var trail = state.lastIntValue; + if (trail >= 0xDC00 && trail <= 0xDFFF) { + state.lastIntValue = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; + return true + } + } + state.pos = leadSurrogateEnd; + state.lastIntValue = lead; + } + return true + } + if ( + switchU && + state.eat(0x7B /* { */) && + this.regexp_eatHexDigits(state) && + state.eat(0x7D /* } */) && + isValidUnicode(state.lastIntValue) + ) { + return true + } + if (switchU) { + state.raise("Invalid unicode escape"); + } + state.pos = start; + } + + return false + }; + function isValidUnicode(ch) { + return ch >= 0 && ch <= 0x10FFFF + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-IdentityEscape + pp$1.regexp_eatIdentityEscape = function(state) { + if (state.switchU) { + if (this.regexp_eatSyntaxCharacter(state)) { + return true + } + if (state.eat(0x2F /* / */)) { + state.lastIntValue = 0x2F; /* / */ + return true + } + return false + } + + var ch = state.current(); + if (ch !== 0x63 /* c */ && (!state.switchN || ch !== 0x6B /* k */)) { + state.lastIntValue = ch; + state.advance(); + return true + } + + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalEscape + pp$1.regexp_eatDecimalEscape = function(state) { + state.lastIntValue = 0; + var ch = state.current(); + if (ch >= 0x31 /* 1 */ && ch <= 0x39 /* 9 */) { + do { + state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */); + state.advance(); + } while ((ch = state.current()) >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) + return true + } + return false + }; + + // Return values used by character set parsing methods, needed to + // forbid negation of sets that can match strings. + var CharSetNone = 0; // Nothing parsed + var CharSetOk = 1; // Construct parsed, cannot contain strings + var CharSetString = 2; // Construct parsed, can contain strings + + // https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClassEscape + pp$1.regexp_eatCharacterClassEscape = function(state) { + var ch = state.current(); + + if (isCharacterClassEscape(ch)) { + state.lastIntValue = -1; + state.advance(); + return CharSetOk + } + + var negate = false; + if ( + state.switchU && + this.options.ecmaVersion >= 9 && + ((negate = ch === 0x50 /* P */) || ch === 0x70 /* p */) + ) { + state.lastIntValue = -1; + state.advance(); + var result; + if ( + state.eat(0x7B /* { */) && + (result = this.regexp_eatUnicodePropertyValueExpression(state)) && + state.eat(0x7D /* } */) + ) { + if (negate && result === CharSetString) { state.raise("Invalid property name"); } + return result + } + state.raise("Invalid property name"); + } + + return CharSetNone + }; + + function isCharacterClassEscape(ch) { + return ( + ch === 0x64 /* d */ || + ch === 0x44 /* D */ || + ch === 0x73 /* s */ || + ch === 0x53 /* S */ || + ch === 0x77 /* w */ || + ch === 0x57 /* W */ + ) + } + + // UnicodePropertyValueExpression :: + // UnicodePropertyName `=` UnicodePropertyValue + // LoneUnicodePropertyNameOrValue + pp$1.regexp_eatUnicodePropertyValueExpression = function(state) { + var start = state.pos; + + // UnicodePropertyName `=` UnicodePropertyValue + if (this.regexp_eatUnicodePropertyName(state) && state.eat(0x3D /* = */)) { + var name = state.lastStringValue; + if (this.regexp_eatUnicodePropertyValue(state)) { + var value = state.lastStringValue; + this.regexp_validateUnicodePropertyNameAndValue(state, name, value); + return CharSetOk + } + } + state.pos = start; + + // LoneUnicodePropertyNameOrValue + if (this.regexp_eatLoneUnicodePropertyNameOrValue(state)) { + var nameOrValue = state.lastStringValue; + return this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue) + } + return CharSetNone + }; + + pp$1.regexp_validateUnicodePropertyNameAndValue = function(state, name, value) { + if (!hasOwn(state.unicodeProperties.nonBinary, name)) + { state.raise("Invalid property name"); } + if (!state.unicodeProperties.nonBinary[name].test(value)) + { state.raise("Invalid property value"); } + }; + + pp$1.regexp_validateUnicodePropertyNameOrValue = function(state, nameOrValue) { + if (state.unicodeProperties.binary.test(nameOrValue)) { return CharSetOk } + if (state.switchV && state.unicodeProperties.binaryOfStrings.test(nameOrValue)) { return CharSetString } + state.raise("Invalid property name"); + }; + + // UnicodePropertyName :: + // UnicodePropertyNameCharacters + pp$1.regexp_eatUnicodePropertyName = function(state) { + var ch = 0; + state.lastStringValue = ""; + while (isUnicodePropertyNameCharacter(ch = state.current())) { + state.lastStringValue += codePointToString(ch); + state.advance(); + } + return state.lastStringValue !== "" + }; + + function isUnicodePropertyNameCharacter(ch) { + return isControlLetter(ch) || ch === 0x5F /* _ */ + } + + // UnicodePropertyValue :: + // UnicodePropertyValueCharacters + pp$1.regexp_eatUnicodePropertyValue = function(state) { + var ch = 0; + state.lastStringValue = ""; + while (isUnicodePropertyValueCharacter(ch = state.current())) { + state.lastStringValue += codePointToString(ch); + state.advance(); + } + return state.lastStringValue !== "" + }; + function isUnicodePropertyValueCharacter(ch) { + return isUnicodePropertyNameCharacter(ch) || isDecimalDigit(ch) + } + + // LoneUnicodePropertyNameOrValue :: + // UnicodePropertyValueCharacters + pp$1.regexp_eatLoneUnicodePropertyNameOrValue = function(state) { + return this.regexp_eatUnicodePropertyValue(state) + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClass + pp$1.regexp_eatCharacterClass = function(state) { + if (state.eat(0x5B /* [ */)) { + var negate = state.eat(0x5E /* ^ */); + var result = this.regexp_classContents(state); + if (!state.eat(0x5D /* ] */)) + { state.raise("Unterminated character class"); } + if (negate && result === CharSetString) + { state.raise("Negated character class may contain strings"); } + return true + } + return false + }; + + // https://tc39.es/ecma262/#prod-ClassContents + // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassRanges + pp$1.regexp_classContents = function(state) { + if (state.current() === 0x5D /* ] */) { return CharSetOk } + if (state.switchV) { return this.regexp_classSetExpression(state) } + this.regexp_nonEmptyClassRanges(state); + return CharSetOk + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRanges + // https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRangesNoDash + pp$1.regexp_nonEmptyClassRanges = function(state) { + while (this.regexp_eatClassAtom(state)) { + var left = state.lastIntValue; + if (state.eat(0x2D /* - */) && this.regexp_eatClassAtom(state)) { + var right = state.lastIntValue; + if (state.switchU && (left === -1 || right === -1)) { + state.raise("Invalid character class"); + } + if (left !== -1 && right !== -1 && left > right) { + state.raise("Range out of order in character class"); + } + } + } + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtom + // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtomNoDash + pp$1.regexp_eatClassAtom = function(state) { + var start = state.pos; + + if (state.eat(0x5C /* \ */)) { + if (this.regexp_eatClassEscape(state)) { + return true + } + if (state.switchU) { + // Make the same message as V8. + var ch$1 = state.current(); + if (ch$1 === 0x63 /* c */ || isOctalDigit(ch$1)) { + state.raise("Invalid class escape"); + } + state.raise("Invalid escape"); + } + state.pos = start; + } + + var ch = state.current(); + if (ch !== 0x5D /* ] */) { + state.lastIntValue = ch; + state.advance(); + return true + } + + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassEscape + pp$1.regexp_eatClassEscape = function(state) { + var start = state.pos; + + if (state.eat(0x62 /* b */)) { + state.lastIntValue = 0x08; /* */ + return true + } + + if (state.switchU && state.eat(0x2D /* - */)) { + state.lastIntValue = 0x2D; /* - */ + return true + } + + if (!state.switchU && state.eat(0x63 /* c */)) { + if (this.regexp_eatClassControlLetter(state)) { + return true + } + state.pos = start; + } + + return ( + this.regexp_eatCharacterClassEscape(state) || + this.regexp_eatCharacterEscape(state) + ) + }; + + // https://tc39.es/ecma262/#prod-ClassSetExpression + // https://tc39.es/ecma262/#prod-ClassUnion + // https://tc39.es/ecma262/#prod-ClassIntersection + // https://tc39.es/ecma262/#prod-ClassSubtraction + pp$1.regexp_classSetExpression = function(state) { + var result = CharSetOk, subResult; + if (this.regexp_eatClassSetRange(state)) ; else if (subResult = this.regexp_eatClassSetOperand(state)) { + if (subResult === CharSetString) { result = CharSetString; } + // https://tc39.es/ecma262/#prod-ClassIntersection + var start = state.pos; + while (state.eatChars([0x26, 0x26] /* && */)) { + if ( + state.current() !== 0x26 /* & */ && + (subResult = this.regexp_eatClassSetOperand(state)) + ) { + if (subResult !== CharSetString) { result = CharSetOk; } + continue + } + state.raise("Invalid character in character class"); + } + if (start !== state.pos) { return result } + // https://tc39.es/ecma262/#prod-ClassSubtraction + while (state.eatChars([0x2D, 0x2D] /* -- */)) { + if (this.regexp_eatClassSetOperand(state)) { continue } + state.raise("Invalid character in character class"); + } + if (start !== state.pos) { return result } + } else { + state.raise("Invalid character in character class"); + } + // https://tc39.es/ecma262/#prod-ClassUnion + for (;;) { + if (this.regexp_eatClassSetRange(state)) { continue } + subResult = this.regexp_eatClassSetOperand(state); + if (!subResult) { return result } + if (subResult === CharSetString) { result = CharSetString; } + } + }; + + // https://tc39.es/ecma262/#prod-ClassSetRange + pp$1.regexp_eatClassSetRange = function(state) { + var start = state.pos; + if (this.regexp_eatClassSetCharacter(state)) { + var left = state.lastIntValue; + if (state.eat(0x2D /* - */) && this.regexp_eatClassSetCharacter(state)) { + var right = state.lastIntValue; + if (left !== -1 && right !== -1 && left > right) { + state.raise("Range out of order in character class"); + } + return true + } + state.pos = start; + } + return false + }; + + // https://tc39.es/ecma262/#prod-ClassSetOperand + pp$1.regexp_eatClassSetOperand = function(state) { + if (this.regexp_eatClassSetCharacter(state)) { return CharSetOk } + return this.regexp_eatClassStringDisjunction(state) || this.regexp_eatNestedClass(state) + }; + + // https://tc39.es/ecma262/#prod-NestedClass + pp$1.regexp_eatNestedClass = function(state) { + var start = state.pos; + if (state.eat(0x5B /* [ */)) { + var negate = state.eat(0x5E /* ^ */); + var result = this.regexp_classContents(state); + if (state.eat(0x5D /* ] */)) { + if (negate && result === CharSetString) { + state.raise("Negated character class may contain strings"); + } + return result + } + state.pos = start; + } + if (state.eat(0x5C /* \ */)) { + var result$1 = this.regexp_eatCharacterClassEscape(state); + if (result$1) { + return result$1 + } + state.pos = start; + } + return null + }; + + // https://tc39.es/ecma262/#prod-ClassStringDisjunction + pp$1.regexp_eatClassStringDisjunction = function(state) { + var start = state.pos; + if (state.eatChars([0x5C, 0x71] /* \q */)) { + if (state.eat(0x7B /* { */)) { + var result = this.regexp_classStringDisjunctionContents(state); + if (state.eat(0x7D /* } */)) { + return result + } + } else { + // Make the same message as V8. + state.raise("Invalid escape"); + } + state.pos = start; + } + return null + }; + + // https://tc39.es/ecma262/#prod-ClassStringDisjunctionContents + pp$1.regexp_classStringDisjunctionContents = function(state) { + var result = this.regexp_classString(state); + while (state.eat(0x7C /* | */)) { + if (this.regexp_classString(state) === CharSetString) { result = CharSetString; } + } + return result + }; + + // https://tc39.es/ecma262/#prod-ClassString + // https://tc39.es/ecma262/#prod-NonEmptyClassString + pp$1.regexp_classString = function(state) { + var count = 0; + while (this.regexp_eatClassSetCharacter(state)) { count++; } + return count === 1 ? CharSetOk : CharSetString + }; + + // https://tc39.es/ecma262/#prod-ClassSetCharacter + pp$1.regexp_eatClassSetCharacter = function(state) { + var start = state.pos; + if (state.eat(0x5C /* \ */)) { + if ( + this.regexp_eatCharacterEscape(state) || + this.regexp_eatClassSetReservedPunctuator(state) + ) { + return true + } + if (state.eat(0x62 /* b */)) { + state.lastIntValue = 0x08; /* */ + return true + } + state.pos = start; + return false + } + var ch = state.current(); + if (ch < 0 || ch === state.lookahead() && isClassSetReservedDoublePunctuatorCharacter(ch)) { return false } + if (isClassSetSyntaxCharacter(ch)) { return false } + state.advance(); + state.lastIntValue = ch; + return true + }; + + // https://tc39.es/ecma262/#prod-ClassSetReservedDoublePunctuator + function isClassSetReservedDoublePunctuatorCharacter(ch) { + return ( + ch === 0x21 /* ! */ || + ch >= 0x23 /* # */ && ch <= 0x26 /* & */ || + ch >= 0x2A /* * */ && ch <= 0x2C /* , */ || + ch === 0x2E /* . */ || + ch >= 0x3A /* : */ && ch <= 0x40 /* @ */ || + ch === 0x5E /* ^ */ || + ch === 0x60 /* ` */ || + ch === 0x7E /* ~ */ + ) + } + + // https://tc39.es/ecma262/#prod-ClassSetSyntaxCharacter + function isClassSetSyntaxCharacter(ch) { + return ( + ch === 0x28 /* ( */ || + ch === 0x29 /* ) */ || + ch === 0x2D /* - */ || + ch === 0x2F /* / */ || + ch >= 0x5B /* [ */ && ch <= 0x5D /* ] */ || + ch >= 0x7B /* { */ && ch <= 0x7D /* } */ + ) + } + + // https://tc39.es/ecma262/#prod-ClassSetReservedPunctuator + pp$1.regexp_eatClassSetReservedPunctuator = function(state) { + var ch = state.current(); + if (isClassSetReservedPunctuator(ch)) { + state.lastIntValue = ch; + state.advance(); + return true + } + return false + }; + + // https://tc39.es/ecma262/#prod-ClassSetReservedPunctuator + function isClassSetReservedPunctuator(ch) { + return ( + ch === 0x21 /* ! */ || + ch === 0x23 /* # */ || + ch === 0x25 /* % */ || + ch === 0x26 /* & */ || + ch === 0x2C /* , */ || + ch === 0x2D /* - */ || + ch >= 0x3A /* : */ && ch <= 0x3E /* > */ || + ch === 0x40 /* @ */ || + ch === 0x60 /* ` */ || + ch === 0x7E /* ~ */ + ) + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassControlLetter + pp$1.regexp_eatClassControlLetter = function(state) { + var ch = state.current(); + if (isDecimalDigit(ch) || ch === 0x5F /* _ */) { + state.lastIntValue = ch % 0x20; + state.advance(); + return true + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence + pp$1.regexp_eatHexEscapeSequence = function(state) { + var start = state.pos; + if (state.eat(0x78 /* x */)) { + if (this.regexp_eatFixedHexDigits(state, 2)) { + return true + } + if (state.switchU) { + state.raise("Invalid escape"); + } + state.pos = start; + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalDigits + pp$1.regexp_eatDecimalDigits = function(state) { + var start = state.pos; + var ch = 0; + state.lastIntValue = 0; + while (isDecimalDigit(ch = state.current())) { + state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */); + state.advance(); + } + return state.pos !== start + }; + function isDecimalDigit(ch) { + return ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */ + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigits + pp$1.regexp_eatHexDigits = function(state) { + var start = state.pos; + var ch = 0; + state.lastIntValue = 0; + while (isHexDigit(ch = state.current())) { + state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); + state.advance(); + } + return state.pos !== start + }; + function isHexDigit(ch) { + return ( + (ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) || + (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) || + (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) + ) + } + function hexToInt(ch) { + if (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) { + return 10 + (ch - 0x41 /* A */) + } + if (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) { + return 10 + (ch - 0x61 /* a */) + } + return ch - 0x30 /* 0 */ + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-LegacyOctalEscapeSequence + // Allows only 0-377(octal) i.e. 0-255(decimal). + pp$1.regexp_eatLegacyOctalEscapeSequence = function(state) { + if (this.regexp_eatOctalDigit(state)) { + var n1 = state.lastIntValue; + if (this.regexp_eatOctalDigit(state)) { + var n2 = state.lastIntValue; + if (n1 <= 3 && this.regexp_eatOctalDigit(state)) { + state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue; + } else { + state.lastIntValue = n1 * 8 + n2; + } + } else { + state.lastIntValue = n1; + } + return true + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-OctalDigit + pp$1.regexp_eatOctalDigit = function(state) { + var ch = state.current(); + if (isOctalDigit(ch)) { + state.lastIntValue = ch - 0x30; /* 0 */ + state.advance(); + return true + } + state.lastIntValue = 0; + return false + }; + function isOctalDigit(ch) { + return ch >= 0x30 /* 0 */ && ch <= 0x37 /* 7 */ + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-Hex4Digits + // https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigit + // And HexDigit HexDigit in https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence + pp$1.regexp_eatFixedHexDigits = function(state, length) { + var start = state.pos; + state.lastIntValue = 0; + for (var i = 0; i < length; ++i) { + var ch = state.current(); + if (!isHexDigit(ch)) { + state.pos = start; + return false + } + state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); + state.advance(); + } + return true + }; + + // Object type used to represent tokens. Note that normally, tokens + // simply exist as properties on the parser object. This is only + // used for the onToken callback and the external tokenizer. + + var Token = function Token(p) { + this.type = p.type; + this.value = p.value; + this.start = p.start; + this.end = p.end; + if (p.options.locations) + { this.loc = new SourceLocation(p, p.startLoc, p.endLoc); } + if (p.options.ranges) + { this.range = [p.start, p.end]; } + }; + + // ## Tokenizer + + var pp = Parser.prototype; + + // Move to the next token + + pp.next = function(ignoreEscapeSequenceInKeyword) { + if (!ignoreEscapeSequenceInKeyword && this.type.keyword && this.containsEsc) + { this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword); } + if (this.options.onToken) + { this.options.onToken(new Token(this)); } + + this.lastTokEnd = this.end; + this.lastTokStart = this.start; + this.lastTokEndLoc = this.endLoc; + this.lastTokStartLoc = this.startLoc; + this.nextToken(); + }; + + pp.getToken = function() { + this.next(); + return new Token(this) + }; + + // If we're in an ES6 environment, make parsers iterable + if (typeof Symbol !== "undefined") + { pp[Symbol.iterator] = function() { + var this$1$1 = this; + + return { + next: function () { + var token = this$1$1.getToken(); + return { + done: token.type === types$1.eof, + value: token + } + } + } + }; } + + // Toggle strict mode. Re-reads the next number or string to please + // pedantic tests (`"use strict"; 010;` should fail). + + // Read a single token, updating the parser object's token-related + // properties. + + pp.nextToken = function() { + var curContext = this.curContext(); + if (!curContext || !curContext.preserveSpace) { this.skipSpace(); } + + this.start = this.pos; + if (this.options.locations) { this.startLoc = this.curPosition(); } + if (this.pos >= this.input.length) { return this.finishToken(types$1.eof) } + + if (curContext.override) { return curContext.override(this) } + else { this.readToken(this.fullCharCodeAtPos()); } + }; + + pp.readToken = function(code) { + // Identifier or keyword. '\uXXXX' sequences are allowed in + // identifiers, so '\' also dispatches to that. + if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) + { return this.readWord() } + + return this.getTokenFromCode(code) + }; + + pp.fullCharCodeAtPos = function() { + var code = this.input.charCodeAt(this.pos); + if (code <= 0xd7ff || code >= 0xdc00) { return code } + var next = this.input.charCodeAt(this.pos + 1); + return next <= 0xdbff || next >= 0xe000 ? code : (code << 10) + next - 0x35fdc00 + }; + + pp.skipBlockComment = function() { + var startLoc = this.options.onComment && this.curPosition(); + var start = this.pos, end = this.input.indexOf("*/", this.pos += 2); + if (end === -1) { this.raise(this.pos - 2, "Unterminated comment"); } + this.pos = end + 2; + if (this.options.locations) { + for (var nextBreak = (void 0), pos = start; (nextBreak = nextLineBreak(this.input, pos, this.pos)) > -1;) { + ++this.curLine; + pos = this.lineStart = nextBreak; + } + } + if (this.options.onComment) + { this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, + startLoc, this.curPosition()); } + }; + + pp.skipLineComment = function(startSkip) { + var start = this.pos; + var startLoc = this.options.onComment && this.curPosition(); + var ch = this.input.charCodeAt(this.pos += startSkip); + while (this.pos < this.input.length && !isNewLine(ch)) { + ch = this.input.charCodeAt(++this.pos); + } + if (this.options.onComment) + { this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, + startLoc, this.curPosition()); } + }; + + // Called at the start of the parse and after every token. Skips + // whitespace and comments, and. + + pp.skipSpace = function() { + loop: while (this.pos < this.input.length) { + var ch = this.input.charCodeAt(this.pos); + switch (ch) { + case 32: case 160: // ' ' + ++this.pos; + break + case 13: + if (this.input.charCodeAt(this.pos + 1) === 10) { + ++this.pos; + } + case 10: case 8232: case 8233: + ++this.pos; + if (this.options.locations) { + ++this.curLine; + this.lineStart = this.pos; + } + break + case 47: // '/' + switch (this.input.charCodeAt(this.pos + 1)) { + case 42: // '*' + this.skipBlockComment(); + break + case 47: + this.skipLineComment(2); + break + default: + break loop + } + break + default: + if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { + ++this.pos; + } else { + break loop + } + } + } + }; + + // Called at the end of every token. Sets `end`, `val`, and + // maintains `context` and `exprAllowed`, and skips the space after + // the token, so that the next one's `start` will point at the + // right position. + + pp.finishToken = function(type, val) { + this.end = this.pos; + if (this.options.locations) { this.endLoc = this.curPosition(); } + var prevType = this.type; + this.type = type; + this.value = val; + + this.updateContext(prevType); + }; + + // ### Token reading + + // This is the function that is called to fetch the next token. It + // is somewhat obscure, because it works in character codes rather + // than characters, and because operator parsing has been inlined + // into it. + // + // All in the name of speed. + // + pp.readToken_dot = function() { + var next = this.input.charCodeAt(this.pos + 1); + if (next >= 48 && next <= 57) { return this.readNumber(true) } + var next2 = this.input.charCodeAt(this.pos + 2); + if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { // 46 = dot '.' + this.pos += 3; + return this.finishToken(types$1.ellipsis) + } else { + ++this.pos; + return this.finishToken(types$1.dot) + } + }; + + pp.readToken_slash = function() { // '/' + var next = this.input.charCodeAt(this.pos + 1); + if (this.exprAllowed) { ++this.pos; return this.readRegexp() } + if (next === 61) { return this.finishOp(types$1.assign, 2) } + return this.finishOp(types$1.slash, 1) + }; + + pp.readToken_mult_modulo_exp = function(code) { // '%*' + var next = this.input.charCodeAt(this.pos + 1); + var size = 1; + var tokentype = code === 42 ? types$1.star : types$1.modulo; + + // exponentiation operator ** and **= + if (this.options.ecmaVersion >= 7 && code === 42 && next === 42) { + ++size; + tokentype = types$1.starstar; + next = this.input.charCodeAt(this.pos + 2); + } + + if (next === 61) { return this.finishOp(types$1.assign, size + 1) } + return this.finishOp(tokentype, size) + }; + + pp.readToken_pipe_amp = function(code) { // '|&' + var next = this.input.charCodeAt(this.pos + 1); + if (next === code) { + if (this.options.ecmaVersion >= 12) { + var next2 = this.input.charCodeAt(this.pos + 2); + if (next2 === 61) { return this.finishOp(types$1.assign, 3) } + } + return this.finishOp(code === 124 ? types$1.logicalOR : types$1.logicalAND, 2) + } + if (next === 61) { return this.finishOp(types$1.assign, 2) } + return this.finishOp(code === 124 ? types$1.bitwiseOR : types$1.bitwiseAND, 1) + }; + + pp.readToken_caret = function() { // '^' + var next = this.input.charCodeAt(this.pos + 1); + if (next === 61) { return this.finishOp(types$1.assign, 2) } + return this.finishOp(types$1.bitwiseXOR, 1) + }; + + pp.readToken_plus_min = function(code) { // '+-' + var next = this.input.charCodeAt(this.pos + 1); + if (next === code) { + if (next === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && + (this.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.lastTokEnd, this.pos)))) { + // A `-->` line comment + this.skipLineComment(3); + this.skipSpace(); + return this.nextToken() + } + return this.finishOp(types$1.incDec, 2) + } + if (next === 61) { return this.finishOp(types$1.assign, 2) } + return this.finishOp(types$1.plusMin, 1) + }; + + pp.readToken_lt_gt = function(code) { // '<>' + var next = this.input.charCodeAt(this.pos + 1); + var size = 1; + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; + if (this.input.charCodeAt(this.pos + size) === 61) { return this.finishOp(types$1.assign, size + 1) } + return this.finishOp(types$1.bitShift, size) + } + if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && + this.input.charCodeAt(this.pos + 3) === 45) { + // `` line comment + this.skipLineComment(3); + this.skipSpace(); + return this.nextToken() + } + return this.finishOp(types$1.incDec, 2) + } + if (next === 61) { return this.finishOp(types$1.assign, 2) } + return this.finishOp(types$1.plusMin, 1) +}; + +pp.readToken_lt_gt = function(code) { // '<>' + var next = this.input.charCodeAt(this.pos + 1); + var size = 1; + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; + if (this.input.charCodeAt(this.pos + size) === 61) { return this.finishOp(types$1.assign, size + 1) } + return this.finishOp(types$1.bitShift, size) + } + if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && + this.input.charCodeAt(this.pos + 3) === 45) { + // ` + +[npm-version-src]: https://img.shields.io/npm/v/defu?style=flat&colorA=18181B&colorB=F0DB4F +[npm-version-href]: https://npmjs.com/package/defu +[npm-downloads-src]: https://img.shields.io/npm/dm/defu?style=flat&colorA=18181B&colorB=F0DB4F +[npm-downloads-href]: https://npmjs.com/package/defu +[codecov-src]: https://img.shields.io/codecov/c/gh/unjs/defu/main?style=flat&colorA=18181B&colorB=F0DB4F +[codecov-href]: https://codecov.io/gh/unjs/defu +[bundle-src]: https://img.shields.io/bundlephobia/minzip/defu?style=flat&colorA=18181B&colorB=F0DB4F +[bundle-href]: https://bundlephobia.com/result?p=defu +[license-src]: https://img.shields.io/github/license/unjs/defu.svg?style=flat&colorA=18181B&colorB=F0DB4F +[license-href]: https://github.com/unjs/defu/blob/main/LICENSE diff --git a/node_modules/defu/dist/defu.cjs b/node_modules/defu/dist/defu.cjs new file mode 100644 index 0000000..72b30c4 --- /dev/null +++ b/node_modules/defu/dist/defu.cjs @@ -0,0 +1,77 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function isPlainObject(value) { + if (value === null || typeof value !== "object") { + return false; + } + const prototype = Object.getPrototypeOf(value); + if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) { + return false; + } + if (Symbol.iterator in value) { + return false; + } + if (Symbol.toStringTag in value) { + return Object.prototype.toString.call(value) === "[object Module]"; + } + return true; +} + +function _defu(baseObject, defaults, namespace = ".", merger) { + if (!isPlainObject(defaults)) { + return _defu(baseObject, {}, namespace, merger); + } + const object = Object.assign({}, defaults); + for (const key in baseObject) { + if (key === "__proto__" || key === "constructor") { + continue; + } + const value = baseObject[key]; + if (value === null || value === void 0) { + continue; + } + if (merger && merger(object, key, value, namespace)) { + continue; + } + if (Array.isArray(value) && Array.isArray(object[key])) { + object[key] = [...value, ...object[key]]; + } else if (isPlainObject(value) && isPlainObject(object[key])) { + object[key] = _defu( + value, + object[key], + (namespace ? `${namespace}.` : "") + key.toString(), + merger + ); + } else { + object[key] = value; + } + } + return object; +} +function createDefu(merger) { + return (...arguments_) => ( + // eslint-disable-next-line unicorn/no-array-reduce + arguments_.reduce((p, c) => _defu(p, c, "", merger), {}) + ); +} +const defu = createDefu(); +const defuFn = createDefu((object, key, currentValue) => { + if (object[key] !== void 0 && typeof currentValue === "function") { + object[key] = currentValue(object[key]); + return true; + } +}); +const defuArrayFn = createDefu((object, key, currentValue) => { + if (Array.isArray(object[key]) && typeof currentValue === "function") { + object[key] = currentValue(object[key]); + return true; + } +}); + +exports.createDefu = createDefu; +exports.default = defu; +exports.defu = defu; +exports.defuArrayFn = defuArrayFn; +exports.defuFn = defuFn; diff --git a/node_modules/defu/dist/defu.d.cts b/node_modules/defu/dist/defu.d.cts new file mode 100644 index 0000000..4a17b83 --- /dev/null +++ b/node_modules/defu/dist/defu.d.cts @@ -0,0 +1,25 @@ +type Input = Record; +type IgnoredInput = boolean | number | null | any[] | Record | undefined; +type Merger = (object: T, key: keyof T, value: T[K], namespace: string) => any; +type nullish = null | undefined | void; +type MergeObjects = Destination extends Defaults ? Destination : Omit & Omit & { + -readonly [Key in keyof Destination & keyof Defaults]: Destination[Key] extends nullish ? Defaults[Key] extends nullish ? nullish : Defaults[Key] : Defaults[Key] extends nullish ? Destination[Key] : Merge; +}; +type Defu> = D extends [infer F, ...infer Rest] ? F extends Input ? Rest extends Array ? Defu, Rest> : MergeObjects : F extends IgnoredInput ? Rest extends Array ? Defu : S : S : S; +type DefuFn = >(source: Source, ...defaults: Defaults) => Defu; +interface DefuInstance { + >(source: Source | IgnoredInput, ...defaults: Defaults): Defu; + fn: DefuFn; + arrayFn: DefuFn; + extend(merger?: Merger): DefuFn; +} +type MergeArrays = Destination extends Array ? Source extends Array ? Array : Source | Array : Source | Destination; +type Merge = Destination extends nullish ? Defaults extends nullish ? nullish : Defaults : Defaults extends nullish ? Destination : Destination extends Array ? Defaults extends Array ? MergeArrays : Destination | Defaults : Destination extends Function ? Destination | Defaults : Destination extends RegExp ? Destination | Defaults : Destination extends Promise ? Destination | Defaults : Defaults extends Function ? Destination | Defaults : Defaults extends RegExp ? Destination | Defaults : Defaults extends Promise ? Destination | Defaults : Destination extends Input ? Defaults extends Input ? MergeObjects : Destination | Defaults : Destination | Defaults; + +declare function createDefu(merger?: Merger): DefuFn; +declare const defu: DefuInstance; + +declare const defuFn: DefuFn; +declare const defuArrayFn: DefuFn; + +export { type Defu, createDefu, defu as default, defu, defuArrayFn, defuFn }; diff --git a/node_modules/defu/dist/defu.d.mts b/node_modules/defu/dist/defu.d.mts new file mode 100644 index 0000000..4a17b83 --- /dev/null +++ b/node_modules/defu/dist/defu.d.mts @@ -0,0 +1,25 @@ +type Input = Record; +type IgnoredInput = boolean | number | null | any[] | Record | undefined; +type Merger = (object: T, key: keyof T, value: T[K], namespace: string) => any; +type nullish = null | undefined | void; +type MergeObjects = Destination extends Defaults ? Destination : Omit & Omit & { + -readonly [Key in keyof Destination & keyof Defaults]: Destination[Key] extends nullish ? Defaults[Key] extends nullish ? nullish : Defaults[Key] : Defaults[Key] extends nullish ? Destination[Key] : Merge; +}; +type Defu> = D extends [infer F, ...infer Rest] ? F extends Input ? Rest extends Array ? Defu, Rest> : MergeObjects : F extends IgnoredInput ? Rest extends Array ? Defu : S : S : S; +type DefuFn = >(source: Source, ...defaults: Defaults) => Defu; +interface DefuInstance { + >(source: Source | IgnoredInput, ...defaults: Defaults): Defu; + fn: DefuFn; + arrayFn: DefuFn; + extend(merger?: Merger): DefuFn; +} +type MergeArrays = Destination extends Array ? Source extends Array ? Array : Source | Array : Source | Destination; +type Merge = Destination extends nullish ? Defaults extends nullish ? nullish : Defaults : Defaults extends nullish ? Destination : Destination extends Array ? Defaults extends Array ? MergeArrays : Destination | Defaults : Destination extends Function ? Destination | Defaults : Destination extends RegExp ? Destination | Defaults : Destination extends Promise ? Destination | Defaults : Defaults extends Function ? Destination | Defaults : Defaults extends RegExp ? Destination | Defaults : Defaults extends Promise ? Destination | Defaults : Destination extends Input ? Defaults extends Input ? MergeObjects : Destination | Defaults : Destination | Defaults; + +declare function createDefu(merger?: Merger): DefuFn; +declare const defu: DefuInstance; + +declare const defuFn: DefuFn; +declare const defuArrayFn: DefuFn; + +export { type Defu, createDefu, defu as default, defu, defuArrayFn, defuFn }; diff --git a/node_modules/defu/dist/defu.d.ts b/node_modules/defu/dist/defu.d.ts new file mode 100644 index 0000000..4a17b83 --- /dev/null +++ b/node_modules/defu/dist/defu.d.ts @@ -0,0 +1,25 @@ +type Input = Record; +type IgnoredInput = boolean | number | null | any[] | Record | undefined; +type Merger = (object: T, key: keyof T, value: T[K], namespace: string) => any; +type nullish = null | undefined | void; +type MergeObjects = Destination extends Defaults ? Destination : Omit & Omit & { + -readonly [Key in keyof Destination & keyof Defaults]: Destination[Key] extends nullish ? Defaults[Key] extends nullish ? nullish : Defaults[Key] : Defaults[Key] extends nullish ? Destination[Key] : Merge; +}; +type Defu> = D extends [infer F, ...infer Rest] ? F extends Input ? Rest extends Array ? Defu, Rest> : MergeObjects : F extends IgnoredInput ? Rest extends Array ? Defu : S : S : S; +type DefuFn = >(source: Source, ...defaults: Defaults) => Defu; +interface DefuInstance { + >(source: Source | IgnoredInput, ...defaults: Defaults): Defu; + fn: DefuFn; + arrayFn: DefuFn; + extend(merger?: Merger): DefuFn; +} +type MergeArrays = Destination extends Array ? Source extends Array ? Array : Source | Array : Source | Destination; +type Merge = Destination extends nullish ? Defaults extends nullish ? nullish : Defaults : Defaults extends nullish ? Destination : Destination extends Array ? Defaults extends Array ? MergeArrays : Destination | Defaults : Destination extends Function ? Destination | Defaults : Destination extends RegExp ? Destination | Defaults : Destination extends Promise ? Destination | Defaults : Defaults extends Function ? Destination | Defaults : Defaults extends RegExp ? Destination | Defaults : Defaults extends Promise ? Destination | Defaults : Destination extends Input ? Defaults extends Input ? MergeObjects : Destination | Defaults : Destination | Defaults; + +declare function createDefu(merger?: Merger): DefuFn; +declare const defu: DefuInstance; + +declare const defuFn: DefuFn; +declare const defuArrayFn: DefuFn; + +export { type Defu, createDefu, defu as default, defu, defuArrayFn, defuFn }; diff --git a/node_modules/defu/dist/defu.mjs b/node_modules/defu/dist/defu.mjs new file mode 100644 index 0000000..889b83a --- /dev/null +++ b/node_modules/defu/dist/defu.mjs @@ -0,0 +1,69 @@ +function isPlainObject(value) { + if (value === null || typeof value !== "object") { + return false; + } + const prototype = Object.getPrototypeOf(value); + if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) { + return false; + } + if (Symbol.iterator in value) { + return false; + } + if (Symbol.toStringTag in value) { + return Object.prototype.toString.call(value) === "[object Module]"; + } + return true; +} + +function _defu(baseObject, defaults, namespace = ".", merger) { + if (!isPlainObject(defaults)) { + return _defu(baseObject, {}, namespace, merger); + } + const object = Object.assign({}, defaults); + for (const key in baseObject) { + if (key === "__proto__" || key === "constructor") { + continue; + } + const value = baseObject[key]; + if (value === null || value === void 0) { + continue; + } + if (merger && merger(object, key, value, namespace)) { + continue; + } + if (Array.isArray(value) && Array.isArray(object[key])) { + object[key] = [...value, ...object[key]]; + } else if (isPlainObject(value) && isPlainObject(object[key])) { + object[key] = _defu( + value, + object[key], + (namespace ? `${namespace}.` : "") + key.toString(), + merger + ); + } else { + object[key] = value; + } + } + return object; +} +function createDefu(merger) { + return (...arguments_) => ( + // eslint-disable-next-line unicorn/no-array-reduce + arguments_.reduce((p, c) => _defu(p, c, "", merger), {}) + ); +} +const defu = createDefu(); +const defuFn = createDefu((object, key, currentValue) => { + if (object[key] !== void 0 && typeof currentValue === "function") { + object[key] = currentValue(object[key]); + return true; + } +}); +const defuArrayFn = createDefu((object, key, currentValue) => { + if (Array.isArray(object[key]) && typeof currentValue === "function") { + object[key] = currentValue(object[key]); + return true; + } +}); + +export { createDefu, defu as default, defu, defuArrayFn, defuFn }; diff --git a/node_modules/defu/lib/defu.cjs b/node_modules/defu/lib/defu.cjs new file mode 100644 index 0000000..5212929 --- /dev/null +++ b/node_modules/defu/lib/defu.cjs @@ -0,0 +1,11 @@ +const { defu, createDefu, defuFn, defuArrayFn } = require('../dist/defu.cjs'); + +module.exports = defu; + +module.exports.defu = defu; +module.exports.default = defu; + +module.exports.createDefu = createDefu; +module.exports.defuFn = defuFn; +module.exports.defuArrayFn = defuArrayFn; + diff --git a/node_modules/defu/package.json b/node_modules/defu/package.json new file mode 100644 index 0000000..ce8db25 --- /dev/null +++ b/node_modules/defu/package.json @@ -0,0 +1,43 @@ +{ + "name": "defu", + "version": "6.1.4", + "description": "Recursively assign default properties. Lightweight and Fast!", + "repository": "unjs/defu", + "license": "MIT", + "exports": { + ".": { + "types": "./dist/defu.d.ts", + "import": "./dist/defu.mjs", + "require": "./lib/defu.cjs" + } + }, + "main": "./lib/defu.cjs", + "module": "./dist/defu.mjs", + "types": "./dist/defu.d.ts", + "files": [ + "dist", + "lib" + ], + "devDependencies": { + "@types/node": "^20.10.6", + "@vitest/coverage-v8": "^1.1.3", + "changelogen": "^0.5.5", + "eslint": "^8.56.0", + "eslint-config-unjs": "^0.2.1", + "expect-type": "^0.17.3", + "prettier": "^3.1.1", + "typescript": "^5.3.3", + "unbuild": "^2.0.0", + "vitest": "^1.1.3" + }, + "packageManager": "pnpm@8.10.2", + "scripts": { + "build": "unbuild", + "dev": "vitest", + "lint": "eslint --ext .ts src && prettier -c src test", + "lint:fix": "eslint --ext .ts src --fix && prettier -w src test", + "release": "pnpm test && changelogen --release && git push --follow-tags && pnpm publish", + "test": "pnpm lint && pnpm vitest run", + "test:types": "tsc --noEmit" + } +} \ No newline at end of file diff --git a/node_modules/detect-libc/LICENSE b/node_modules/detect-libc/LICENSE new file mode 100644 index 0000000..8dada3e --- /dev/null +++ b/node_modules/detect-libc/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/detect-libc/README.md b/node_modules/detect-libc/README.md new file mode 100644 index 0000000..23212fd --- /dev/null +++ b/node_modules/detect-libc/README.md @@ -0,0 +1,163 @@ +# detect-libc + +Node.js module to detect details of the C standard library (libc) +implementation provided by a given Linux system. + +Currently supports detection of GNU glibc and MUSL libc. + +Provides asychronous and synchronous functions for the +family (e.g. `glibc`, `musl`) and version (e.g. `1.23`, `1.2.3`). + +The version numbers of libc implementations +are not guaranteed to be semver-compliant. + +For previous v1.x releases, please see the +[v1](https://github.com/lovell/detect-libc/tree/v1) branch. + +## Install + +```sh +npm install detect-libc +``` + +## API + +### GLIBC + +```ts +const GLIBC: string = 'glibc'; +``` + +A String constant containing the value `glibc`. + +### MUSL + +```ts +const MUSL: string = 'musl'; +``` + +A String constant containing the value `musl`. + +### family + +```ts +function family(): Promise; +``` + +Resolves asychronously with: + +* `glibc` or `musl` when the libc family can be determined +* `null` when the libc family cannot be determined +* `null` when run on a non-Linux platform + +```js +const { family, GLIBC, MUSL } = require('detect-libc'); + +switch (await family()) { + case GLIBC: ... + case MUSL: ... + case null: ... +} +``` + +### familySync + +```ts +function familySync(): string | null; +``` + +Synchronous version of `family()`. + +```js +const { familySync, GLIBC, MUSL } = require('detect-libc'); + +switch (familySync()) { + case GLIBC: ... + case MUSL: ... + case null: ... +} +``` + +### version + +```ts +function version(): Promise; +``` + +Resolves asychronously with: + +* The version when it can be determined +* `null` when the libc family cannot be determined +* `null` when run on a non-Linux platform + +```js +const { version } = require('detect-libc'); + +const v = await version(); +if (v) { + const [major, minor, patch] = v.split('.'); +} +``` + +### versionSync + +```ts +function versionSync(): string | null; +``` + +Synchronous version of `version()`. + +```js +const { versionSync } = require('detect-libc'); + +const v = versionSync(); +if (v) { + const [major, minor, patch] = v.split('.'); +} +``` + +### isNonGlibcLinux + +```ts +function isNonGlibcLinux(): Promise; +``` + +Resolves asychronously with: + +* `false` when the libc family is `glibc` +* `true` when the libc family is not `glibc` +* `false` when run on a non-Linux platform + +```js +const { isNonGlibcLinux } = require('detect-libc'); + +if (await isNonGlibcLinux()) { ... } +``` + +### isNonGlibcLinuxSync + +```ts +function isNonGlibcLinuxSync(): boolean; +``` + +Synchronous version of `isNonGlibcLinux()`. + +```js +const { isNonGlibcLinuxSync } = require('detect-libc'); + +if (isNonGlibcLinuxSync()) { ... } +``` + +## Licensing + +Copyright 2017 Lovell Fuller and others. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0.html) + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/node_modules/detect-libc/index.d.ts b/node_modules/detect-libc/index.d.ts new file mode 100644 index 0000000..4c0fb2b --- /dev/null +++ b/node_modules/detect-libc/index.d.ts @@ -0,0 +1,14 @@ +// Copyright 2017 Lovell Fuller and others. +// SPDX-License-Identifier: Apache-2.0 + +export const GLIBC: 'glibc'; +export const MUSL: 'musl'; + +export function family(): Promise; +export function familySync(): string | null; + +export function isNonGlibcLinux(): Promise; +export function isNonGlibcLinuxSync(): boolean; + +export function version(): Promise; +export function versionSync(): string | null; diff --git a/node_modules/detect-libc/lib/detect-libc.js b/node_modules/detect-libc/lib/detect-libc.js new file mode 100644 index 0000000..fe49987 --- /dev/null +++ b/node_modules/detect-libc/lib/detect-libc.js @@ -0,0 +1,267 @@ +// Copyright 2017 Lovell Fuller and others. +// SPDX-License-Identifier: Apache-2.0 + +'use strict'; + +const childProcess = require('child_process'); +const { isLinux, getReport } = require('./process'); +const { LDD_PATH, readFile, readFileSync } = require('./filesystem'); + +let cachedFamilyFilesystem; +let cachedVersionFilesystem; + +const command = 'getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true'; +let commandOut = ''; + +const safeCommand = () => { + if (!commandOut) { + return new Promise((resolve) => { + childProcess.exec(command, (err, out) => { + commandOut = err ? ' ' : out; + resolve(commandOut); + }); + }); + } + return commandOut; +}; + +const safeCommandSync = () => { + if (!commandOut) { + try { + commandOut = childProcess.execSync(command, { encoding: 'utf8' }); + } catch (_err) { + commandOut = ' '; + } + } + return commandOut; +}; + +/** + * A String constant containing the value `glibc`. + * @type {string} + * @public + */ +const GLIBC = 'glibc'; + +/** + * A Regexp constant to get the GLIBC Version. + * @type {string} + */ +const RE_GLIBC_VERSION = /LIBC[a-z0-9 \-).]*?(\d+\.\d+)/i; + +/** + * A String constant containing the value `musl`. + * @type {string} + * @public + */ +const MUSL = 'musl'; + +const isFileMusl = (f) => f.includes('libc.musl-') || f.includes('ld-musl-'); + +const familyFromReport = () => { + const report = getReport(); + if (report.header && report.header.glibcVersionRuntime) { + return GLIBC; + } + if (Array.isArray(report.sharedObjects)) { + if (report.sharedObjects.some(isFileMusl)) { + return MUSL; + } + } + return null; +}; + +const familyFromCommand = (out) => { + const [getconf, ldd1] = out.split(/[\r\n]+/); + if (getconf && getconf.includes(GLIBC)) { + return GLIBC; + } + if (ldd1 && ldd1.includes(MUSL)) { + return MUSL; + } + return null; +}; + +const getFamilyFromLddContent = (content) => { + if (content.includes('musl')) { + return MUSL; + } + if (content.includes('GNU C Library')) { + return GLIBC; + } + return null; +}; + +const familyFromFilesystem = async () => { + if (cachedFamilyFilesystem !== undefined) { + return cachedFamilyFilesystem; + } + cachedFamilyFilesystem = null; + try { + const lddContent = await readFile(LDD_PATH); + cachedFamilyFilesystem = getFamilyFromLddContent(lddContent); + } catch (e) {} + return cachedFamilyFilesystem; +}; + +const familyFromFilesystemSync = () => { + if (cachedFamilyFilesystem !== undefined) { + return cachedFamilyFilesystem; + } + cachedFamilyFilesystem = null; + try { + const lddContent = readFileSync(LDD_PATH); + cachedFamilyFilesystem = getFamilyFromLddContent(lddContent); + } catch (e) {} + return cachedFamilyFilesystem; +}; + +/** + * Resolves with the libc family when it can be determined, `null` otherwise. + * @returns {Promise} + */ +const family = async () => { + let family = null; + if (isLinux()) { + family = await familyFromFilesystem(); + if (!family) { + family = familyFromReport(); + } + if (!family) { + const out = await safeCommand(); + family = familyFromCommand(out); + } + } + return family; +}; + +/** + * Returns the libc family when it can be determined, `null` otherwise. + * @returns {?string} + */ +const familySync = () => { + let family = null; + if (isLinux()) { + family = familyFromFilesystemSync(); + if (!family) { + family = familyFromReport(); + } + if (!family) { + const out = safeCommandSync(); + family = familyFromCommand(out); + } + } + return family; +}; + +/** + * Resolves `true` only when the platform is Linux and the libc family is not `glibc`. + * @returns {Promise} + */ +const isNonGlibcLinux = async () => isLinux() && await family() !== GLIBC; + +/** + * Returns `true` only when the platform is Linux and the libc family is not `glibc`. + * @returns {boolean} + */ +const isNonGlibcLinuxSync = () => isLinux() && familySync() !== GLIBC; + +const versionFromFilesystem = async () => { + if (cachedVersionFilesystem !== undefined) { + return cachedVersionFilesystem; + } + cachedVersionFilesystem = null; + try { + const lddContent = await readFile(LDD_PATH); + const versionMatch = lddContent.match(RE_GLIBC_VERSION); + if (versionMatch) { + cachedVersionFilesystem = versionMatch[1]; + } + } catch (e) {} + return cachedVersionFilesystem; +}; + +const versionFromFilesystemSync = () => { + if (cachedVersionFilesystem !== undefined) { + return cachedVersionFilesystem; + } + cachedVersionFilesystem = null; + try { + const lddContent = readFileSync(LDD_PATH); + const versionMatch = lddContent.match(RE_GLIBC_VERSION); + if (versionMatch) { + cachedVersionFilesystem = versionMatch[1]; + } + } catch (e) {} + return cachedVersionFilesystem; +}; + +const versionFromReport = () => { + const report = getReport(); + if (report.header && report.header.glibcVersionRuntime) { + return report.header.glibcVersionRuntime; + } + return null; +}; + +const versionSuffix = (s) => s.trim().split(/\s+/)[1]; + +const versionFromCommand = (out) => { + const [getconf, ldd1, ldd2] = out.split(/[\r\n]+/); + if (getconf && getconf.includes(GLIBC)) { + return versionSuffix(getconf); + } + if (ldd1 && ldd2 && ldd1.includes(MUSL)) { + return versionSuffix(ldd2); + } + return null; +}; + +/** + * Resolves with the libc version when it can be determined, `null` otherwise. + * @returns {Promise} + */ +const version = async () => { + let version = null; + if (isLinux()) { + version = await versionFromFilesystem(); + if (!version) { + version = versionFromReport(); + } + if (!version) { + const out = await safeCommand(); + version = versionFromCommand(out); + } + } + return version; +}; + +/** + * Returns the libc version when it can be determined, `null` otherwise. + * @returns {?string} + */ +const versionSync = () => { + let version = null; + if (isLinux()) { + version = versionFromFilesystemSync(); + if (!version) { + version = versionFromReport(); + } + if (!version) { + const out = safeCommandSync(); + version = versionFromCommand(out); + } + } + return version; +}; + +module.exports = { + GLIBC, + MUSL, + family, + familySync, + isNonGlibcLinux, + isNonGlibcLinuxSync, + version, + versionSync +}; diff --git a/node_modules/detect-libc/lib/filesystem.js b/node_modules/detect-libc/lib/filesystem.js new file mode 100644 index 0000000..de7e007 --- /dev/null +++ b/node_modules/detect-libc/lib/filesystem.js @@ -0,0 +1,41 @@ +// Copyright 2017 Lovell Fuller and others. +// SPDX-License-Identifier: Apache-2.0 + +'use strict'; + +const fs = require('fs'); + +/** + * The path where we can find the ldd + */ +const LDD_PATH = '/usr/bin/ldd'; + +/** + * Read the content of a file synchronous + * + * @param {string} path + * @returns {string} + */ +const readFileSync = (path) => fs.readFileSync(path, 'utf-8'); + +/** + * Read the content of a file + * + * @param {string} path + * @returns {Promise} + */ +const readFile = (path) => new Promise((resolve, reject) => { + fs.readFile(path, 'utf-8', (err, data) => { + if (err) { + reject(err); + } else { + resolve(data); + } + }); +}); + +module.exports = { + LDD_PATH, + readFileSync, + readFile +}; diff --git a/node_modules/detect-libc/lib/process.js b/node_modules/detect-libc/lib/process.js new file mode 100644 index 0000000..ee78ad2 --- /dev/null +++ b/node_modules/detect-libc/lib/process.js @@ -0,0 +1,24 @@ +// Copyright 2017 Lovell Fuller and others. +// SPDX-License-Identifier: Apache-2.0 + +'use strict'; + +const isLinux = () => process.platform === 'linux'; + +let report = null; +const getReport = () => { + if (!report) { + /* istanbul ignore next */ + if (isLinux() && process.report) { + const orig = process.report.excludeNetwork; + process.report.excludeNetwork = true; + report = process.report.getReport(); + process.report.excludeNetwork = orig; + } else { + report = {}; + } + } + return report; +}; + +module.exports = { isLinux, getReport }; diff --git a/node_modules/detect-libc/package.json b/node_modules/detect-libc/package.json new file mode 100644 index 0000000..4b04ec8 --- /dev/null +++ b/node_modules/detect-libc/package.json @@ -0,0 +1,41 @@ +{ + "name": "detect-libc", + "version": "2.0.4", + "description": "Node.js module to detect the C standard library (libc) implementation family and version", + "main": "lib/detect-libc.js", + "files": [ + "lib/", + "index.d.ts" + ], + "scripts": { + "test": "semistandard && nyc --reporter=text --check-coverage --branches=100 ava test/unit.js", + "bench": "node benchmark/detect-libc", + "bench:calls": "node benchmark/call-familySync.js && sleep 1 && node benchmark/call-isNonGlibcLinuxSync.js && sleep 1 && node benchmark/call-versionSync.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/lovell/detect-libc" + }, + "keywords": [ + "libc", + "glibc", + "musl" + ], + "author": "Lovell Fuller ", + "contributors": [ + "Niklas Salmoukas ", + "Vinícius Lourenço " + ], + "license": "Apache-2.0", + "devDependencies": { + "ava": "^2.4.0", + "benchmark": "^2.1.4", + "nyc": "^15.1.0", + "proxyquire": "^2.1.3", + "semistandard": "^14.2.3" + }, + "engines": { + "node": ">=8" + }, + "types": "index.d.ts" +} diff --git a/node_modules/esbuild/LICENSE.md b/node_modules/esbuild/LICENSE.md new file mode 100644 index 0000000..2027e8d --- /dev/null +++ b/node_modules/esbuild/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Evan Wallace + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/esbuild/README.md b/node_modules/esbuild/README.md new file mode 100644 index 0000000..93863d1 --- /dev/null +++ b/node_modules/esbuild/README.md @@ -0,0 +1,3 @@ +# esbuild + +This is a JavaScript bundler and minifier. See https://github.com/evanw/esbuild and the [JavaScript API documentation](https://esbuild.github.io/api/) for details. diff --git a/node_modules/esbuild/bin/esbuild b/node_modules/esbuild/bin/esbuild new file mode 100755 index 0000000..10af517 Binary files /dev/null and b/node_modules/esbuild/bin/esbuild differ diff --git a/node_modules/esbuild/install.js b/node_modules/esbuild/install.js new file mode 100644 index 0000000..5954864 --- /dev/null +++ b/node_modules/esbuild/install.js @@ -0,0 +1,287 @@ +"use strict"; +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 __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); + +// lib/npm/node-platform.ts +var fs = require("fs"); +var os = require("os"); +var path = require("path"); +var ESBUILD_BINARY_PATH = process.env.ESBUILD_BINARY_PATH || ESBUILD_BINARY_PATH; +var isValidBinaryPath = (x) => !!x && x !== "/usr/bin/esbuild"; +var knownWindowsPackages = { + "win32 arm64 LE": "@esbuild/win32-arm64", + "win32 ia32 LE": "@esbuild/win32-ia32", + "win32 x64 LE": "@esbuild/win32-x64" +}; +var knownUnixlikePackages = { + "aix ppc64 BE": "@esbuild/aix-ppc64", + "android arm64 LE": "@esbuild/android-arm64", + "darwin arm64 LE": "@esbuild/darwin-arm64", + "darwin x64 LE": "@esbuild/darwin-x64", + "freebsd arm64 LE": "@esbuild/freebsd-arm64", + "freebsd x64 LE": "@esbuild/freebsd-x64", + "linux arm LE": "@esbuild/linux-arm", + "linux arm64 LE": "@esbuild/linux-arm64", + "linux ia32 LE": "@esbuild/linux-ia32", + "linux mips64el LE": "@esbuild/linux-mips64el", + "linux ppc64 LE": "@esbuild/linux-ppc64", + "linux riscv64 LE": "@esbuild/linux-riscv64", + "linux s390x BE": "@esbuild/linux-s390x", + "linux x64 LE": "@esbuild/linux-x64", + "linux loong64 LE": "@esbuild/linux-loong64", + "netbsd arm64 LE": "@esbuild/netbsd-arm64", + "netbsd x64 LE": "@esbuild/netbsd-x64", + "openbsd arm64 LE": "@esbuild/openbsd-arm64", + "openbsd x64 LE": "@esbuild/openbsd-x64", + "sunos x64 LE": "@esbuild/sunos-x64" +}; +var knownWebAssemblyFallbackPackages = { + "android arm LE": "@esbuild/android-arm", + "android x64 LE": "@esbuild/android-x64" +}; +function pkgAndSubpathForCurrentPlatform() { + let pkg; + let subpath; + let isWASM = false; + let platformKey = `${process.platform} ${os.arch()} ${os.endianness()}`; + if (platformKey in knownWindowsPackages) { + pkg = knownWindowsPackages[platformKey]; + subpath = "esbuild.exe"; + } else if (platformKey in knownUnixlikePackages) { + pkg = knownUnixlikePackages[platformKey]; + subpath = "bin/esbuild"; + } else if (platformKey in knownWebAssemblyFallbackPackages) { + pkg = knownWebAssemblyFallbackPackages[platformKey]; + subpath = "bin/esbuild"; + isWASM = true; + } else { + throw new Error(`Unsupported platform: ${platformKey}`); + } + return { pkg, subpath, isWASM }; +} +function downloadedBinPath(pkg, subpath) { + const esbuildLibDir = path.dirname(require.resolve("esbuild")); + return path.join(esbuildLibDir, `downloaded-${pkg.replace("/", "-")}-${path.basename(subpath)}`); +} + +// lib/npm/node-install.ts +var fs2 = require("fs"); +var os2 = require("os"); +var path2 = require("path"); +var zlib = require("zlib"); +var https = require("https"); +var child_process = require("child_process"); +var versionFromPackageJSON = require(path2.join(__dirname, "package.json")).version; +var toPath = path2.join(__dirname, "bin", "esbuild"); +var isToPathJS = true; +function validateBinaryVersion(...command) { + command.push("--version"); + let stdout; + try { + stdout = child_process.execFileSync(command.shift(), command, { + // Without this, this install script strangely crashes with the error + // "EACCES: permission denied, write" but only on Ubuntu Linux when node is + // installed from the Snap Store. This is not a problem when you download + // the official version of node. The problem appears to be that stderr + // (i.e. file descriptor 2) isn't writable? + // + // More info: + // - https://snapcraft.io/ (what the Snap Store is) + // - https://nodejs.org/dist/ (download the official version of node) + // - https://github.com/evanw/esbuild/issues/1711#issuecomment-1027554035 + // + stdio: "pipe" + }).toString().trim(); + } catch (err) { + if (os2.platform() === "darwin" && /_SecTrustEvaluateWithError/.test(err + "")) { + let os3 = "this version of macOS"; + try { + os3 = "macOS " + child_process.execFileSync("sw_vers", ["-productVersion"]).toString().trim(); + } catch { + } + throw new Error(`The "esbuild" package cannot be installed because ${os3} is too outdated. + +The Go compiler (which esbuild relies on) no longer supports ${os3}, +which means the "esbuild" binary executable can't be run. You can either: + + * Update your version of macOS to one that the Go compiler supports + * Use the "esbuild-wasm" package instead of the "esbuild" package + * Build esbuild yourself using an older version of the Go compiler +`); + } + throw err; + } + if (stdout !== versionFromPackageJSON) { + throw new Error(`Expected ${JSON.stringify(versionFromPackageJSON)} but got ${JSON.stringify(stdout)}`); + } +} +function isYarn() { + const { npm_config_user_agent } = process.env; + if (npm_config_user_agent) { + return /\byarn\//.test(npm_config_user_agent); + } + return false; +} +function fetch(url) { + return new Promise((resolve, reject) => { + https.get(url, (res) => { + if ((res.statusCode === 301 || res.statusCode === 302) && res.headers.location) + return fetch(res.headers.location).then(resolve, reject); + if (res.statusCode !== 200) + return reject(new Error(`Server responded with ${res.statusCode}`)); + let chunks = []; + res.on("data", (chunk) => chunks.push(chunk)); + res.on("end", () => resolve(Buffer.concat(chunks))); + }).on("error", reject); + }); +} +function extractFileFromTarGzip(buffer, subpath) { + try { + buffer = zlib.unzipSync(buffer); + } catch (err) { + throw new Error(`Invalid gzip data in archive: ${err && err.message || err}`); + } + let str = (i, n) => String.fromCharCode(...buffer.subarray(i, i + n)).replace(/\0.*$/, ""); + let offset = 0; + subpath = `package/${subpath}`; + while (offset < buffer.length) { + let name = str(offset, 100); + let size = parseInt(str(offset + 124, 12), 8); + offset += 512; + if (!isNaN(size)) { + if (name === subpath) return buffer.subarray(offset, offset + size); + offset += size + 511 & ~511; + } + } + throw new Error(`Could not find ${JSON.stringify(subpath)} in archive`); +} +function installUsingNPM(pkg, subpath, binPath) { + const env = { ...process.env, npm_config_global: void 0 }; + const esbuildLibDir = path2.dirname(require.resolve("esbuild")); + const installDir = path2.join(esbuildLibDir, "npm-install"); + fs2.mkdirSync(installDir); + try { + fs2.writeFileSync(path2.join(installDir, "package.json"), "{}"); + child_process.execSync( + `npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${versionFromPackageJSON}`, + { cwd: installDir, stdio: "pipe", env } + ); + const installedBinPath = path2.join(installDir, "node_modules", pkg, subpath); + fs2.renameSync(installedBinPath, binPath); + } finally { + try { + removeRecursive(installDir); + } catch { + } + } +} +function removeRecursive(dir) { + for (const entry of fs2.readdirSync(dir)) { + const entryPath = path2.join(dir, entry); + let stats; + try { + stats = fs2.lstatSync(entryPath); + } catch { + continue; + } + if (stats.isDirectory()) removeRecursive(entryPath); + else fs2.unlinkSync(entryPath); + } + fs2.rmdirSync(dir); +} +function applyManualBinaryPathOverride(overridePath) { + const pathString = JSON.stringify(overridePath); + fs2.writeFileSync(toPath, `#!/usr/bin/env node +require('child_process').execFileSync(${pathString}, process.argv.slice(2), { stdio: 'inherit' }); +`); + const libMain = path2.join(__dirname, "lib", "main.js"); + const code = fs2.readFileSync(libMain, "utf8"); + fs2.writeFileSync(libMain, `var ESBUILD_BINARY_PATH = ${pathString}; +${code}`); +} +function maybeOptimizePackage(binPath) { + if (os2.platform() !== "win32" && !isYarn()) { + const tempPath = path2.join(__dirname, "bin-esbuild"); + try { + fs2.linkSync(binPath, tempPath); + fs2.renameSync(tempPath, toPath); + isToPathJS = false; + fs2.unlinkSync(tempPath); + } catch { + } + } +} +async function downloadDirectlyFromNPM(pkg, subpath, binPath) { + const url = `https://registry.npmjs.org/${pkg}/-/${pkg.replace("@esbuild/", "")}-${versionFromPackageJSON}.tgz`; + console.error(`[esbuild] Trying to download ${JSON.stringify(url)}`); + try { + fs2.writeFileSync(binPath, extractFileFromTarGzip(await fetch(url), subpath)); + fs2.chmodSync(binPath, 493); + } catch (e) { + console.error(`[esbuild] Failed to download ${JSON.stringify(url)}: ${e && e.message || e}`); + throw e; + } +} +async function checkAndPreparePackage() { + if (isValidBinaryPath(ESBUILD_BINARY_PATH)) { + if (!fs2.existsSync(ESBUILD_BINARY_PATH)) { + console.warn(`[esbuild] Ignoring bad configuration: ESBUILD_BINARY_PATH=${ESBUILD_BINARY_PATH}`); + } else { + applyManualBinaryPathOverride(ESBUILD_BINARY_PATH); + return; + } + } + const { pkg, subpath } = pkgAndSubpathForCurrentPlatform(); + let binPath; + try { + binPath = require.resolve(`${pkg}/${subpath}`); + } catch (e) { + console.error(`[esbuild] Failed to find package "${pkg}" on the file system + +This can happen if you use the "--no-optional" flag. The "optionalDependencies" +package.json feature is used by esbuild to install the correct binary executable +for your current platform. This install script will now attempt to work around +this. If that fails, you need to remove the "--no-optional" flag to use esbuild. +`); + binPath = downloadedBinPath(pkg, subpath); + try { + console.error(`[esbuild] Trying to install package "${pkg}" using npm`); + installUsingNPM(pkg, subpath, binPath); + } catch (e2) { + console.error(`[esbuild] Failed to install package "${pkg}" using npm: ${e2 && e2.message || e2}`); + try { + await downloadDirectlyFromNPM(pkg, subpath, binPath); + } catch (e3) { + throw new Error(`Failed to install package "${pkg}"`); + } + } + } + maybeOptimizePackage(binPath); +} +checkAndPreparePackage().then(() => { + if (isToPathJS) { + validateBinaryVersion(process.execPath, toPath); + } else { + validateBinaryVersion(toPath); + } +}); diff --git a/node_modules/esbuild/lib/main.d.ts b/node_modules/esbuild/lib/main.d.ts new file mode 100644 index 0000000..424b302 --- /dev/null +++ b/node_modules/esbuild/lib/main.d.ts @@ -0,0 +1,711 @@ +export type Platform = 'browser' | 'node' | 'neutral' +export type Format = 'iife' | 'cjs' | 'esm' +export type Loader = 'base64' | 'binary' | 'copy' | 'css' | 'dataurl' | 'default' | 'empty' | 'file' | 'js' | 'json' | 'jsx' | 'local-css' | 'text' | 'ts' | 'tsx' +export type LogLevel = 'verbose' | 'debug' | 'info' | 'warning' | 'error' | 'silent' +export type Charset = 'ascii' | 'utf8' +export type Drop = 'console' | 'debugger' + +interface CommonOptions { + /** Documentation: https://esbuild.github.io/api/#sourcemap */ + sourcemap?: boolean | 'linked' | 'inline' | 'external' | 'both' + /** Documentation: https://esbuild.github.io/api/#legal-comments */ + legalComments?: 'none' | 'inline' | 'eof' | 'linked' | 'external' + /** Documentation: https://esbuild.github.io/api/#source-root */ + sourceRoot?: string + /** Documentation: https://esbuild.github.io/api/#sources-content */ + sourcesContent?: boolean + + /** Documentation: https://esbuild.github.io/api/#format */ + format?: Format + /** Documentation: https://esbuild.github.io/api/#global-name */ + globalName?: string + /** Documentation: https://esbuild.github.io/api/#target */ + target?: string | string[] + /** Documentation: https://esbuild.github.io/api/#supported */ + supported?: Record + /** Documentation: https://esbuild.github.io/api/#platform */ + platform?: Platform + + /** Documentation: https://esbuild.github.io/api/#mangle-props */ + mangleProps?: RegExp + /** Documentation: https://esbuild.github.io/api/#mangle-props */ + reserveProps?: RegExp + /** Documentation: https://esbuild.github.io/api/#mangle-props */ + mangleQuoted?: boolean + /** Documentation: https://esbuild.github.io/api/#mangle-props */ + mangleCache?: Record + /** Documentation: https://esbuild.github.io/api/#drop */ + drop?: Drop[] + /** Documentation: https://esbuild.github.io/api/#drop-labels */ + dropLabels?: string[] + /** Documentation: https://esbuild.github.io/api/#minify */ + minify?: boolean + /** Documentation: https://esbuild.github.io/api/#minify */ + minifyWhitespace?: boolean + /** Documentation: https://esbuild.github.io/api/#minify */ + minifyIdentifiers?: boolean + /** Documentation: https://esbuild.github.io/api/#minify */ + minifySyntax?: boolean + /** Documentation: https://esbuild.github.io/api/#line-limit */ + lineLimit?: number + /** Documentation: https://esbuild.github.io/api/#charset */ + charset?: Charset + /** Documentation: https://esbuild.github.io/api/#tree-shaking */ + treeShaking?: boolean + /** Documentation: https://esbuild.github.io/api/#ignore-annotations */ + ignoreAnnotations?: boolean + + /** Documentation: https://esbuild.github.io/api/#jsx */ + jsx?: 'transform' | 'preserve' | 'automatic' + /** Documentation: https://esbuild.github.io/api/#jsx-factory */ + jsxFactory?: string + /** Documentation: https://esbuild.github.io/api/#jsx-fragment */ + jsxFragment?: string + /** Documentation: https://esbuild.github.io/api/#jsx-import-source */ + jsxImportSource?: string + /** Documentation: https://esbuild.github.io/api/#jsx-development */ + jsxDev?: boolean + /** Documentation: https://esbuild.github.io/api/#jsx-side-effects */ + jsxSideEffects?: boolean + + /** Documentation: https://esbuild.github.io/api/#define */ + define?: { [key: string]: string } + /** Documentation: https://esbuild.github.io/api/#pure */ + pure?: string[] + /** Documentation: https://esbuild.github.io/api/#keep-names */ + keepNames?: boolean + + /** Documentation: https://esbuild.github.io/api/#color */ + color?: boolean + /** Documentation: https://esbuild.github.io/api/#log-level */ + logLevel?: LogLevel + /** Documentation: https://esbuild.github.io/api/#log-limit */ + logLimit?: number + /** Documentation: https://esbuild.github.io/api/#log-override */ + logOverride?: Record + + /** Documentation: https://esbuild.github.io/api/#tsconfig-raw */ + tsconfigRaw?: string | TsconfigRaw +} + +export interface TsconfigRaw { + compilerOptions?: { + alwaysStrict?: boolean + baseUrl?: string + experimentalDecorators?: boolean + importsNotUsedAsValues?: 'remove' | 'preserve' | 'error' + jsx?: 'preserve' | 'react-native' | 'react' | 'react-jsx' | 'react-jsxdev' + jsxFactory?: string + jsxFragmentFactory?: string + jsxImportSource?: string + paths?: Record + preserveValueImports?: boolean + strict?: boolean + target?: string + useDefineForClassFields?: boolean + verbatimModuleSyntax?: boolean + } +} + +export interface BuildOptions extends CommonOptions { + /** Documentation: https://esbuild.github.io/api/#bundle */ + bundle?: boolean + /** Documentation: https://esbuild.github.io/api/#splitting */ + splitting?: boolean + /** Documentation: https://esbuild.github.io/api/#preserve-symlinks */ + preserveSymlinks?: boolean + /** Documentation: https://esbuild.github.io/api/#outfile */ + outfile?: string + /** Documentation: https://esbuild.github.io/api/#metafile */ + metafile?: boolean + /** Documentation: https://esbuild.github.io/api/#outdir */ + outdir?: string + /** Documentation: https://esbuild.github.io/api/#outbase */ + outbase?: string + /** Documentation: https://esbuild.github.io/api/#external */ + external?: string[] + /** Documentation: https://esbuild.github.io/api/#packages */ + packages?: 'bundle' | 'external' + /** Documentation: https://esbuild.github.io/api/#alias */ + alias?: Record + /** Documentation: https://esbuild.github.io/api/#loader */ + loader?: { [ext: string]: Loader } + /** Documentation: https://esbuild.github.io/api/#resolve-extensions */ + resolveExtensions?: string[] + /** Documentation: https://esbuild.github.io/api/#main-fields */ + mainFields?: string[] + /** Documentation: https://esbuild.github.io/api/#conditions */ + conditions?: string[] + /** Documentation: https://esbuild.github.io/api/#write */ + write?: boolean + /** Documentation: https://esbuild.github.io/api/#allow-overwrite */ + allowOverwrite?: boolean + /** Documentation: https://esbuild.github.io/api/#tsconfig */ + tsconfig?: string + /** Documentation: https://esbuild.github.io/api/#out-extension */ + outExtension?: { [ext: string]: string } + /** Documentation: https://esbuild.github.io/api/#public-path */ + publicPath?: string + /** Documentation: https://esbuild.github.io/api/#entry-names */ + entryNames?: string + /** Documentation: https://esbuild.github.io/api/#chunk-names */ + chunkNames?: string + /** Documentation: https://esbuild.github.io/api/#asset-names */ + assetNames?: string + /** Documentation: https://esbuild.github.io/api/#inject */ + inject?: string[] + /** Documentation: https://esbuild.github.io/api/#banner */ + banner?: { [type: string]: string } + /** Documentation: https://esbuild.github.io/api/#footer */ + footer?: { [type: string]: string } + /** Documentation: https://esbuild.github.io/api/#entry-points */ + entryPoints?: string[] | Record | { in: string, out: string }[] + /** Documentation: https://esbuild.github.io/api/#stdin */ + stdin?: StdinOptions + /** Documentation: https://esbuild.github.io/plugins/ */ + plugins?: Plugin[] + /** Documentation: https://esbuild.github.io/api/#working-directory */ + absWorkingDir?: string + /** Documentation: https://esbuild.github.io/api/#node-paths */ + nodePaths?: string[]; // The "NODE_PATH" variable from Node.js +} + +export interface StdinOptions { + contents: string | Uint8Array + resolveDir?: string + sourcefile?: string + loader?: Loader +} + +export interface Message { + id: string + pluginName: string + text: string + location: Location | null + notes: Note[] + + /** + * Optional user-specified data that is passed through unmodified. You can + * use this to stash the original error, for example. + */ + detail: any +} + +export interface Note { + text: string + location: Location | null +} + +export interface Location { + file: string + namespace: string + /** 1-based */ + line: number + /** 0-based, in bytes */ + column: number + /** in bytes */ + length: number + lineText: string + suggestion: string +} + +export interface OutputFile { + path: string + contents: Uint8Array + hash: string + /** "contents" as text (changes automatically with "contents") */ + readonly text: string +} + +export interface BuildResult { + errors: Message[] + warnings: Message[] + /** Only when "write: false" */ + outputFiles: OutputFile[] | (ProvidedOptions['write'] extends false ? never : undefined) + /** Only when "metafile: true" */ + metafile: Metafile | (ProvidedOptions['metafile'] extends true ? never : undefined) + /** Only when "mangleCache" is present */ + mangleCache: Record | (ProvidedOptions['mangleCache'] extends Object ? never : undefined) +} + +export interface BuildFailure extends Error { + errors: Message[] + warnings: Message[] +} + +/** Documentation: https://esbuild.github.io/api/#serve-arguments */ +export interface ServeOptions { + port?: number + host?: string + servedir?: string + keyfile?: string + certfile?: string + fallback?: string + cors?: CORSOptions + onRequest?: (args: ServeOnRequestArgs) => void +} + +/** Documentation: https://esbuild.github.io/api/#cors */ +export interface CORSOptions { + origin?: string | string[] +} + +export interface ServeOnRequestArgs { + remoteAddress: string + method: string + path: string + status: number + /** The time to generate the response, not to send it */ + timeInMS: number +} + +/** Documentation: https://esbuild.github.io/api/#serve-return-values */ +export interface ServeResult { + port: number + hosts: string[] +} + +export interface TransformOptions extends CommonOptions { + /** Documentation: https://esbuild.github.io/api/#sourcefile */ + sourcefile?: string + /** Documentation: https://esbuild.github.io/api/#loader */ + loader?: Loader + /** Documentation: https://esbuild.github.io/api/#banner */ + banner?: string + /** Documentation: https://esbuild.github.io/api/#footer */ + footer?: string +} + +export interface TransformResult { + code: string + map: string + warnings: Message[] + /** Only when "mangleCache" is present */ + mangleCache: Record | (ProvidedOptions['mangleCache'] extends Object ? never : undefined) + /** Only when "legalComments" is "external" */ + legalComments: string | (ProvidedOptions['legalComments'] extends 'external' ? never : undefined) +} + +export interface TransformFailure extends Error { + errors: Message[] + warnings: Message[] +} + +export interface Plugin { + name: string + setup: (build: PluginBuild) => (void | Promise) +} + +export interface PluginBuild { + /** Documentation: https://esbuild.github.io/plugins/#build-options */ + initialOptions: BuildOptions + + /** Documentation: https://esbuild.github.io/plugins/#resolve */ + resolve(path: string, options?: ResolveOptions): Promise + + /** Documentation: https://esbuild.github.io/plugins/#on-start */ + onStart(callback: () => + (OnStartResult | null | void | Promise)): void + + /** Documentation: https://esbuild.github.io/plugins/#on-end */ + onEnd(callback: (result: BuildResult) => + (OnEndResult | null | void | Promise)): void + + /** Documentation: https://esbuild.github.io/plugins/#on-resolve */ + onResolve(options: OnResolveOptions, callback: (args: OnResolveArgs) => + (OnResolveResult | null | undefined | Promise)): void + + /** Documentation: https://esbuild.github.io/plugins/#on-load */ + onLoad(options: OnLoadOptions, callback: (args: OnLoadArgs) => + (OnLoadResult | null | undefined | Promise)): void + + /** Documentation: https://esbuild.github.io/plugins/#on-dispose */ + onDispose(callback: () => void): void + + // This is a full copy of the esbuild library in case you need it + esbuild: { + context: typeof context, + build: typeof build, + buildSync: typeof buildSync, + transform: typeof transform, + transformSync: typeof transformSync, + formatMessages: typeof formatMessages, + formatMessagesSync: typeof formatMessagesSync, + analyzeMetafile: typeof analyzeMetafile, + analyzeMetafileSync: typeof analyzeMetafileSync, + initialize: typeof initialize, + version: typeof version, + } +} + +/** Documentation: https://esbuild.github.io/plugins/#resolve-options */ +export interface ResolveOptions { + pluginName?: string + importer?: string + namespace?: string + resolveDir?: string + kind?: ImportKind + pluginData?: any + with?: Record +} + +/** Documentation: https://esbuild.github.io/plugins/#resolve-results */ +export interface ResolveResult { + errors: Message[] + warnings: Message[] + + path: string + external: boolean + sideEffects: boolean + namespace: string + suffix: string + pluginData: any +} + +export interface OnStartResult { + errors?: PartialMessage[] + warnings?: PartialMessage[] +} + +export interface OnEndResult { + errors?: PartialMessage[] + warnings?: PartialMessage[] +} + +/** Documentation: https://esbuild.github.io/plugins/#on-resolve-options */ +export interface OnResolveOptions { + filter: RegExp + namespace?: string +} + +/** Documentation: https://esbuild.github.io/plugins/#on-resolve-arguments */ +export interface OnResolveArgs { + path: string + importer: string + namespace: string + resolveDir: string + kind: ImportKind + pluginData: any + with: Record +} + +export type ImportKind = + | 'entry-point' + + // JS + | 'import-statement' + | 'require-call' + | 'dynamic-import' + | 'require-resolve' + + // CSS + | 'import-rule' + | 'composes-from' + | 'url-token' + +/** Documentation: https://esbuild.github.io/plugins/#on-resolve-results */ +export interface OnResolveResult { + pluginName?: string + + errors?: PartialMessage[] + warnings?: PartialMessage[] + + path?: string + external?: boolean + sideEffects?: boolean + namespace?: string + suffix?: string + pluginData?: any + + watchFiles?: string[] + watchDirs?: string[] +} + +/** Documentation: https://esbuild.github.io/plugins/#on-load-options */ +export interface OnLoadOptions { + filter: RegExp + namespace?: string +} + +/** Documentation: https://esbuild.github.io/plugins/#on-load-arguments */ +export interface OnLoadArgs { + path: string + namespace: string + suffix: string + pluginData: any + with: Record +} + +/** Documentation: https://esbuild.github.io/plugins/#on-load-results */ +export interface OnLoadResult { + pluginName?: string + + errors?: PartialMessage[] + warnings?: PartialMessage[] + + contents?: string | Uint8Array + resolveDir?: string + loader?: Loader + pluginData?: any + + watchFiles?: string[] + watchDirs?: string[] +} + +export interface PartialMessage { + id?: string + pluginName?: string + text?: string + location?: Partial | null + notes?: PartialNote[] + detail?: any +} + +export interface PartialNote { + text?: string + location?: Partial | null +} + +/** Documentation: https://esbuild.github.io/api/#metafile */ +export interface Metafile { + inputs: { + [path: string]: { + bytes: number + imports: { + path: string + kind: ImportKind + external?: boolean + original?: string + with?: Record + }[] + format?: 'cjs' | 'esm' + with?: Record + } + } + outputs: { + [path: string]: { + bytes: number + inputs: { + [path: string]: { + bytesInOutput: number + } + } + imports: { + path: string + kind: ImportKind | 'file-loader' + external?: boolean + }[] + exports: string[] + entryPoint?: string + cssBundle?: string + } + } +} + +export interface FormatMessagesOptions { + kind: 'error' | 'warning' + color?: boolean + terminalWidth?: number +} + +export interface AnalyzeMetafileOptions { + color?: boolean + verbose?: boolean +} + +export interface WatchOptions { +} + +export interface BuildContext { + /** Documentation: https://esbuild.github.io/api/#rebuild */ + rebuild(): Promise> + + /** Documentation: https://esbuild.github.io/api/#watch */ + watch(options?: WatchOptions): Promise + + /** Documentation: https://esbuild.github.io/api/#serve */ + serve(options?: ServeOptions): Promise + + cancel(): Promise + dispose(): Promise +} + +// This is a TypeScript type-level function which replaces any keys in "In" +// that aren't in "Out" with "never". We use this to reject properties with +// typos in object literals. See: https://stackoverflow.com/questions/49580725 +type SameShape = In & { [Key in Exclude]: never } + +/** + * This function invokes the "esbuild" command-line tool for you. It returns a + * promise that either resolves with a "BuildResult" object or rejects with a + * "BuildFailure" object. + * + * - Works in node: yes + * - Works in browser: yes + * + * Documentation: https://esbuild.github.io/api/#build + */ +export declare function build(options: SameShape): Promise> + +/** + * This is the advanced long-running form of "build" that supports additional + * features such as watch mode and a local development server. + * + * - Works in node: yes + * - Works in browser: no + * + * Documentation: https://esbuild.github.io/api/#build + */ +export declare function context(options: SameShape): Promise> + +/** + * This function transforms a single JavaScript file. It can be used to minify + * JavaScript, convert TypeScript/JSX to JavaScript, or convert newer JavaScript + * to older JavaScript. It returns a promise that is either resolved with a + * "TransformResult" object or rejected with a "TransformFailure" object. + * + * - Works in node: yes + * - Works in browser: yes + * + * Documentation: https://esbuild.github.io/api/#transform + */ +export declare function transform(input: string | Uint8Array, options?: SameShape): Promise> + +/** + * Converts log messages to formatted message strings suitable for printing in + * the terminal. This allows you to reuse the built-in behavior of esbuild's + * log message formatter. This is a batch-oriented API for efficiency. + * + * - Works in node: yes + * - Works in browser: yes + */ +export declare function formatMessages(messages: PartialMessage[], options: FormatMessagesOptions): Promise + +/** + * Pretty-prints an analysis of the metafile JSON to a string. This is just for + * convenience to be able to match esbuild's pretty-printing exactly. If you want + * to customize it, you can just inspect the data in the metafile yourself. + * + * - Works in node: yes + * - Works in browser: yes + * + * Documentation: https://esbuild.github.io/api/#analyze + */ +export declare function analyzeMetafile(metafile: Metafile | string, options?: AnalyzeMetafileOptions): Promise + +/** + * A synchronous version of "build". + * + * - Works in node: yes + * - Works in browser: no + * + * Documentation: https://esbuild.github.io/api/#build + */ +export declare function buildSync(options: SameShape): BuildResult + +/** + * A synchronous version of "transform". + * + * - Works in node: yes + * - Works in browser: no + * + * Documentation: https://esbuild.github.io/api/#transform + */ +export declare function transformSync(input: string | Uint8Array, options?: SameShape): TransformResult + +/** + * A synchronous version of "formatMessages". + * + * - Works in node: yes + * - Works in browser: no + */ +export declare function formatMessagesSync(messages: PartialMessage[], options: FormatMessagesOptions): string[] + +/** + * A synchronous version of "analyzeMetafile". + * + * - Works in node: yes + * - Works in browser: no + * + * Documentation: https://esbuild.github.io/api/#analyze + */ +export declare function analyzeMetafileSync(metafile: Metafile | string, options?: AnalyzeMetafileOptions): string + +/** + * This configures the browser-based version of esbuild. It is necessary to + * call this first and wait for the returned promise to be resolved before + * making other API calls when using esbuild in the browser. + * + * - Works in node: yes + * - Works in browser: yes ("options" is required) + * + * Documentation: https://esbuild.github.io/api/#browser + */ +export declare function initialize(options: InitializeOptions): Promise + +export interface InitializeOptions { + /** + * The URL of the "esbuild.wasm" file. This must be provided when running + * esbuild in the browser. + */ + wasmURL?: string | URL + + /** + * The result of calling "new WebAssembly.Module(buffer)" where "buffer" + * is a typed array or ArrayBuffer containing the binary code of the + * "esbuild.wasm" file. + * + * You can use this as an alternative to "wasmURL" for environments where it's + * not possible to download the WebAssembly module. + */ + wasmModule?: WebAssembly.Module + + /** + * By default esbuild runs the WebAssembly-based browser API in a web worker + * to avoid blocking the UI thread. This can be disabled by setting "worker" + * to false. + */ + worker?: boolean +} + +export let version: string + +// Call this function to terminate esbuild's child process. The child process +// is not terminated and re-created after each API call because it's more +// efficient to keep it around when there are multiple API calls. +// +// In node this happens automatically before the parent node process exits. So +// you only need to call this if you know you will not make any more esbuild +// API calls and you want to clean up resources. +// +// Unlike node, Deno lacks the necessary APIs to clean up child processes +// automatically. You must manually call stop() in Deno when you're done +// using esbuild or Deno will continue running forever. +// +// Another reason you might want to call this is if you are using esbuild from +// within a Deno test. Deno fails tests that create a child process without +// killing it before the test ends, so you have to call this function (and +// await the returned promise) in every Deno test that uses esbuild. +export declare function stop(): Promise + +// Note: These declarations exist to avoid type errors when you omit "dom" from +// "lib" in your "tsconfig.json" file. TypeScript confusingly declares the +// global "WebAssembly" type in "lib.dom.d.ts" even though it has nothing to do +// with the browser DOM and is present in many non-browser JavaScript runtimes +// (e.g. node and deno). Declaring it here allows esbuild's API to be used in +// these scenarios. +// +// There's an open issue about getting this problem corrected (although these +// declarations will need to remain even if this is fixed for backward +// compatibility with older TypeScript versions): +// +// https://github.com/microsoft/TypeScript-DOM-lib-generator/issues/826 +// +declare global { + namespace WebAssembly { + interface Module { + } + } + interface URL { + } +} diff --git a/node_modules/esbuild/lib/main.js b/node_modules/esbuild/lib/main.js new file mode 100644 index 0000000..a0397c4 --- /dev/null +++ b/node_modules/esbuild/lib/main.js @@ -0,0 +1,2237 @@ +"use strict"; +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 __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// lib/npm/node.ts +var node_exports = {}; +__export(node_exports, { + analyzeMetafile: () => analyzeMetafile, + analyzeMetafileSync: () => analyzeMetafileSync, + build: () => build, + buildSync: () => buildSync, + context: () => context, + default: () => node_default, + formatMessages: () => formatMessages, + formatMessagesSync: () => formatMessagesSync, + initialize: () => initialize, + stop: () => stop, + transform: () => transform, + transformSync: () => transformSync, + version: () => version +}); +module.exports = __toCommonJS(node_exports); + +// lib/shared/stdio_protocol.ts +function encodePacket(packet) { + let visit = (value) => { + if (value === null) { + bb.write8(0); + } else if (typeof value === "boolean") { + bb.write8(1); + bb.write8(+value); + } else if (typeof value === "number") { + bb.write8(2); + bb.write32(value | 0); + } else if (typeof value === "string") { + bb.write8(3); + bb.write(encodeUTF8(value)); + } else if (value instanceof Uint8Array) { + bb.write8(4); + bb.write(value); + } else if (value instanceof Array) { + bb.write8(5); + bb.write32(value.length); + for (let item of value) { + visit(item); + } + } else { + let keys = Object.keys(value); + bb.write8(6); + bb.write32(keys.length); + for (let key of keys) { + bb.write(encodeUTF8(key)); + visit(value[key]); + } + } + }; + let bb = new ByteBuffer(); + bb.write32(0); + bb.write32(packet.id << 1 | +!packet.isRequest); + visit(packet.value); + writeUInt32LE(bb.buf, bb.len - 4, 0); + return bb.buf.subarray(0, bb.len); +} +function decodePacket(bytes) { + let visit = () => { + switch (bb.read8()) { + case 0: + return null; + case 1: + return !!bb.read8(); + case 2: + return bb.read32(); + case 3: + return decodeUTF8(bb.read()); + case 4: + return bb.read(); + case 5: { + let count = bb.read32(); + let value2 = []; + for (let i = 0; i < count; i++) { + value2.push(visit()); + } + return value2; + } + case 6: { + let count = bb.read32(); + let value2 = {}; + for (let i = 0; i < count; i++) { + value2[decodeUTF8(bb.read())] = visit(); + } + return value2; + } + default: + throw new Error("Invalid packet"); + } + }; + let bb = new ByteBuffer(bytes); + let id = bb.read32(); + let isRequest = (id & 1) === 0; + id >>>= 1; + let value = visit(); + if (bb.ptr !== bytes.length) { + throw new Error("Invalid packet"); + } + return { id, isRequest, value }; +} +var ByteBuffer = class { + constructor(buf = new Uint8Array(1024)) { + this.buf = buf; + this.len = 0; + this.ptr = 0; + } + _write(delta) { + if (this.len + delta > this.buf.length) { + let clone = new Uint8Array((this.len + delta) * 2); + clone.set(this.buf); + this.buf = clone; + } + this.len += delta; + return this.len - delta; + } + write8(value) { + let offset = this._write(1); + this.buf[offset] = value; + } + write32(value) { + let offset = this._write(4); + writeUInt32LE(this.buf, value, offset); + } + write(bytes) { + let offset = this._write(4 + bytes.length); + writeUInt32LE(this.buf, bytes.length, offset); + this.buf.set(bytes, offset + 4); + } + _read(delta) { + if (this.ptr + delta > this.buf.length) { + throw new Error("Invalid packet"); + } + this.ptr += delta; + return this.ptr - delta; + } + read8() { + return this.buf[this._read(1)]; + } + read32() { + return readUInt32LE(this.buf, this._read(4)); + } + read() { + let length = this.read32(); + let bytes = new Uint8Array(length); + let ptr = this._read(bytes.length); + bytes.set(this.buf.subarray(ptr, ptr + length)); + return bytes; + } +}; +var encodeUTF8; +var decodeUTF8; +var encodeInvariant; +if (typeof TextEncoder !== "undefined" && typeof TextDecoder !== "undefined") { + let encoder = new TextEncoder(); + let decoder = new TextDecoder(); + encodeUTF8 = (text) => encoder.encode(text); + decodeUTF8 = (bytes) => decoder.decode(bytes); + encodeInvariant = 'new TextEncoder().encode("")'; +} else if (typeof Buffer !== "undefined") { + encodeUTF8 = (text) => Buffer.from(text); + decodeUTF8 = (bytes) => { + let { buffer, byteOffset, byteLength } = bytes; + return Buffer.from(buffer, byteOffset, byteLength).toString(); + }; + encodeInvariant = 'Buffer.from("")'; +} else { + throw new Error("No UTF-8 codec found"); +} +if (!(encodeUTF8("") instanceof Uint8Array)) + throw new Error(`Invariant violation: "${encodeInvariant} instanceof Uint8Array" is incorrectly false + +This indicates that your JavaScript environment is broken. You cannot use +esbuild in this environment because esbuild relies on this invariant. This +is not a problem with esbuild. You need to fix your environment instead. +`); +function readUInt32LE(buffer, offset) { + return buffer[offset++] | buffer[offset++] << 8 | buffer[offset++] << 16 | buffer[offset++] << 24; +} +function writeUInt32LE(buffer, value, offset) { + buffer[offset++] = value; + buffer[offset++] = value >> 8; + buffer[offset++] = value >> 16; + buffer[offset++] = value >> 24; +} + +// lib/shared/common.ts +var quote = JSON.stringify; +var buildLogLevelDefault = "warning"; +var transformLogLevelDefault = "silent"; +function validateAndJoinStringArray(values, what) { + const toJoin = []; + for (const value of values) { + validateStringValue(value, what); + if (value.indexOf(",") >= 0) throw new Error(`Invalid ${what}: ${value}`); + toJoin.push(value); + } + return toJoin.join(","); +} +var canBeAnything = () => null; +var mustBeBoolean = (value) => typeof value === "boolean" ? null : "a boolean"; +var mustBeString = (value) => typeof value === "string" ? null : "a string"; +var mustBeRegExp = (value) => value instanceof RegExp ? null : "a RegExp object"; +var mustBeInteger = (value) => typeof value === "number" && value === (value | 0) ? null : "an integer"; +var mustBeValidPortNumber = (value) => typeof value === "number" && value === (value | 0) && value >= 0 && value <= 65535 ? null : "a valid port number"; +var mustBeFunction = (value) => typeof value === "function" ? null : "a function"; +var mustBeArray = (value) => Array.isArray(value) ? null : "an array"; +var mustBeArrayOfStrings = (value) => Array.isArray(value) && value.every((x) => typeof x === "string") ? null : "an array of strings"; +var mustBeObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value) ? null : "an object"; +var mustBeEntryPoints = (value) => typeof value === "object" && value !== null ? null : "an array or an object"; +var mustBeWebAssemblyModule = (value) => value instanceof WebAssembly.Module ? null : "a WebAssembly.Module"; +var mustBeObjectOrNull = (value) => typeof value === "object" && !Array.isArray(value) ? null : "an object or null"; +var mustBeStringOrBoolean = (value) => typeof value === "string" || typeof value === "boolean" ? null : "a string or a boolean"; +var mustBeStringOrObject = (value) => typeof value === "string" || typeof value === "object" && value !== null && !Array.isArray(value) ? null : "a string or an object"; +var mustBeStringOrArrayOfStrings = (value) => typeof value === "string" || Array.isArray(value) && value.every((x) => typeof x === "string") ? null : "a string or an array of strings"; +var mustBeStringOrUint8Array = (value) => typeof value === "string" || value instanceof Uint8Array ? null : "a string or a Uint8Array"; +var mustBeStringOrURL = (value) => typeof value === "string" || value instanceof URL ? null : "a string or a URL"; +function getFlag(object, keys, key, mustBeFn) { + let value = object[key]; + keys[key + ""] = true; + if (value === void 0) return void 0; + let mustBe = mustBeFn(value); + if (mustBe !== null) throw new Error(`${quote(key)} must be ${mustBe}`); + return value; +} +function checkForInvalidFlags(object, keys, where) { + for (let key in object) { + if (!(key in keys)) { + throw new Error(`Invalid option ${where}: ${quote(key)}`); + } + } +} +function validateInitializeOptions(options) { + let keys = /* @__PURE__ */ Object.create(null); + let wasmURL = getFlag(options, keys, "wasmURL", mustBeStringOrURL); + let wasmModule = getFlag(options, keys, "wasmModule", mustBeWebAssemblyModule); + let worker = getFlag(options, keys, "worker", mustBeBoolean); + checkForInvalidFlags(options, keys, "in initialize() call"); + return { + wasmURL, + wasmModule, + worker + }; +} +function validateMangleCache(mangleCache) { + let validated; + if (mangleCache !== void 0) { + validated = /* @__PURE__ */ Object.create(null); + for (let key in mangleCache) { + let value = mangleCache[key]; + if (typeof value === "string" || value === false) { + validated[key] = value; + } else { + throw new Error(`Expected ${quote(key)} in mangle cache to map to either a string or false`); + } + } + } + return validated; +} +function pushLogFlags(flags, options, keys, isTTY2, logLevelDefault) { + let color = getFlag(options, keys, "color", mustBeBoolean); + let logLevel = getFlag(options, keys, "logLevel", mustBeString); + let logLimit = getFlag(options, keys, "logLimit", mustBeInteger); + if (color !== void 0) flags.push(`--color=${color}`); + else if (isTTY2) flags.push(`--color=true`); + flags.push(`--log-level=${logLevel || logLevelDefault}`); + flags.push(`--log-limit=${logLimit || 0}`); +} +function validateStringValue(value, what, key) { + if (typeof value !== "string") { + throw new Error(`Expected value for ${what}${key !== void 0 ? " " + quote(key) : ""} to be a string, got ${typeof value} instead`); + } + return value; +} +function pushCommonFlags(flags, options, keys) { + let legalComments = getFlag(options, keys, "legalComments", mustBeString); + let sourceRoot = getFlag(options, keys, "sourceRoot", mustBeString); + let sourcesContent = getFlag(options, keys, "sourcesContent", mustBeBoolean); + let target = getFlag(options, keys, "target", mustBeStringOrArrayOfStrings); + let format = getFlag(options, keys, "format", mustBeString); + let globalName = getFlag(options, keys, "globalName", mustBeString); + let mangleProps = getFlag(options, keys, "mangleProps", mustBeRegExp); + let reserveProps = getFlag(options, keys, "reserveProps", mustBeRegExp); + let mangleQuoted = getFlag(options, keys, "mangleQuoted", mustBeBoolean); + let minify = getFlag(options, keys, "minify", mustBeBoolean); + let minifySyntax = getFlag(options, keys, "minifySyntax", mustBeBoolean); + let minifyWhitespace = getFlag(options, keys, "minifyWhitespace", mustBeBoolean); + let minifyIdentifiers = getFlag(options, keys, "minifyIdentifiers", mustBeBoolean); + let lineLimit = getFlag(options, keys, "lineLimit", mustBeInteger); + let drop = getFlag(options, keys, "drop", mustBeArrayOfStrings); + let dropLabels = getFlag(options, keys, "dropLabels", mustBeArrayOfStrings); + let charset = getFlag(options, keys, "charset", mustBeString); + let treeShaking = getFlag(options, keys, "treeShaking", mustBeBoolean); + let ignoreAnnotations = getFlag(options, keys, "ignoreAnnotations", mustBeBoolean); + let jsx = getFlag(options, keys, "jsx", mustBeString); + let jsxFactory = getFlag(options, keys, "jsxFactory", mustBeString); + let jsxFragment = getFlag(options, keys, "jsxFragment", mustBeString); + let jsxImportSource = getFlag(options, keys, "jsxImportSource", mustBeString); + let jsxDev = getFlag(options, keys, "jsxDev", mustBeBoolean); + let jsxSideEffects = getFlag(options, keys, "jsxSideEffects", mustBeBoolean); + let define = getFlag(options, keys, "define", mustBeObject); + let logOverride = getFlag(options, keys, "logOverride", mustBeObject); + let supported = getFlag(options, keys, "supported", mustBeObject); + let pure = getFlag(options, keys, "pure", mustBeArrayOfStrings); + let keepNames = getFlag(options, keys, "keepNames", mustBeBoolean); + let platform = getFlag(options, keys, "platform", mustBeString); + let tsconfigRaw = getFlag(options, keys, "tsconfigRaw", mustBeStringOrObject); + if (legalComments) flags.push(`--legal-comments=${legalComments}`); + if (sourceRoot !== void 0) flags.push(`--source-root=${sourceRoot}`); + if (sourcesContent !== void 0) flags.push(`--sources-content=${sourcesContent}`); + if (target) flags.push(`--target=${validateAndJoinStringArray(Array.isArray(target) ? target : [target], "target")}`); + if (format) flags.push(`--format=${format}`); + if (globalName) flags.push(`--global-name=${globalName}`); + if (platform) flags.push(`--platform=${platform}`); + if (tsconfigRaw) flags.push(`--tsconfig-raw=${typeof tsconfigRaw === "string" ? tsconfigRaw : JSON.stringify(tsconfigRaw)}`); + if (minify) flags.push("--minify"); + if (minifySyntax) flags.push("--minify-syntax"); + if (minifyWhitespace) flags.push("--minify-whitespace"); + if (minifyIdentifiers) flags.push("--minify-identifiers"); + if (lineLimit) flags.push(`--line-limit=${lineLimit}`); + if (charset) flags.push(`--charset=${charset}`); + if (treeShaking !== void 0) flags.push(`--tree-shaking=${treeShaking}`); + if (ignoreAnnotations) flags.push(`--ignore-annotations`); + if (drop) for (let what of drop) flags.push(`--drop:${validateStringValue(what, "drop")}`); + if (dropLabels) flags.push(`--drop-labels=${validateAndJoinStringArray(dropLabels, "drop label")}`); + if (mangleProps) flags.push(`--mangle-props=${jsRegExpToGoRegExp(mangleProps)}`); + if (reserveProps) flags.push(`--reserve-props=${jsRegExpToGoRegExp(reserveProps)}`); + if (mangleQuoted !== void 0) flags.push(`--mangle-quoted=${mangleQuoted}`); + if (jsx) flags.push(`--jsx=${jsx}`); + if (jsxFactory) flags.push(`--jsx-factory=${jsxFactory}`); + if (jsxFragment) flags.push(`--jsx-fragment=${jsxFragment}`); + if (jsxImportSource) flags.push(`--jsx-import-source=${jsxImportSource}`); + if (jsxDev) flags.push(`--jsx-dev`); + if (jsxSideEffects) flags.push(`--jsx-side-effects`); + if (define) { + for (let key in define) { + if (key.indexOf("=") >= 0) throw new Error(`Invalid define: ${key}`); + flags.push(`--define:${key}=${validateStringValue(define[key], "define", key)}`); + } + } + if (logOverride) { + for (let key in logOverride) { + if (key.indexOf("=") >= 0) throw new Error(`Invalid log override: ${key}`); + flags.push(`--log-override:${key}=${validateStringValue(logOverride[key], "log override", key)}`); + } + } + if (supported) { + for (let key in supported) { + if (key.indexOf("=") >= 0) throw new Error(`Invalid supported: ${key}`); + const value = supported[key]; + if (typeof value !== "boolean") throw new Error(`Expected value for supported ${quote(key)} to be a boolean, got ${typeof value} instead`); + flags.push(`--supported:${key}=${value}`); + } + } + if (pure) for (let fn of pure) flags.push(`--pure:${validateStringValue(fn, "pure")}`); + if (keepNames) flags.push(`--keep-names`); +} +function flagsForBuildOptions(callName, options, isTTY2, logLevelDefault, writeDefault) { + var _a2; + let flags = []; + let entries = []; + let keys = /* @__PURE__ */ Object.create(null); + let stdinContents = null; + let stdinResolveDir = null; + pushLogFlags(flags, options, keys, isTTY2, logLevelDefault); + pushCommonFlags(flags, options, keys); + let sourcemap = getFlag(options, keys, "sourcemap", mustBeStringOrBoolean); + let bundle = getFlag(options, keys, "bundle", mustBeBoolean); + let splitting = getFlag(options, keys, "splitting", mustBeBoolean); + let preserveSymlinks = getFlag(options, keys, "preserveSymlinks", mustBeBoolean); + let metafile = getFlag(options, keys, "metafile", mustBeBoolean); + let outfile = getFlag(options, keys, "outfile", mustBeString); + let outdir = getFlag(options, keys, "outdir", mustBeString); + let outbase = getFlag(options, keys, "outbase", mustBeString); + let tsconfig = getFlag(options, keys, "tsconfig", mustBeString); + let resolveExtensions = getFlag(options, keys, "resolveExtensions", mustBeArrayOfStrings); + let nodePathsInput = getFlag(options, keys, "nodePaths", mustBeArrayOfStrings); + let mainFields = getFlag(options, keys, "mainFields", mustBeArrayOfStrings); + let conditions = getFlag(options, keys, "conditions", mustBeArrayOfStrings); + let external = getFlag(options, keys, "external", mustBeArrayOfStrings); + let packages = getFlag(options, keys, "packages", mustBeString); + let alias = getFlag(options, keys, "alias", mustBeObject); + let loader = getFlag(options, keys, "loader", mustBeObject); + let outExtension = getFlag(options, keys, "outExtension", mustBeObject); + let publicPath = getFlag(options, keys, "publicPath", mustBeString); + let entryNames = getFlag(options, keys, "entryNames", mustBeString); + let chunkNames = getFlag(options, keys, "chunkNames", mustBeString); + let assetNames = getFlag(options, keys, "assetNames", mustBeString); + let inject = getFlag(options, keys, "inject", mustBeArrayOfStrings); + let banner = getFlag(options, keys, "banner", mustBeObject); + let footer = getFlag(options, keys, "footer", mustBeObject); + let entryPoints = getFlag(options, keys, "entryPoints", mustBeEntryPoints); + let absWorkingDir = getFlag(options, keys, "absWorkingDir", mustBeString); + let stdin = getFlag(options, keys, "stdin", mustBeObject); + let write = (_a2 = getFlag(options, keys, "write", mustBeBoolean)) != null ? _a2 : writeDefault; + let allowOverwrite = getFlag(options, keys, "allowOverwrite", mustBeBoolean); + let mangleCache = getFlag(options, keys, "mangleCache", mustBeObject); + keys.plugins = true; + checkForInvalidFlags(options, keys, `in ${callName}() call`); + if (sourcemap) flags.push(`--sourcemap${sourcemap === true ? "" : `=${sourcemap}`}`); + if (bundle) flags.push("--bundle"); + if (allowOverwrite) flags.push("--allow-overwrite"); + if (splitting) flags.push("--splitting"); + if (preserveSymlinks) flags.push("--preserve-symlinks"); + if (metafile) flags.push(`--metafile`); + if (outfile) flags.push(`--outfile=${outfile}`); + if (outdir) flags.push(`--outdir=${outdir}`); + if (outbase) flags.push(`--outbase=${outbase}`); + if (tsconfig) flags.push(`--tsconfig=${tsconfig}`); + if (packages) flags.push(`--packages=${packages}`); + if (resolveExtensions) flags.push(`--resolve-extensions=${validateAndJoinStringArray(resolveExtensions, "resolve extension")}`); + if (publicPath) flags.push(`--public-path=${publicPath}`); + if (entryNames) flags.push(`--entry-names=${entryNames}`); + if (chunkNames) flags.push(`--chunk-names=${chunkNames}`); + if (assetNames) flags.push(`--asset-names=${assetNames}`); + if (mainFields) flags.push(`--main-fields=${validateAndJoinStringArray(mainFields, "main field")}`); + if (conditions) flags.push(`--conditions=${validateAndJoinStringArray(conditions, "condition")}`); + if (external) for (let name of external) flags.push(`--external:${validateStringValue(name, "external")}`); + if (alias) { + for (let old in alias) { + if (old.indexOf("=") >= 0) throw new Error(`Invalid package name in alias: ${old}`); + flags.push(`--alias:${old}=${validateStringValue(alias[old], "alias", old)}`); + } + } + if (banner) { + for (let type in banner) { + if (type.indexOf("=") >= 0) throw new Error(`Invalid banner file type: ${type}`); + flags.push(`--banner:${type}=${validateStringValue(banner[type], "banner", type)}`); + } + } + if (footer) { + for (let type in footer) { + if (type.indexOf("=") >= 0) throw new Error(`Invalid footer file type: ${type}`); + flags.push(`--footer:${type}=${validateStringValue(footer[type], "footer", type)}`); + } + } + if (inject) for (let path3 of inject) flags.push(`--inject:${validateStringValue(path3, "inject")}`); + if (loader) { + for (let ext in loader) { + if (ext.indexOf("=") >= 0) throw new Error(`Invalid loader extension: ${ext}`); + flags.push(`--loader:${ext}=${validateStringValue(loader[ext], "loader", ext)}`); + } + } + if (outExtension) { + for (let ext in outExtension) { + if (ext.indexOf("=") >= 0) throw new Error(`Invalid out extension: ${ext}`); + flags.push(`--out-extension:${ext}=${validateStringValue(outExtension[ext], "out extension", ext)}`); + } + } + if (entryPoints) { + if (Array.isArray(entryPoints)) { + for (let i = 0, n = entryPoints.length; i < n; i++) { + let entryPoint = entryPoints[i]; + if (typeof entryPoint === "object" && entryPoint !== null) { + let entryPointKeys = /* @__PURE__ */ Object.create(null); + let input = getFlag(entryPoint, entryPointKeys, "in", mustBeString); + let output = getFlag(entryPoint, entryPointKeys, "out", mustBeString); + checkForInvalidFlags(entryPoint, entryPointKeys, "in entry point at index " + i); + if (input === void 0) throw new Error('Missing property "in" for entry point at index ' + i); + if (output === void 0) throw new Error('Missing property "out" for entry point at index ' + i); + entries.push([output, input]); + } else { + entries.push(["", validateStringValue(entryPoint, "entry point at index " + i)]); + } + } + } else { + for (let key in entryPoints) { + entries.push([key, validateStringValue(entryPoints[key], "entry point", key)]); + } + } + } + if (stdin) { + let stdinKeys = /* @__PURE__ */ Object.create(null); + let contents = getFlag(stdin, stdinKeys, "contents", mustBeStringOrUint8Array); + let resolveDir = getFlag(stdin, stdinKeys, "resolveDir", mustBeString); + let sourcefile = getFlag(stdin, stdinKeys, "sourcefile", mustBeString); + let loader2 = getFlag(stdin, stdinKeys, "loader", mustBeString); + checkForInvalidFlags(stdin, stdinKeys, 'in "stdin" object'); + if (sourcefile) flags.push(`--sourcefile=${sourcefile}`); + if (loader2) flags.push(`--loader=${loader2}`); + if (resolveDir) stdinResolveDir = resolveDir; + if (typeof contents === "string") stdinContents = encodeUTF8(contents); + else if (contents instanceof Uint8Array) stdinContents = contents; + } + let nodePaths = []; + if (nodePathsInput) { + for (let value of nodePathsInput) { + value += ""; + nodePaths.push(value); + } + } + return { + entries, + flags, + write, + stdinContents, + stdinResolveDir, + absWorkingDir, + nodePaths, + mangleCache: validateMangleCache(mangleCache) + }; +} +function flagsForTransformOptions(callName, options, isTTY2, logLevelDefault) { + let flags = []; + let keys = /* @__PURE__ */ Object.create(null); + pushLogFlags(flags, options, keys, isTTY2, logLevelDefault); + pushCommonFlags(flags, options, keys); + let sourcemap = getFlag(options, keys, "sourcemap", mustBeStringOrBoolean); + let sourcefile = getFlag(options, keys, "sourcefile", mustBeString); + let loader = getFlag(options, keys, "loader", mustBeString); + let banner = getFlag(options, keys, "banner", mustBeString); + let footer = getFlag(options, keys, "footer", mustBeString); + let mangleCache = getFlag(options, keys, "mangleCache", mustBeObject); + checkForInvalidFlags(options, keys, `in ${callName}() call`); + if (sourcemap) flags.push(`--sourcemap=${sourcemap === true ? "external" : sourcemap}`); + if (sourcefile) flags.push(`--sourcefile=${sourcefile}`); + if (loader) flags.push(`--loader=${loader}`); + if (banner) flags.push(`--banner=${banner}`); + if (footer) flags.push(`--footer=${footer}`); + return { + flags, + mangleCache: validateMangleCache(mangleCache) + }; +} +function createChannel(streamIn) { + const requestCallbacksByKey = {}; + const closeData = { didClose: false, reason: "" }; + let responseCallbacks = {}; + let nextRequestID = 0; + let nextBuildKey = 0; + let stdout = new Uint8Array(16 * 1024); + let stdoutUsed = 0; + let readFromStdout = (chunk) => { + let limit = stdoutUsed + chunk.length; + if (limit > stdout.length) { + let swap = new Uint8Array(limit * 2); + swap.set(stdout); + stdout = swap; + } + stdout.set(chunk, stdoutUsed); + stdoutUsed += chunk.length; + let offset = 0; + while (offset + 4 <= stdoutUsed) { + let length = readUInt32LE(stdout, offset); + if (offset + 4 + length > stdoutUsed) { + break; + } + offset += 4; + handleIncomingPacket(stdout.subarray(offset, offset + length)); + offset += length; + } + if (offset > 0) { + stdout.copyWithin(0, offset, stdoutUsed); + stdoutUsed -= offset; + } + }; + let afterClose = (error) => { + closeData.didClose = true; + if (error) closeData.reason = ": " + (error.message || error); + const text = "The service was stopped" + closeData.reason; + for (let id in responseCallbacks) { + responseCallbacks[id](text, null); + } + responseCallbacks = {}; + }; + let sendRequest = (refs, value, callback) => { + if (closeData.didClose) return callback("The service is no longer running" + closeData.reason, null); + let id = nextRequestID++; + responseCallbacks[id] = (error, response) => { + try { + callback(error, response); + } finally { + if (refs) refs.unref(); + } + }; + if (refs) refs.ref(); + streamIn.writeToStdin(encodePacket({ id, isRequest: true, value })); + }; + let sendResponse = (id, value) => { + if (closeData.didClose) throw new Error("The service is no longer running" + closeData.reason); + streamIn.writeToStdin(encodePacket({ id, isRequest: false, value })); + }; + let handleRequest = async (id, request) => { + try { + if (request.command === "ping") { + sendResponse(id, {}); + return; + } + if (typeof request.key === "number") { + const requestCallbacks = requestCallbacksByKey[request.key]; + if (!requestCallbacks) { + return; + } + const callback = requestCallbacks[request.command]; + if (callback) { + await callback(id, request); + return; + } + } + throw new Error(`Invalid command: ` + request.command); + } catch (e) { + const errors = [extractErrorMessageV8(e, streamIn, null, void 0, "")]; + try { + sendResponse(id, { errors }); + } catch { + } + } + }; + let isFirstPacket = true; + let handleIncomingPacket = (bytes) => { + if (isFirstPacket) { + isFirstPacket = false; + let binaryVersion = String.fromCharCode(...bytes); + if (binaryVersion !== "0.25.4") { + throw new Error(`Cannot start service: Host version "${"0.25.4"}" does not match binary version ${quote(binaryVersion)}`); + } + return; + } + let packet = decodePacket(bytes); + if (packet.isRequest) { + handleRequest(packet.id, packet.value); + } else { + let callback = responseCallbacks[packet.id]; + delete responseCallbacks[packet.id]; + if (packet.value.error) callback(packet.value.error, {}); + else callback(null, packet.value); + } + }; + let buildOrContext = ({ callName, refs, options, isTTY: isTTY2, defaultWD: defaultWD2, callback }) => { + let refCount = 0; + const buildKey = nextBuildKey++; + const requestCallbacks = {}; + const buildRefs = { + ref() { + if (++refCount === 1) { + if (refs) refs.ref(); + } + }, + unref() { + if (--refCount === 0) { + delete requestCallbacksByKey[buildKey]; + if (refs) refs.unref(); + } + } + }; + requestCallbacksByKey[buildKey] = requestCallbacks; + buildRefs.ref(); + buildOrContextImpl( + callName, + buildKey, + sendRequest, + sendResponse, + buildRefs, + streamIn, + requestCallbacks, + options, + isTTY2, + defaultWD2, + (err, res) => { + try { + callback(err, res); + } finally { + buildRefs.unref(); + } + } + ); + }; + let transform2 = ({ callName, refs, input, options, isTTY: isTTY2, fs: fs3, callback }) => { + const details = createObjectStash(); + let start = (inputPath) => { + try { + if (typeof input !== "string" && !(input instanceof Uint8Array)) + throw new Error('The input to "transform" must be a string or a Uint8Array'); + let { + flags, + mangleCache + } = flagsForTransformOptions(callName, options, isTTY2, transformLogLevelDefault); + let request = { + command: "transform", + flags, + inputFS: inputPath !== null, + input: inputPath !== null ? encodeUTF8(inputPath) : typeof input === "string" ? encodeUTF8(input) : input + }; + if (mangleCache) request.mangleCache = mangleCache; + sendRequest(refs, request, (error, response) => { + if (error) return callback(new Error(error), null); + let errors = replaceDetailsInMessages(response.errors, details); + let warnings = replaceDetailsInMessages(response.warnings, details); + let outstanding = 1; + let next = () => { + if (--outstanding === 0) { + let result = { + warnings, + code: response.code, + map: response.map, + mangleCache: void 0, + legalComments: void 0 + }; + if ("legalComments" in response) result.legalComments = response == null ? void 0 : response.legalComments; + if (response.mangleCache) result.mangleCache = response == null ? void 0 : response.mangleCache; + callback(null, result); + } + }; + if (errors.length > 0) return callback(failureErrorWithLog("Transform failed", errors, warnings), null); + if (response.codeFS) { + outstanding++; + fs3.readFile(response.code, (err, contents) => { + if (err !== null) { + callback(err, null); + } else { + response.code = contents; + next(); + } + }); + } + if (response.mapFS) { + outstanding++; + fs3.readFile(response.map, (err, contents) => { + if (err !== null) { + callback(err, null); + } else { + response.map = contents; + next(); + } + }); + } + next(); + }); + } catch (e) { + let flags = []; + try { + pushLogFlags(flags, options, {}, isTTY2, transformLogLevelDefault); + } catch { + } + const error = extractErrorMessageV8(e, streamIn, details, void 0, ""); + sendRequest(refs, { command: "error", flags, error }, () => { + error.detail = details.load(error.detail); + callback(failureErrorWithLog("Transform failed", [error], []), null); + }); + } + }; + if ((typeof input === "string" || input instanceof Uint8Array) && input.length > 1024 * 1024) { + let next = start; + start = () => fs3.writeFile(input, next); + } + start(null); + }; + let formatMessages2 = ({ callName, refs, messages, options, callback }) => { + if (!options) throw new Error(`Missing second argument in ${callName}() call`); + let keys = {}; + let kind = getFlag(options, keys, "kind", mustBeString); + let color = getFlag(options, keys, "color", mustBeBoolean); + let terminalWidth = getFlag(options, keys, "terminalWidth", mustBeInteger); + checkForInvalidFlags(options, keys, `in ${callName}() call`); + if (kind === void 0) throw new Error(`Missing "kind" in ${callName}() call`); + if (kind !== "error" && kind !== "warning") throw new Error(`Expected "kind" to be "error" or "warning" in ${callName}() call`); + let request = { + command: "format-msgs", + messages: sanitizeMessages(messages, "messages", null, "", terminalWidth), + isWarning: kind === "warning" + }; + if (color !== void 0) request.color = color; + if (terminalWidth !== void 0) request.terminalWidth = terminalWidth; + sendRequest(refs, request, (error, response) => { + if (error) return callback(new Error(error), null); + callback(null, response.messages); + }); + }; + let analyzeMetafile2 = ({ callName, refs, metafile, options, callback }) => { + if (options === void 0) options = {}; + let keys = {}; + let color = getFlag(options, keys, "color", mustBeBoolean); + let verbose = getFlag(options, keys, "verbose", mustBeBoolean); + checkForInvalidFlags(options, keys, `in ${callName}() call`); + let request = { + command: "analyze-metafile", + metafile + }; + if (color !== void 0) request.color = color; + if (verbose !== void 0) request.verbose = verbose; + sendRequest(refs, request, (error, response) => { + if (error) return callback(new Error(error), null); + callback(null, response.result); + }); + }; + return { + readFromStdout, + afterClose, + service: { + buildOrContext, + transform: transform2, + formatMessages: formatMessages2, + analyzeMetafile: analyzeMetafile2 + } + }; +} +function buildOrContextImpl(callName, buildKey, sendRequest, sendResponse, refs, streamIn, requestCallbacks, options, isTTY2, defaultWD2, callback) { + const details = createObjectStash(); + const isContext = callName === "context"; + const handleError = (e, pluginName) => { + const flags = []; + try { + pushLogFlags(flags, options, {}, isTTY2, buildLogLevelDefault); + } catch { + } + const message = extractErrorMessageV8(e, streamIn, details, void 0, pluginName); + sendRequest(refs, { command: "error", flags, error: message }, () => { + message.detail = details.load(message.detail); + callback(failureErrorWithLog(isContext ? "Context failed" : "Build failed", [message], []), null); + }); + }; + let plugins; + if (typeof options === "object") { + const value = options.plugins; + if (value !== void 0) { + if (!Array.isArray(value)) return handleError(new Error(`"plugins" must be an array`), ""); + plugins = value; + } + } + if (plugins && plugins.length > 0) { + if (streamIn.isSync) return handleError(new Error("Cannot use plugins in synchronous API calls"), ""); + handlePlugins( + buildKey, + sendRequest, + sendResponse, + refs, + streamIn, + requestCallbacks, + options, + plugins, + details + ).then( + (result) => { + if (!result.ok) return handleError(result.error, result.pluginName); + try { + buildOrContextContinue(result.requestPlugins, result.runOnEndCallbacks, result.scheduleOnDisposeCallbacks); + } catch (e) { + handleError(e, ""); + } + }, + (e) => handleError(e, "") + ); + return; + } + try { + buildOrContextContinue(null, (result, done) => done([], []), () => { + }); + } catch (e) { + handleError(e, ""); + } + function buildOrContextContinue(requestPlugins, runOnEndCallbacks, scheduleOnDisposeCallbacks) { + const writeDefault = streamIn.hasFS; + const { + entries, + flags, + write, + stdinContents, + stdinResolveDir, + absWorkingDir, + nodePaths, + mangleCache + } = flagsForBuildOptions(callName, options, isTTY2, buildLogLevelDefault, writeDefault); + if (write && !streamIn.hasFS) throw new Error(`The "write" option is unavailable in this environment`); + const request = { + command: "build", + key: buildKey, + entries, + flags, + write, + stdinContents, + stdinResolveDir, + absWorkingDir: absWorkingDir || defaultWD2, + nodePaths, + context: isContext + }; + if (requestPlugins) request.plugins = requestPlugins; + if (mangleCache) request.mangleCache = mangleCache; + const buildResponseToResult = (response, callback2) => { + const result = { + errors: replaceDetailsInMessages(response.errors, details), + warnings: replaceDetailsInMessages(response.warnings, details), + outputFiles: void 0, + metafile: void 0, + mangleCache: void 0 + }; + const originalErrors = result.errors.slice(); + const originalWarnings = result.warnings.slice(); + if (response.outputFiles) result.outputFiles = response.outputFiles.map(convertOutputFiles); + if (response.metafile) result.metafile = JSON.parse(response.metafile); + if (response.mangleCache) result.mangleCache = response.mangleCache; + if (response.writeToStdout !== void 0) console.log(decodeUTF8(response.writeToStdout).replace(/\n$/, "")); + runOnEndCallbacks(result, (onEndErrors, onEndWarnings) => { + if (originalErrors.length > 0 || onEndErrors.length > 0) { + const error = failureErrorWithLog("Build failed", originalErrors.concat(onEndErrors), originalWarnings.concat(onEndWarnings)); + return callback2(error, null, onEndErrors, onEndWarnings); + } + callback2(null, result, onEndErrors, onEndWarnings); + }); + }; + let latestResultPromise; + let provideLatestResult; + if (isContext) + requestCallbacks["on-end"] = (id, request2) => new Promise((resolve) => { + buildResponseToResult(request2, (err, result, onEndErrors, onEndWarnings) => { + const response = { + errors: onEndErrors, + warnings: onEndWarnings + }; + if (provideLatestResult) provideLatestResult(err, result); + latestResultPromise = void 0; + provideLatestResult = void 0; + sendResponse(id, response); + resolve(); + }); + }); + sendRequest(refs, request, (error, response) => { + if (error) return callback(new Error(error), null); + if (!isContext) { + return buildResponseToResult(response, (err, res) => { + scheduleOnDisposeCallbacks(); + return callback(err, res); + }); + } + if (response.errors.length > 0) { + return callback(failureErrorWithLog("Context failed", response.errors, response.warnings), null); + } + let didDispose = false; + const result = { + rebuild: () => { + if (!latestResultPromise) latestResultPromise = new Promise((resolve, reject) => { + let settlePromise; + provideLatestResult = (err, result2) => { + if (!settlePromise) settlePromise = () => err ? reject(err) : resolve(result2); + }; + const triggerAnotherBuild = () => { + const request2 = { + command: "rebuild", + key: buildKey + }; + sendRequest(refs, request2, (error2, response2) => { + if (error2) { + reject(new Error(error2)); + } else if (settlePromise) { + settlePromise(); + } else { + triggerAnotherBuild(); + } + }); + }; + triggerAnotherBuild(); + }); + return latestResultPromise; + }, + watch: (options2 = {}) => new Promise((resolve, reject) => { + if (!streamIn.hasFS) throw new Error(`Cannot use the "watch" API in this environment`); + const keys = {}; + checkForInvalidFlags(options2, keys, `in watch() call`); + const request2 = { + command: "watch", + key: buildKey + }; + sendRequest(refs, request2, (error2) => { + if (error2) reject(new Error(error2)); + else resolve(void 0); + }); + }), + serve: (options2 = {}) => new Promise((resolve, reject) => { + if (!streamIn.hasFS) throw new Error(`Cannot use the "serve" API in this environment`); + const keys = {}; + const port = getFlag(options2, keys, "port", mustBeValidPortNumber); + const host = getFlag(options2, keys, "host", mustBeString); + const servedir = getFlag(options2, keys, "servedir", mustBeString); + const keyfile = getFlag(options2, keys, "keyfile", mustBeString); + const certfile = getFlag(options2, keys, "certfile", mustBeString); + const fallback = getFlag(options2, keys, "fallback", mustBeString); + const cors = getFlag(options2, keys, "cors", mustBeObject); + const onRequest = getFlag(options2, keys, "onRequest", mustBeFunction); + checkForInvalidFlags(options2, keys, `in serve() call`); + const request2 = { + command: "serve", + key: buildKey, + onRequest: !!onRequest + }; + if (port !== void 0) request2.port = port; + if (host !== void 0) request2.host = host; + if (servedir !== void 0) request2.servedir = servedir; + if (keyfile !== void 0) request2.keyfile = keyfile; + if (certfile !== void 0) request2.certfile = certfile; + if (fallback !== void 0) request2.fallback = fallback; + if (cors) { + const corsKeys = {}; + const origin = getFlag(cors, corsKeys, "origin", mustBeStringOrArrayOfStrings); + checkForInvalidFlags(cors, corsKeys, `on "cors" object`); + if (Array.isArray(origin)) request2.corsOrigin = origin; + else if (origin !== void 0) request2.corsOrigin = [origin]; + } + sendRequest(refs, request2, (error2, response2) => { + if (error2) return reject(new Error(error2)); + if (onRequest) { + requestCallbacks["serve-request"] = (id, request3) => { + onRequest(request3.args); + sendResponse(id, {}); + }; + } + resolve(response2); + }); + }), + cancel: () => new Promise((resolve) => { + if (didDispose) return resolve(); + const request2 = { + command: "cancel", + key: buildKey + }; + sendRequest(refs, request2, () => { + resolve(); + }); + }), + dispose: () => new Promise((resolve) => { + if (didDispose) return resolve(); + didDispose = true; + const request2 = { + command: "dispose", + key: buildKey + }; + sendRequest(refs, request2, () => { + resolve(); + scheduleOnDisposeCallbacks(); + refs.unref(); + }); + }) + }; + refs.ref(); + callback(null, result); + }); + } +} +var handlePlugins = async (buildKey, sendRequest, sendResponse, refs, streamIn, requestCallbacks, initialOptions, plugins, details) => { + let onStartCallbacks = []; + let onEndCallbacks = []; + let onResolveCallbacks = {}; + let onLoadCallbacks = {}; + let onDisposeCallbacks = []; + let nextCallbackID = 0; + let i = 0; + let requestPlugins = []; + let isSetupDone = false; + plugins = [...plugins]; + for (let item of plugins) { + let keys = {}; + if (typeof item !== "object") throw new Error(`Plugin at index ${i} must be an object`); + const name = getFlag(item, keys, "name", mustBeString); + if (typeof name !== "string" || name === "") throw new Error(`Plugin at index ${i} is missing a name`); + try { + let setup = getFlag(item, keys, "setup", mustBeFunction); + if (typeof setup !== "function") throw new Error(`Plugin is missing a setup function`); + checkForInvalidFlags(item, keys, `on plugin ${quote(name)}`); + let plugin = { + name, + onStart: false, + onEnd: false, + onResolve: [], + onLoad: [] + }; + i++; + let resolve = (path3, options = {}) => { + if (!isSetupDone) throw new Error('Cannot call "resolve" before plugin setup has completed'); + if (typeof path3 !== "string") throw new Error(`The path to resolve must be a string`); + let keys2 = /* @__PURE__ */ Object.create(null); + let pluginName = getFlag(options, keys2, "pluginName", mustBeString); + let importer = getFlag(options, keys2, "importer", mustBeString); + let namespace = getFlag(options, keys2, "namespace", mustBeString); + let resolveDir = getFlag(options, keys2, "resolveDir", mustBeString); + let kind = getFlag(options, keys2, "kind", mustBeString); + let pluginData = getFlag(options, keys2, "pluginData", canBeAnything); + let importAttributes = getFlag(options, keys2, "with", mustBeObject); + checkForInvalidFlags(options, keys2, "in resolve() call"); + return new Promise((resolve2, reject) => { + const request = { + command: "resolve", + path: path3, + key: buildKey, + pluginName: name + }; + if (pluginName != null) request.pluginName = pluginName; + if (importer != null) request.importer = importer; + if (namespace != null) request.namespace = namespace; + if (resolveDir != null) request.resolveDir = resolveDir; + if (kind != null) request.kind = kind; + else throw new Error(`Must specify "kind" when calling "resolve"`); + if (pluginData != null) request.pluginData = details.store(pluginData); + if (importAttributes != null) request.with = sanitizeStringMap(importAttributes, "with"); + sendRequest(refs, request, (error, response) => { + if (error !== null) reject(new Error(error)); + else resolve2({ + errors: replaceDetailsInMessages(response.errors, details), + warnings: replaceDetailsInMessages(response.warnings, details), + path: response.path, + external: response.external, + sideEffects: response.sideEffects, + namespace: response.namespace, + suffix: response.suffix, + pluginData: details.load(response.pluginData) + }); + }); + }); + }; + let promise = setup({ + initialOptions, + resolve, + onStart(callback) { + let registeredText = `This error came from the "onStart" callback registered here:`; + let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onStart"); + onStartCallbacks.push({ name, callback, note: registeredNote }); + plugin.onStart = true; + }, + onEnd(callback) { + let registeredText = `This error came from the "onEnd" callback registered here:`; + let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onEnd"); + onEndCallbacks.push({ name, callback, note: registeredNote }); + plugin.onEnd = true; + }, + onResolve(options, callback) { + let registeredText = `This error came from the "onResolve" callback registered here:`; + let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onResolve"); + let keys2 = {}; + let filter = getFlag(options, keys2, "filter", mustBeRegExp); + let namespace = getFlag(options, keys2, "namespace", mustBeString); + checkForInvalidFlags(options, keys2, `in onResolve() call for plugin ${quote(name)}`); + if (filter == null) throw new Error(`onResolve() call is missing a filter`); + let id = nextCallbackID++; + onResolveCallbacks[id] = { name, callback, note: registeredNote }; + plugin.onResolve.push({ id, filter: jsRegExpToGoRegExp(filter), namespace: namespace || "" }); + }, + onLoad(options, callback) { + let registeredText = `This error came from the "onLoad" callback registered here:`; + let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onLoad"); + let keys2 = {}; + let filter = getFlag(options, keys2, "filter", mustBeRegExp); + let namespace = getFlag(options, keys2, "namespace", mustBeString); + checkForInvalidFlags(options, keys2, `in onLoad() call for plugin ${quote(name)}`); + if (filter == null) throw new Error(`onLoad() call is missing a filter`); + let id = nextCallbackID++; + onLoadCallbacks[id] = { name, callback, note: registeredNote }; + plugin.onLoad.push({ id, filter: jsRegExpToGoRegExp(filter), namespace: namespace || "" }); + }, + onDispose(callback) { + onDisposeCallbacks.push(callback); + }, + esbuild: streamIn.esbuild + }); + if (promise) await promise; + requestPlugins.push(plugin); + } catch (e) { + return { ok: false, error: e, pluginName: name }; + } + } + requestCallbacks["on-start"] = async (id, request) => { + details.clear(); + let response = { errors: [], warnings: [] }; + await Promise.all(onStartCallbacks.map(async ({ name, callback, note }) => { + try { + let result = await callback(); + if (result != null) { + if (typeof result !== "object") throw new Error(`Expected onStart() callback in plugin ${quote(name)} to return an object`); + let keys = {}; + let errors = getFlag(result, keys, "errors", mustBeArray); + let warnings = getFlag(result, keys, "warnings", mustBeArray); + checkForInvalidFlags(result, keys, `from onStart() callback in plugin ${quote(name)}`); + if (errors != null) response.errors.push(...sanitizeMessages(errors, "errors", details, name, void 0)); + if (warnings != null) response.warnings.push(...sanitizeMessages(warnings, "warnings", details, name, void 0)); + } + } catch (e) { + response.errors.push(extractErrorMessageV8(e, streamIn, details, note && note(), name)); + } + })); + sendResponse(id, response); + }; + requestCallbacks["on-resolve"] = async (id, request) => { + let response = {}, name = "", callback, note; + for (let id2 of request.ids) { + try { + ({ name, callback, note } = onResolveCallbacks[id2]); + let result = await callback({ + path: request.path, + importer: request.importer, + namespace: request.namespace, + resolveDir: request.resolveDir, + kind: request.kind, + pluginData: details.load(request.pluginData), + with: request.with + }); + if (result != null) { + if (typeof result !== "object") throw new Error(`Expected onResolve() callback in plugin ${quote(name)} to return an object`); + let keys = {}; + let pluginName = getFlag(result, keys, "pluginName", mustBeString); + let path3 = getFlag(result, keys, "path", mustBeString); + let namespace = getFlag(result, keys, "namespace", mustBeString); + let suffix = getFlag(result, keys, "suffix", mustBeString); + let external = getFlag(result, keys, "external", mustBeBoolean); + let sideEffects = getFlag(result, keys, "sideEffects", mustBeBoolean); + let pluginData = getFlag(result, keys, "pluginData", canBeAnything); + let errors = getFlag(result, keys, "errors", mustBeArray); + let warnings = getFlag(result, keys, "warnings", mustBeArray); + let watchFiles = getFlag(result, keys, "watchFiles", mustBeArrayOfStrings); + let watchDirs = getFlag(result, keys, "watchDirs", mustBeArrayOfStrings); + checkForInvalidFlags(result, keys, `from onResolve() callback in plugin ${quote(name)}`); + response.id = id2; + if (pluginName != null) response.pluginName = pluginName; + if (path3 != null) response.path = path3; + if (namespace != null) response.namespace = namespace; + if (suffix != null) response.suffix = suffix; + if (external != null) response.external = external; + if (sideEffects != null) response.sideEffects = sideEffects; + if (pluginData != null) response.pluginData = details.store(pluginData); + if (errors != null) response.errors = sanitizeMessages(errors, "errors", details, name, void 0); + if (warnings != null) response.warnings = sanitizeMessages(warnings, "warnings", details, name, void 0); + if (watchFiles != null) response.watchFiles = sanitizeStringArray(watchFiles, "watchFiles"); + if (watchDirs != null) response.watchDirs = sanitizeStringArray(watchDirs, "watchDirs"); + break; + } + } catch (e) { + response = { id: id2, errors: [extractErrorMessageV8(e, streamIn, details, note && note(), name)] }; + break; + } + } + sendResponse(id, response); + }; + requestCallbacks["on-load"] = async (id, request) => { + let response = {}, name = "", callback, note; + for (let id2 of request.ids) { + try { + ({ name, callback, note } = onLoadCallbacks[id2]); + let result = await callback({ + path: request.path, + namespace: request.namespace, + suffix: request.suffix, + pluginData: details.load(request.pluginData), + with: request.with + }); + if (result != null) { + if (typeof result !== "object") throw new Error(`Expected onLoad() callback in plugin ${quote(name)} to return an object`); + let keys = {}; + let pluginName = getFlag(result, keys, "pluginName", mustBeString); + let contents = getFlag(result, keys, "contents", mustBeStringOrUint8Array); + let resolveDir = getFlag(result, keys, "resolveDir", mustBeString); + let pluginData = getFlag(result, keys, "pluginData", canBeAnything); + let loader = getFlag(result, keys, "loader", mustBeString); + let errors = getFlag(result, keys, "errors", mustBeArray); + let warnings = getFlag(result, keys, "warnings", mustBeArray); + let watchFiles = getFlag(result, keys, "watchFiles", mustBeArrayOfStrings); + let watchDirs = getFlag(result, keys, "watchDirs", mustBeArrayOfStrings); + checkForInvalidFlags(result, keys, `from onLoad() callback in plugin ${quote(name)}`); + response.id = id2; + if (pluginName != null) response.pluginName = pluginName; + if (contents instanceof Uint8Array) response.contents = contents; + else if (contents != null) response.contents = encodeUTF8(contents); + if (resolveDir != null) response.resolveDir = resolveDir; + if (pluginData != null) response.pluginData = details.store(pluginData); + if (loader != null) response.loader = loader; + if (errors != null) response.errors = sanitizeMessages(errors, "errors", details, name, void 0); + if (warnings != null) response.warnings = sanitizeMessages(warnings, "warnings", details, name, void 0); + if (watchFiles != null) response.watchFiles = sanitizeStringArray(watchFiles, "watchFiles"); + if (watchDirs != null) response.watchDirs = sanitizeStringArray(watchDirs, "watchDirs"); + break; + } + } catch (e) { + response = { id: id2, errors: [extractErrorMessageV8(e, streamIn, details, note && note(), name)] }; + break; + } + } + sendResponse(id, response); + }; + let runOnEndCallbacks = (result, done) => done([], []); + if (onEndCallbacks.length > 0) { + runOnEndCallbacks = (result, done) => { + (async () => { + const onEndErrors = []; + const onEndWarnings = []; + for (const { name, callback, note } of onEndCallbacks) { + let newErrors; + let newWarnings; + try { + const value = await callback(result); + if (value != null) { + if (typeof value !== "object") throw new Error(`Expected onEnd() callback in plugin ${quote(name)} to return an object`); + let keys = {}; + let errors = getFlag(value, keys, "errors", mustBeArray); + let warnings = getFlag(value, keys, "warnings", mustBeArray); + checkForInvalidFlags(value, keys, `from onEnd() callback in plugin ${quote(name)}`); + if (errors != null) newErrors = sanitizeMessages(errors, "errors", details, name, void 0); + if (warnings != null) newWarnings = sanitizeMessages(warnings, "warnings", details, name, void 0); + } + } catch (e) { + newErrors = [extractErrorMessageV8(e, streamIn, details, note && note(), name)]; + } + if (newErrors) { + onEndErrors.push(...newErrors); + try { + result.errors.push(...newErrors); + } catch { + } + } + if (newWarnings) { + onEndWarnings.push(...newWarnings); + try { + result.warnings.push(...newWarnings); + } catch { + } + } + } + done(onEndErrors, onEndWarnings); + })(); + }; + } + let scheduleOnDisposeCallbacks = () => { + for (const cb of onDisposeCallbacks) { + setTimeout(() => cb(), 0); + } + }; + isSetupDone = true; + return { + ok: true, + requestPlugins, + runOnEndCallbacks, + scheduleOnDisposeCallbacks + }; +}; +function createObjectStash() { + const map = /* @__PURE__ */ new Map(); + let nextID = 0; + return { + clear() { + map.clear(); + }, + load(id) { + return map.get(id); + }, + store(value) { + if (value === void 0) return -1; + const id = nextID++; + map.set(id, value); + return id; + } + }; +} +function extractCallerV8(e, streamIn, ident) { + let note; + let tried = false; + return () => { + if (tried) return note; + tried = true; + try { + let lines = (e.stack + "").split("\n"); + lines.splice(1, 1); + let location = parseStackLinesV8(streamIn, lines, ident); + if (location) { + note = { text: e.message, location }; + return note; + } + } catch { + } + }; +} +function extractErrorMessageV8(e, streamIn, stash, note, pluginName) { + let text = "Internal error"; + let location = null; + try { + text = (e && e.message || e) + ""; + } catch { + } + try { + location = parseStackLinesV8(streamIn, (e.stack + "").split("\n"), ""); + } catch { + } + return { id: "", pluginName, text, location, notes: note ? [note] : [], detail: stash ? stash.store(e) : -1 }; +} +function parseStackLinesV8(streamIn, lines, ident) { + let at = " at "; + if (streamIn.readFileSync && !lines[0].startsWith(at) && lines[1].startsWith(at)) { + for (let i = 1; i < lines.length; i++) { + let line = lines[i]; + if (!line.startsWith(at)) continue; + line = line.slice(at.length); + while (true) { + let match = /^(?:new |async )?\S+ \((.*)\)$/.exec(line); + if (match) { + line = match[1]; + continue; + } + match = /^eval at \S+ \((.*)\)(?:, \S+:\d+:\d+)?$/.exec(line); + if (match) { + line = match[1]; + continue; + } + match = /^(\S+):(\d+):(\d+)$/.exec(line); + if (match) { + let contents; + try { + contents = streamIn.readFileSync(match[1], "utf8"); + } catch { + break; + } + let lineText = contents.split(/\r\n|\r|\n|\u2028|\u2029/)[+match[2] - 1] || ""; + let column = +match[3] - 1; + let length = lineText.slice(column, column + ident.length) === ident ? ident.length : 0; + return { + file: match[1], + namespace: "file", + line: +match[2], + column: encodeUTF8(lineText.slice(0, column)).length, + length: encodeUTF8(lineText.slice(column, column + length)).length, + lineText: lineText + "\n" + lines.slice(1).join("\n"), + suggestion: "" + }; + } + break; + } + } + } + return null; +} +function failureErrorWithLog(text, errors, warnings) { + let limit = 5; + text += errors.length < 1 ? "" : ` with ${errors.length} error${errors.length < 2 ? "" : "s"}:` + errors.slice(0, limit + 1).map((e, i) => { + if (i === limit) return "\n..."; + if (!e.location) return ` +error: ${e.text}`; + let { file, line, column } = e.location; + let pluginText = e.pluginName ? `[plugin: ${e.pluginName}] ` : ""; + return ` +${file}:${line}:${column}: ERROR: ${pluginText}${e.text}`; + }).join(""); + let error = new Error(text); + for (const [key, value] of [["errors", errors], ["warnings", warnings]]) { + Object.defineProperty(error, key, { + configurable: true, + enumerable: true, + get: () => value, + set: (value2) => Object.defineProperty(error, key, { + configurable: true, + enumerable: true, + value: value2 + }) + }); + } + return error; +} +function replaceDetailsInMessages(messages, stash) { + for (const message of messages) { + message.detail = stash.load(message.detail); + } + return messages; +} +function sanitizeLocation(location, where, terminalWidth) { + if (location == null) return null; + let keys = {}; + let file = getFlag(location, keys, "file", mustBeString); + let namespace = getFlag(location, keys, "namespace", mustBeString); + let line = getFlag(location, keys, "line", mustBeInteger); + let column = getFlag(location, keys, "column", mustBeInteger); + let length = getFlag(location, keys, "length", mustBeInteger); + let lineText = getFlag(location, keys, "lineText", mustBeString); + let suggestion = getFlag(location, keys, "suggestion", mustBeString); + checkForInvalidFlags(location, keys, where); + if (lineText) { + const relevantASCII = lineText.slice( + 0, + (column && column > 0 ? column : 0) + (length && length > 0 ? length : 0) + (terminalWidth && terminalWidth > 0 ? terminalWidth : 80) + ); + if (!/[\x7F-\uFFFF]/.test(relevantASCII) && !/\n/.test(lineText)) { + lineText = relevantASCII; + } + } + return { + file: file || "", + namespace: namespace || "", + line: line || 0, + column: column || 0, + length: length || 0, + lineText: lineText || "", + suggestion: suggestion || "" + }; +} +function sanitizeMessages(messages, property, stash, fallbackPluginName, terminalWidth) { + let messagesClone = []; + let index = 0; + for (const message of messages) { + let keys = {}; + let id = getFlag(message, keys, "id", mustBeString); + let pluginName = getFlag(message, keys, "pluginName", mustBeString); + let text = getFlag(message, keys, "text", mustBeString); + let location = getFlag(message, keys, "location", mustBeObjectOrNull); + let notes = getFlag(message, keys, "notes", mustBeArray); + let detail = getFlag(message, keys, "detail", canBeAnything); + let where = `in element ${index} of "${property}"`; + checkForInvalidFlags(message, keys, where); + let notesClone = []; + if (notes) { + for (const note of notes) { + let noteKeys = {}; + let noteText = getFlag(note, noteKeys, "text", mustBeString); + let noteLocation = getFlag(note, noteKeys, "location", mustBeObjectOrNull); + checkForInvalidFlags(note, noteKeys, where); + notesClone.push({ + text: noteText || "", + location: sanitizeLocation(noteLocation, where, terminalWidth) + }); + } + } + messagesClone.push({ + id: id || "", + pluginName: pluginName || fallbackPluginName, + text: text || "", + location: sanitizeLocation(location, where, terminalWidth), + notes: notesClone, + detail: stash ? stash.store(detail) : -1 + }); + index++; + } + return messagesClone; +} +function sanitizeStringArray(values, property) { + const result = []; + for (const value of values) { + if (typeof value !== "string") throw new Error(`${quote(property)} must be an array of strings`); + result.push(value); + } + return result; +} +function sanitizeStringMap(map, property) { + const result = /* @__PURE__ */ Object.create(null); + for (const key in map) { + const value = map[key]; + if (typeof value !== "string") throw new Error(`key ${quote(key)} in object ${quote(property)} must be a string`); + result[key] = value; + } + return result; +} +function convertOutputFiles({ path: path3, contents, hash }) { + let text = null; + return { + path: path3, + contents, + hash, + get text() { + const binary = this.contents; + if (text === null || binary !== contents) { + contents = binary; + text = decodeUTF8(binary); + } + return text; + } + }; +} +function jsRegExpToGoRegExp(regexp) { + let result = regexp.source; + if (regexp.flags) result = `(?${regexp.flags})${result}`; + return result; +} + +// lib/npm/node-platform.ts +var fs = require("fs"); +var os = require("os"); +var path = require("path"); +var ESBUILD_BINARY_PATH = process.env.ESBUILD_BINARY_PATH || ESBUILD_BINARY_PATH; +var isValidBinaryPath = (x) => !!x && x !== "/usr/bin/esbuild"; +var packageDarwin_arm64 = "@esbuild/darwin-arm64"; +var packageDarwin_x64 = "@esbuild/darwin-x64"; +var knownWindowsPackages = { + "win32 arm64 LE": "@esbuild/win32-arm64", + "win32 ia32 LE": "@esbuild/win32-ia32", + "win32 x64 LE": "@esbuild/win32-x64" +}; +var knownUnixlikePackages = { + "aix ppc64 BE": "@esbuild/aix-ppc64", + "android arm64 LE": "@esbuild/android-arm64", + "darwin arm64 LE": "@esbuild/darwin-arm64", + "darwin x64 LE": "@esbuild/darwin-x64", + "freebsd arm64 LE": "@esbuild/freebsd-arm64", + "freebsd x64 LE": "@esbuild/freebsd-x64", + "linux arm LE": "@esbuild/linux-arm", + "linux arm64 LE": "@esbuild/linux-arm64", + "linux ia32 LE": "@esbuild/linux-ia32", + "linux mips64el LE": "@esbuild/linux-mips64el", + "linux ppc64 LE": "@esbuild/linux-ppc64", + "linux riscv64 LE": "@esbuild/linux-riscv64", + "linux s390x BE": "@esbuild/linux-s390x", + "linux x64 LE": "@esbuild/linux-x64", + "linux loong64 LE": "@esbuild/linux-loong64", + "netbsd arm64 LE": "@esbuild/netbsd-arm64", + "netbsd x64 LE": "@esbuild/netbsd-x64", + "openbsd arm64 LE": "@esbuild/openbsd-arm64", + "openbsd x64 LE": "@esbuild/openbsd-x64", + "sunos x64 LE": "@esbuild/sunos-x64" +}; +var knownWebAssemblyFallbackPackages = { + "android arm LE": "@esbuild/android-arm", + "android x64 LE": "@esbuild/android-x64" +}; +function pkgAndSubpathForCurrentPlatform() { + let pkg; + let subpath; + let isWASM = false; + let platformKey = `${process.platform} ${os.arch()} ${os.endianness()}`; + if (platformKey in knownWindowsPackages) { + pkg = knownWindowsPackages[platformKey]; + subpath = "esbuild.exe"; + } else if (platformKey in knownUnixlikePackages) { + pkg = knownUnixlikePackages[platformKey]; + subpath = "bin/esbuild"; + } else if (platformKey in knownWebAssemblyFallbackPackages) { + pkg = knownWebAssemblyFallbackPackages[platformKey]; + subpath = "bin/esbuild"; + isWASM = true; + } else { + throw new Error(`Unsupported platform: ${platformKey}`); + } + return { pkg, subpath, isWASM }; +} +function pkgForSomeOtherPlatform() { + const libMainJS = require.resolve("esbuild"); + const nodeModulesDirectory = path.dirname(path.dirname(path.dirname(libMainJS))); + if (path.basename(nodeModulesDirectory) === "node_modules") { + for (const unixKey in knownUnixlikePackages) { + try { + const pkg = knownUnixlikePackages[unixKey]; + if (fs.existsSync(path.join(nodeModulesDirectory, pkg))) return pkg; + } catch { + } + } + for (const windowsKey in knownWindowsPackages) { + try { + const pkg = knownWindowsPackages[windowsKey]; + if (fs.existsSync(path.join(nodeModulesDirectory, pkg))) return pkg; + } catch { + } + } + } + return null; +} +function downloadedBinPath(pkg, subpath) { + const esbuildLibDir = path.dirname(require.resolve("esbuild")); + return path.join(esbuildLibDir, `downloaded-${pkg.replace("/", "-")}-${path.basename(subpath)}`); +} +function generateBinPath() { + if (isValidBinaryPath(ESBUILD_BINARY_PATH)) { + if (!fs.existsSync(ESBUILD_BINARY_PATH)) { + console.warn(`[esbuild] Ignoring bad configuration: ESBUILD_BINARY_PATH=${ESBUILD_BINARY_PATH}`); + } else { + return { binPath: ESBUILD_BINARY_PATH, isWASM: false }; + } + } + const { pkg, subpath, isWASM } = pkgAndSubpathForCurrentPlatform(); + let binPath; + try { + binPath = require.resolve(`${pkg}/${subpath}`); + } catch (e) { + binPath = downloadedBinPath(pkg, subpath); + if (!fs.existsSync(binPath)) { + try { + require.resolve(pkg); + } catch { + const otherPkg = pkgForSomeOtherPlatform(); + if (otherPkg) { + let suggestions = ` +Specifically the "${otherPkg}" package is present but this platform +needs the "${pkg}" package instead. People often get into this +situation by installing esbuild on Windows or macOS and copying "node_modules" +into a Docker image that runs Linux, or by copying "node_modules" between +Windows and WSL environments. + +If you are installing with npm, you can try not copying the "node_modules" +directory when you copy the files over, and running "npm ci" or "npm install" +on the destination platform after the copy. Or you could consider using yarn +instead of npm which has built-in support for installing a package on multiple +platforms simultaneously. + +If you are installing with yarn, you can try listing both this platform and the +other platform in your ".yarnrc.yml" file using the "supportedArchitectures" +feature: https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures +Keep in mind that this means multiple copies of esbuild will be present. +`; + if (pkg === packageDarwin_x64 && otherPkg === packageDarwin_arm64 || pkg === packageDarwin_arm64 && otherPkg === packageDarwin_x64) { + suggestions = ` +Specifically the "${otherPkg}" package is present but this platform +needs the "${pkg}" package instead. People often get into this +situation by installing esbuild with npm running inside of Rosetta 2 and then +trying to use it with node running outside of Rosetta 2, or vice versa (Rosetta +2 is Apple's on-the-fly x86_64-to-arm64 translation service). + +If you are installing with npm, you can try ensuring that both npm and node are +not running under Rosetta 2 and then reinstalling esbuild. This likely involves +changing how you installed npm and/or node. For example, installing node with +the universal installer here should work: https://nodejs.org/en/download/. Or +you could consider using yarn instead of npm which has built-in support for +installing a package on multiple platforms simultaneously. + +If you are installing with yarn, you can try listing both "arm64" and "x64" +in your ".yarnrc.yml" file using the "supportedArchitectures" feature: +https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures +Keep in mind that this means multiple copies of esbuild will be present. +`; + } + throw new Error(` +You installed esbuild for another platform than the one you're currently using. +This won't work because esbuild is written with native code and needs to +install a platform-specific binary executable. +${suggestions} +Another alternative is to use the "esbuild-wasm" package instead, which works +the same way on all platforms. But it comes with a heavy performance cost and +can sometimes be 10x slower than the "esbuild" package, so you may also not +want to do that. +`); + } + throw new Error(`The package "${pkg}" could not be found, and is needed by esbuild. + +If you are installing esbuild with npm, make sure that you don't specify the +"--no-optional" or "--omit=optional" flags. The "optionalDependencies" feature +of "package.json" is used by esbuild to install the correct binary executable +for your current platform.`); + } + throw e; + } + } + if (/\.zip\//.test(binPath)) { + let pnpapi; + try { + pnpapi = require("pnpapi"); + } catch (e) { + } + if (pnpapi) { + const root = pnpapi.getPackageInformation(pnpapi.topLevel).packageLocation; + const binTargetPath = path.join( + root, + "node_modules", + ".cache", + "esbuild", + `pnpapi-${pkg.replace("/", "-")}-${"0.25.4"}-${path.basename(subpath)}` + ); + if (!fs.existsSync(binTargetPath)) { + fs.mkdirSync(path.dirname(binTargetPath), { recursive: true }); + fs.copyFileSync(binPath, binTargetPath); + fs.chmodSync(binTargetPath, 493); + } + return { binPath: binTargetPath, isWASM }; + } + } + return { binPath, isWASM }; +} + +// lib/npm/node.ts +var child_process = require("child_process"); +var crypto = require("crypto"); +var path2 = require("path"); +var fs2 = require("fs"); +var os2 = require("os"); +var tty = require("tty"); +var worker_threads; +if (process.env.ESBUILD_WORKER_THREADS !== "0") { + try { + worker_threads = require("worker_threads"); + } catch { + } + let [major, minor] = process.versions.node.split("."); + if ( + // { + if ((!ESBUILD_BINARY_PATH || false) && (path2.basename(__filename) !== "main.js" || path2.basename(__dirname) !== "lib")) { + throw new Error( + `The esbuild JavaScript API cannot be bundled. Please mark the "esbuild" package as external so it's not included in the bundle. + +More information: The file containing the code for esbuild's JavaScript API (${__filename}) does not appear to be inside the esbuild package on the file system, which usually means that the esbuild package was bundled into another file. This is problematic because the API needs to run a binary executable inside the esbuild package which is located using a relative path from the API code to the executable. If the esbuild package is bundled, the relative path will be incorrect and the executable won't be found.` + ); + } + if (false) { + return ["node", [path2.join(__dirname, "..", "bin", "esbuild")]]; + } else { + const { binPath, isWASM } = generateBinPath(); + if (isWASM) { + return ["node", [binPath]]; + } else { + return [binPath, []]; + } + } +}; +var isTTY = () => tty.isatty(2); +var fsSync = { + readFile(tempFile, callback) { + try { + let contents = fs2.readFileSync(tempFile, "utf8"); + try { + fs2.unlinkSync(tempFile); + } catch { + } + callback(null, contents); + } catch (err) { + callback(err, null); + } + }, + writeFile(contents, callback) { + try { + let tempFile = randomFileName(); + fs2.writeFileSync(tempFile, contents); + callback(tempFile); + } catch { + callback(null); + } + } +}; +var fsAsync = { + readFile(tempFile, callback) { + try { + fs2.readFile(tempFile, "utf8", (err, contents) => { + try { + fs2.unlink(tempFile, () => callback(err, contents)); + } catch { + callback(err, contents); + } + }); + } catch (err) { + callback(err, null); + } + }, + writeFile(contents, callback) { + try { + let tempFile = randomFileName(); + fs2.writeFile(tempFile, contents, (err) => err !== null ? callback(null) : callback(tempFile)); + } catch { + callback(null); + } + } +}; +var version = "0.25.4"; +var build = (options) => ensureServiceIsRunning().build(options); +var context = (buildOptions) => ensureServiceIsRunning().context(buildOptions); +var transform = (input, options) => ensureServiceIsRunning().transform(input, options); +var formatMessages = (messages, options) => ensureServiceIsRunning().formatMessages(messages, options); +var analyzeMetafile = (messages, options) => ensureServiceIsRunning().analyzeMetafile(messages, options); +var buildSync = (options) => { + if (worker_threads && !isInternalWorkerThread) { + if (!workerThreadService) workerThreadService = startWorkerThreadService(worker_threads); + return workerThreadService.buildSync(options); + } + let result; + runServiceSync((service) => service.buildOrContext({ + callName: "buildSync", + refs: null, + options, + isTTY: isTTY(), + defaultWD, + callback: (err, res) => { + if (err) throw err; + result = res; + } + })); + return result; +}; +var transformSync = (input, options) => { + if (worker_threads && !isInternalWorkerThread) { + if (!workerThreadService) workerThreadService = startWorkerThreadService(worker_threads); + return workerThreadService.transformSync(input, options); + } + let result; + runServiceSync((service) => service.transform({ + callName: "transformSync", + refs: null, + input, + options: options || {}, + isTTY: isTTY(), + fs: fsSync, + callback: (err, res) => { + if (err) throw err; + result = res; + } + })); + return result; +}; +var formatMessagesSync = (messages, options) => { + if (worker_threads && !isInternalWorkerThread) { + if (!workerThreadService) workerThreadService = startWorkerThreadService(worker_threads); + return workerThreadService.formatMessagesSync(messages, options); + } + let result; + runServiceSync((service) => service.formatMessages({ + callName: "formatMessagesSync", + refs: null, + messages, + options, + callback: (err, res) => { + if (err) throw err; + result = res; + } + })); + return result; +}; +var analyzeMetafileSync = (metafile, options) => { + if (worker_threads && !isInternalWorkerThread) { + if (!workerThreadService) workerThreadService = startWorkerThreadService(worker_threads); + return workerThreadService.analyzeMetafileSync(metafile, options); + } + let result; + runServiceSync((service) => service.analyzeMetafile({ + callName: "analyzeMetafileSync", + refs: null, + metafile: typeof metafile === "string" ? metafile : JSON.stringify(metafile), + options, + callback: (err, res) => { + if (err) throw err; + result = res; + } + })); + return result; +}; +var stop = () => { + if (stopService) stopService(); + if (workerThreadService) workerThreadService.stop(); + return Promise.resolve(); +}; +var initializeWasCalled = false; +var initialize = (options) => { + options = validateInitializeOptions(options || {}); + if (options.wasmURL) throw new Error(`The "wasmURL" option only works in the browser`); + if (options.wasmModule) throw new Error(`The "wasmModule" option only works in the browser`); + if (options.worker) throw new Error(`The "worker" option only works in the browser`); + if (initializeWasCalled) throw new Error('Cannot call "initialize" more than once'); + ensureServiceIsRunning(); + initializeWasCalled = true; + return Promise.resolve(); +}; +var defaultWD = process.cwd(); +var longLivedService; +var stopService; +var ensureServiceIsRunning = () => { + if (longLivedService) return longLivedService; + let [command, args] = esbuildCommandAndArgs(); + let child = child_process.spawn(command, args.concat(`--service=${"0.25.4"}`, "--ping"), { + windowsHide: true, + stdio: ["pipe", "pipe", "inherit"], + cwd: defaultWD + }); + let { readFromStdout, afterClose, service } = createChannel({ + writeToStdin(bytes) { + child.stdin.write(bytes, (err) => { + if (err) afterClose(err); + }); + }, + readFileSync: fs2.readFileSync, + isSync: false, + hasFS: true, + esbuild: node_exports + }); + child.stdin.on("error", afterClose); + child.on("error", afterClose); + const stdin = child.stdin; + const stdout = child.stdout; + stdout.on("data", readFromStdout); + stdout.on("end", afterClose); + stopService = () => { + stdin.destroy(); + stdout.destroy(); + child.kill(); + initializeWasCalled = false; + longLivedService = void 0; + stopService = void 0; + }; + let refCount = 0; + child.unref(); + if (stdin.unref) { + stdin.unref(); + } + if (stdout.unref) { + stdout.unref(); + } + const refs = { + ref() { + if (++refCount === 1) child.ref(); + }, + unref() { + if (--refCount === 0) child.unref(); + } + }; + longLivedService = { + build: (options) => new Promise((resolve, reject) => { + service.buildOrContext({ + callName: "build", + refs, + options, + isTTY: isTTY(), + defaultWD, + callback: (err, res) => err ? reject(err) : resolve(res) + }); + }), + context: (options) => new Promise((resolve, reject) => service.buildOrContext({ + callName: "context", + refs, + options, + isTTY: isTTY(), + defaultWD, + callback: (err, res) => err ? reject(err) : resolve(res) + })), + transform: (input, options) => new Promise((resolve, reject) => service.transform({ + callName: "transform", + refs, + input, + options: options || {}, + isTTY: isTTY(), + fs: fsAsync, + callback: (err, res) => err ? reject(err) : resolve(res) + })), + formatMessages: (messages, options) => new Promise((resolve, reject) => service.formatMessages({ + callName: "formatMessages", + refs, + messages, + options, + callback: (err, res) => err ? reject(err) : resolve(res) + })), + analyzeMetafile: (metafile, options) => new Promise((resolve, reject) => service.analyzeMetafile({ + callName: "analyzeMetafile", + refs, + metafile: typeof metafile === "string" ? metafile : JSON.stringify(metafile), + options, + callback: (err, res) => err ? reject(err) : resolve(res) + })) + }; + return longLivedService; +}; +var runServiceSync = (callback) => { + let [command, args] = esbuildCommandAndArgs(); + let stdin = new Uint8Array(); + let { readFromStdout, afterClose, service } = createChannel({ + writeToStdin(bytes) { + if (stdin.length !== 0) throw new Error("Must run at most one command"); + stdin = bytes; + }, + isSync: true, + hasFS: true, + esbuild: node_exports + }); + callback(service); + let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.25.4"}`), { + cwd: defaultWD, + windowsHide: true, + input: stdin, + // We don't know how large the output could be. If it's too large, the + // command will fail with ENOBUFS. Reserve 16mb for now since that feels + // like it should be enough. Also allow overriding this with an environment + // variable. + maxBuffer: +process.env.ESBUILD_MAX_BUFFER || 16 * 1024 * 1024 + }); + readFromStdout(stdout); + afterClose(null); +}; +var randomFileName = () => { + return path2.join(os2.tmpdir(), `esbuild-${crypto.randomBytes(32).toString("hex")}`); +}; +var workerThreadService = null; +var startWorkerThreadService = (worker_threads2) => { + let { port1: mainPort, port2: workerPort } = new worker_threads2.MessageChannel(); + let worker = new worker_threads2.Worker(__filename, { + workerData: { workerPort, defaultWD, esbuildVersion: "0.25.4" }, + transferList: [workerPort], + // From node's documentation: https://nodejs.org/api/worker_threads.html + // + // Take care when launching worker threads from preload scripts (scripts loaded + // and run using the `-r` command line flag). Unless the `execArgv` option is + // explicitly set, new Worker threads automatically inherit the command line flags + // from the running process and will preload the same preload scripts as the main + // thread. If the preload script unconditionally launches a worker thread, every + // thread spawned will spawn another until the application crashes. + // + execArgv: [] + }); + let nextID = 0; + let fakeBuildError = (text) => { + let error = new Error(`Build failed with 1 error: +error: ${text}`); + let errors = [{ id: "", pluginName: "", text, location: null, notes: [], detail: void 0 }]; + error.errors = errors; + error.warnings = []; + return error; + }; + let validateBuildSyncOptions = (options) => { + if (!options) return; + let plugins = options.plugins; + if (plugins && plugins.length > 0) throw fakeBuildError(`Cannot use plugins in synchronous API calls`); + }; + let applyProperties = (object, properties) => { + for (let key in properties) { + object[key] = properties[key]; + } + }; + let runCallSync = (command, args) => { + let id = nextID++; + let sharedBuffer = new SharedArrayBuffer(8); + let sharedBufferView = new Int32Array(sharedBuffer); + let msg = { sharedBuffer, id, command, args }; + worker.postMessage(msg); + let status = Atomics.wait(sharedBufferView, 0, 0); + if (status !== "ok" && status !== "not-equal") throw new Error("Internal error: Atomics.wait() failed: " + status); + let { message: { id: id2, resolve, reject, properties } } = worker_threads2.receiveMessageOnPort(mainPort); + if (id !== id2) throw new Error(`Internal error: Expected id ${id} but got id ${id2}`); + if (reject) { + applyProperties(reject, properties); + throw reject; + } + return resolve; + }; + worker.unref(); + return { + buildSync(options) { + validateBuildSyncOptions(options); + return runCallSync("build", [options]); + }, + transformSync(input, options) { + return runCallSync("transform", [input, options]); + }, + formatMessagesSync(messages, options) { + return runCallSync("formatMessages", [messages, options]); + }, + analyzeMetafileSync(metafile, options) { + return runCallSync("analyzeMetafile", [metafile, options]); + }, + stop() { + worker.terminate(); + workerThreadService = null; + } + }; +}; +var startSyncServiceWorker = () => { + let workerPort = worker_threads.workerData.workerPort; + let parentPort = worker_threads.parentPort; + let extractProperties = (object) => { + let properties = {}; + if (object && typeof object === "object") { + for (let key in object) { + properties[key] = object[key]; + } + } + return properties; + }; + try { + let service = ensureServiceIsRunning(); + defaultWD = worker_threads.workerData.defaultWD; + parentPort.on("message", (msg) => { + (async () => { + let { sharedBuffer, id, command, args } = msg; + let sharedBufferView = new Int32Array(sharedBuffer); + try { + switch (command) { + case "build": + workerPort.postMessage({ id, resolve: await service.build(args[0]) }); + break; + case "transform": + workerPort.postMessage({ id, resolve: await service.transform(args[0], args[1]) }); + break; + case "formatMessages": + workerPort.postMessage({ id, resolve: await service.formatMessages(args[0], args[1]) }); + break; + case "analyzeMetafile": + workerPort.postMessage({ id, resolve: await service.analyzeMetafile(args[0], args[1]) }); + break; + default: + throw new Error(`Invalid command: ${command}`); + } + } catch (reject) { + workerPort.postMessage({ id, reject, properties: extractProperties(reject) }); + } + Atomics.add(sharedBufferView, 0, 1); + Atomics.notify(sharedBufferView, 0, Infinity); + })(); + }); + } catch (reject) { + parentPort.on("message", (msg) => { + let { sharedBuffer, id } = msg; + let sharedBufferView = new Int32Array(sharedBuffer); + workerPort.postMessage({ id, reject, properties: extractProperties(reject) }); + Atomics.add(sharedBufferView, 0, 1); + Atomics.notify(sharedBufferView, 0, Infinity); + }); + } +}; +if (isInternalWorkerThread) { + startSyncServiceWorker(); +} +var node_default = node_exports; +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + analyzeMetafile, + analyzeMetafileSync, + build, + buildSync, + context, + formatMessages, + formatMessagesSync, + initialize, + stop, + transform, + transformSync, + version +}); diff --git a/node_modules/esbuild/package.json b/node_modules/esbuild/package.json new file mode 100644 index 0000000..2e52ad7 --- /dev/null +++ b/node_modules/esbuild/package.json @@ -0,0 +1,48 @@ +{ + "name": "esbuild", + "version": "0.25.4", + "description": "An extremely fast JavaScript and CSS bundler and minifier.", + "repository": { + "type": "git", + "url": "git+https://github.com/evanw/esbuild.git" + }, + "scripts": { + "postinstall": "node install.js" + }, + "main": "lib/main.js", + "types": "lib/main.d.ts", + "engines": { + "node": ">=18" + }, + "bin": { + "esbuild": "bin/esbuild" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.4", + "@esbuild/android-arm": "0.25.4", + "@esbuild/android-arm64": "0.25.4", + "@esbuild/android-x64": "0.25.4", + "@esbuild/darwin-arm64": "0.25.4", + "@esbuild/darwin-x64": "0.25.4", + "@esbuild/freebsd-arm64": "0.25.4", + "@esbuild/freebsd-x64": "0.25.4", + "@esbuild/linux-arm": "0.25.4", + "@esbuild/linux-arm64": "0.25.4", + "@esbuild/linux-ia32": "0.25.4", + "@esbuild/linux-loong64": "0.25.4", + "@esbuild/linux-mips64el": "0.25.4", + "@esbuild/linux-ppc64": "0.25.4", + "@esbuild/linux-riscv64": "0.25.4", + "@esbuild/linux-s390x": "0.25.4", + "@esbuild/linux-x64": "0.25.4", + "@esbuild/netbsd-arm64": "0.25.4", + "@esbuild/netbsd-x64": "0.25.4", + "@esbuild/openbsd-arm64": "0.25.4", + "@esbuild/openbsd-x64": "0.25.4", + "@esbuild/sunos-x64": "0.25.4", + "@esbuild/win32-arm64": "0.25.4", + "@esbuild/win32-ia32": "0.25.4", + "@esbuild/win32-x64": "0.25.4" + }, + "license": "MIT" +} diff --git a/node_modules/exit-hook/index.d.ts b/node_modules/exit-hook/index.d.ts new file mode 100644 index 0000000..f7aed97 --- /dev/null +++ b/node_modules/exit-hook/index.d.ts @@ -0,0 +1,37 @@ +/** +Run some code when the process exits. + +The `process.on('exit')` event doesn't catch all the ways a process can exit. + +This package is useful for cleaning up before exiting. + +@param callback - The callback to execute when the process exits. +@returns A function that removes the hook when called. + +@example +``` +import exitHook = require('exit-hook'); + +exitHook(() => { + console.log('Exiting'); +}); + +// You can add multiple hooks, even across files +exitHook(() => { + console.log('Exiting 2'); +}); + +throw new Error('🦄'); + +//=> 'Exiting' +//=> 'Exiting 2' + +// Removing an exit hook: +const unsubscribe = exitHook(() => {}); + +unsubscribe(); +``` +*/ +declare function exitHook(callback: () => void): () => void; + +export = exitHook; diff --git a/node_modules/exit-hook/index.js b/node_modules/exit-hook/index.js new file mode 100644 index 0000000..fc309b0 --- /dev/null +++ b/node_modules/exit-hook/index.js @@ -0,0 +1,46 @@ +'use strict'; + +const callbacks = new Set(); +let isCalled = false; +let isRegistered = false; + +function exit(exit, signal) { + if (isCalled) { + return; + } + + isCalled = true; + + for (const callback of callbacks) { + callback(); + } + + if (exit === true) { + process.exit(128 + signal); // eslint-disable-line unicorn/no-process-exit + } +} + +module.exports = callback => { + callbacks.add(callback); + + if (!isRegistered) { + isRegistered = true; + + process.once('exit', exit); + process.once('SIGINT', exit.bind(null, true, 2)); + process.once('SIGTERM', exit.bind(null, true, 15)); + + // PM2 Cluster shutdown message. Caught to support async handlers with pm2, needed because + // explicitly calling process.exit() doesn't trigger the beforeExit event, and the exit + // event cannot support async handlers, since the event loop is never called after it. + process.on('message', message => { + if (message === 'shutdown') { + exit(true, -128); + } + }); + } + + return () => { + callbacks.delete(callback); + }; +}; diff --git a/node_modules/exit-hook/license b/node_modules/exit-hook/license new file mode 100644 index 0000000..fa7ceba --- /dev/null +++ b/node_modules/exit-hook/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/exit-hook/package.json b/node_modules/exit-hook/package.json new file mode 100644 index 0000000..3ef0ea8 --- /dev/null +++ b/node_modules/exit-hook/package.json @@ -0,0 +1,45 @@ +{ + "name": "exit-hook", + "version": "2.2.1", + "description": "Run some code when the process exits", + "license": "MIT", + "repository": "sindresorhus/exit-hook", + "funding": "https://github.com/sponsors/sindresorhus", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "https://sindresorhus.com" + }, + "engines": { + "node": ">=6" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "exit", + "quit", + "process", + "hook", + "graceful", + "handler", + "shutdown", + "sigterm", + "sigint", + "terminate", + "kill", + "stop", + "event", + "signal" + ], + "devDependencies": { + "ava": "^1.4.1", + "execa": "^1.0.0", + "tsd": "^0.7.2", + "xo": "^0.24.0" + } +} diff --git a/node_modules/exit-hook/readme.md b/node_modules/exit-hook/readme.md new file mode 100644 index 0000000..e9eb7a2 --- /dev/null +++ b/node_modules/exit-hook/readme.md @@ -0,0 +1,67 @@ +# exit-hook + +> Run some code when the process exits + +The `process.on('exit')` event doesn't catch all the ways a process can exit. + +This package is useful for cleaning up before exiting. + +## Install + +``` +$ npm install exit-hook +``` + +## Usage + +```js +const exitHook = require('exit-hook'); + +exitHook(() => { + console.log('Exiting'); +}); + +// You can add multiple hooks, even across files +exitHook(() => { + console.log('Exiting 2'); +}); + +throw new Error('🦄'); + +//=> 'Exiting' +//=> 'Exiting 2' +``` + +Removing an exit hook: + +```js +const exitHook = require('exit-hook'); + +const unsubscribe = exitHook(() => {}); + +unsubscribe(); +``` + +## API + +### exitHook(callback) + +Returns a function that removes the hook when called. + +#### callback + +Type: `Function` + +The callback to execute when the process exits. + +--- + +
+ + Get professional support for this package with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
diff --git a/node_modules/exsolve/LICENSE b/node_modules/exsolve/LICENSE new file mode 100644 index 0000000..77cb553 --- /dev/null +++ b/node_modules/exsolve/LICENSE @@ -0,0 +1,111 @@ +MIT License + +Copyright (c) Pooya Parsa + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +This is a derivative work based on: +. + +--- + +This is a derivative work based on: +. + +Which is licensed: + +""" +(The MIT License) + +Copyright (c) 2021 Titus Wormer + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +""" + +--- + +This is a derivative work based on: +. + +Which is licensed: + +""" +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" diff --git a/node_modules/exsolve/README.md b/node_modules/exsolve/README.md new file mode 100644 index 0000000..d4a96f6 --- /dev/null +++ b/node_modules/exsolve/README.md @@ -0,0 +1,213 @@ +# exsolve + +[![npm version](https://img.shields.io/npm/v/exsolve?color=yellow)](https://npmjs.com/package/exsolve) +[![npm downloads](https://img.shields.io/npm/dm/exsolve?color=yellow)](https://npm.chart.dev/exsolve) +[![pkg size](https://img.shields.io/npm/unpacked-size/exsolve?color=yellow)](https://packagephobia.com/result?p=exsolve) + +> Module resolution utilities for Node.js (based on previous work in [unjs/mlly](https://github.com/unjs/mlly), [wooorm/import-meta-resolve](https://github.com/wooorm/import-meta-resolve), and the upstream [Node.js](https://github.com/nodejs/node) implementation). + +This library exposes an API similar to [`import.meta.resolve`](https://nodejs.org/api/esm.html#importmetaresolvespecifier) based on Node.js's upstream implementation and [resolution algorithm](https://nodejs.org/api/esm.html#esm_resolution_algorithm). It supports all built-in functionalities—import maps, export maps, CJS, and ESM—with some additions: + +- Pure JS with no native dependencies (only Node.js is required). +- Built-in resolve [cache](#resolve-cache). +- Throws an error (or [try](#try)) if the resolved path does not exist in the filesystem. +- Can override the default [conditions](#conditions). +- Can resolve [from](#from) one or more parent URLs. +- Can resolve with custom [suffixes](#suffixes). +- Can resolve with custom [extensions](#extensions). + +## Usage + +Install the package: + +```sh +# ✨ Auto-detect (npm, yarn, pnpm, bun, deno) +npx nypm install exsolve +``` + +Import: + +```ts +// ESM import +import { + resolveModuleURL, + resolveModulePath, + createResolver, + clearResolveCache, +} from "exsolve"; + +// Or using dynamic import +const { resolveModulePath } = await import("exsolve"); +``` + +```ts +resolveModuleURL(id, { + /* options */ +}); + +resolveModulePath(id, { + /* options */ +}); +``` + +Differences between `resolveModuleURL` and `resolveModulePath`: + +- `resolveModuleURL` returns a URL string like `file:///app/dep.mjs`. +- `resolveModulePath` returns an absolute path like `/app/dep.mjs`. + - If the resolved URL does not use the `file://` scheme (e.g., `data:` or `node:`), it will throw an error. + +## Resolver with Options + +You can create a custom resolver instance with default [options](#resolve-options) using `createResolver`. + +**Example:** + +```ts +import { createResolver } from "exsolve"; + +const { resolveModuleURL, resolveModulePath } = createResolver({ + suffixes: ["", "/index"], + extensions: [".mjs", ".cjs", ".js", ".mts", ".cts", ".ts", ".json"], + conditions: ["node", "import", "production"], +}); +``` + +## Resolve Cache + +To speed up resolution, resolved values (and errors) are globally cached with a unique key based on id and options. + +**Example:** Invalidate all (global) cache entries (to support file-system changes). + +```ts +import { clearResolveCache } from "exsolve"; + +clearResolveCache(); +``` + +**Example:** Custom resolver with custom cache object. + +```ts +import { createResolver } from "exsolve"; + +const { clearResolveCache, resolveModulePath } = createResolver({ + cache: new Map(), +}); +``` + +**Example:** Resolve without cache. + +```ts +import { resolveModulePath } from "exsolve"; + +resolveModulePath("id", { cache: false }); +``` + +## Resolve Options + +### `try` + +If set to `true` and the module cannot be resolved, the resolver returns `undefined` instead of throwing an error. + +**Example:** + +```ts +// undefined +const resolved = resolveModuleURL("non-existing-package", { try: true }); +``` + +### `from` + +A URL, path, or array of URLs/paths from which to resolve the module. + +If not provided, resolution starts from the current working directory. Setting this option is recommended. + +You can use `import.meta.url` for `from` to mimic the behavior of `import.meta.resolve()`. + +> [!TIP] +> For better performance, ensure the value is a `file://` URL or at least ends with `/`. +> +> If it is set to an absolute path, the resolver must first check the filesystem to see if it is a file or directory. +> If the input is a `file://` URL or ends with `/`, the resolver can skip this check. + +### `conditions` + +Conditions to apply when resolving package exports (default: `["node", "import"]`). + +**Example:** + +```ts +// "/app/src/index.ts" +const src = resolveModuleURL("pkg-name", { + conditions: ["deno", "node", "import", "production"], +}); +``` + +> [!NOTE] +> Conditions are applied **without order**. The order is determined by the `exports` field in `package.json`. + +### `extensions` + +Additional file extensions to check as fallbacks. + +**Example:** + +```ts +// "/app/src/index.ts" +const src = resolveModulePath("./src/index", { + extensions: [".mjs", ".cjs", ".js", ".mts", ".cts", ".ts", ".json"], +}); +``` + +> [!TIP] +> For better performance, use explicit extensions and avoid this option. + +### `suffixes` + +Path suffixes to check. + +**Example:** + +```ts +// "/app/src/utils/index.ts" +const src = resolveModulePath("./src/utils", { + suffixes: ["", "/index"], + extensions: [".mjs", ".cjs", ".js"], +}); +``` + +> [!TIP] +> For better performance, use explicit `/index` when needed and avoid this option. + +### `cache` + +Resolve cache (enabled by default with a shared global object). + +Can be set to `false` to disable or a custom `Map` to bring your own cache object. + +See [cache](#resolve-cache) for more info. + +## Other Performance Tips + +**Use explicit module extensions `.mjs` or `.cjs` instead of `.js`:** + +This allows the resolution fast path to skip reading the closest `package.json` for the [`type`](https://nodejs.org/api/packages.html#type). + +## Development + +
+ +local development + +- Clone this repository +- Install the latest LTS version of [Node.js](https://nodejs.org/en/) +- Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable` +- Install dependencies using `pnpm install` +- Run interactive tests using `pnpm dev` + +
+ +## License + +Published under the [MIT](https://github.com/unjs/exsolve/blob/main/LICENSE) license. + +Based on previous work in [unjs/mlly](https://github.com/unjs/mlly), [wooorm/import-meta-resolve](https://github.com/wooorm/import-meta-resolve) and [Node.js](https://github.com/nodejs/node) original implementation. diff --git a/node_modules/exsolve/dist/index.d.mts b/node_modules/exsolve/dist/index.d.mts new file mode 100644 index 0000000..eb7978d --- /dev/null +++ b/node_modules/exsolve/dist/index.d.mts @@ -0,0 +1,67 @@ +/** + * Options to configure module resolution. + */ +type ResolveOptions = { + /** + * A URL, path, or array of URLs/paths from which to resolve the module. + * If not provided, resolution starts from the current working directory. + * You can use `import.meta.url` to mimic the behavior of `import.meta.resolve()`. + * For better performance, use a `file://` URL or path that ends with `/`. + */ + from?: string | URL | (string | URL)[]; + /** + * Resolve cache (enabled by default with a shared global object). + * Can be set to `false` to disable or a custom `Map` to bring your own cache object. + */ + cache?: boolean | Map; + /** + * Additional file extensions to check. + * For better performance, use explicit extensions and avoid this option. + */ + extensions?: string[]; + /** + * Conditions to apply when resolving package exports. + * Defaults to `["node", "import"]`. + * Conditions are applied without order. + */ + conditions?: string[]; + /** + * Path suffixes to check. + * For better performance, use explicit paths and avoid this option. + * Example: `["", "/index"]` + */ + suffixes?: string[]; + /** + * If set to `true` and the module cannot be resolved, + * the resolver returns `undefined` instead of throwing an error. + */ + try?: boolean; +}; +type ResolverOptions = Omit; +type ResolveRes = Opts["try"] extends true ? string | undefined : string; +/** + * Synchronously resolves a module url based on the options provided. + * + * @param {string} input - The identifier or path of the module to resolve. + * @param {ResolveOptions} [options] - Options to resolve the module. See {@link ResolveOptions}. + * @returns {string} The resolved URL as a string. + */ +declare function resolveModuleURL(input: string | URL, options?: O): ResolveRes; +/** + * Synchronously resolves a module then converts it to a file path + * + * (throws error if reolved path is not file:// scheme) + * + * @param {string} id - The identifier or path of the module to resolve. + * @param {ResolveOptions} [options] - Options to resolve the module. See {@link ResolveOptions}. + * @returns {string} The resolved URL as a string. + */ +declare function resolveModulePath(id: string | URL, options?: O): ResolveRes; +declare function createResolver(defaults?: ResolverOptions): { + resolveModuleURL: (id: string | URL, opts: ResolveOptions) => ResolveRes; + resolveModulePath: (id: string | URL, opts: ResolveOptions) => ResolveRes; + clearResolveCache: () => void; +}; +declare function clearResolveCache(): void; + +export { type ResolveOptions, type ResolverOptions, clearResolveCache, createResolver, resolveModulePath, resolveModuleURL }; diff --git a/node_modules/exsolve/dist/index.mjs b/node_modules/exsolve/dist/index.mjs new file mode 100644 index 0000000..04e7d6e --- /dev/null +++ b/node_modules/exsolve/dist/index.mjs @@ -0,0 +1,1436 @@ +import fs, { realpathSync, statSync, lstatSync } from 'node:fs'; +import { fileURLToPath, URL as URL$1, pathToFileURL } from 'node:url'; +import path, { isAbsolute } from 'node:path'; +import assert from 'node:assert'; +import process$1 from 'node:process'; +import v8 from 'node:v8'; +import { format, inspect } from 'node:util'; + +const nodeBuiltins = [ + "_http_agent", + "_http_client", + "_http_common", + "_http_incoming", + "_http_outgoing", + "_http_server", + "_stream_duplex", + "_stream_passthrough", + "_stream_readable", + "_stream_transform", + "_stream_wrap", + "_stream_writable", + "_tls_common", + "_tls_wrap", + "assert", + "assert/strict", + "async_hooks", + "buffer", + "child_process", + "cluster", + "console", + "constants", + "crypto", + "dgram", + "diagnostics_channel", + "dns", + "dns/promises", + "domain", + "events", + "fs", + "fs/promises", + "http", + "http2", + "https", + "inspector", + "inspector/promises", + "module", + "net", + "os", + "path", + "path/posix", + "path/win32", + "perf_hooks", + "process", + "punycode", + "querystring", + "readline", + "readline/promises", + "repl", + "stream", + "stream/consumers", + "stream/promises", + "stream/web", + "string_decoder", + "sys", + "timers", + "timers/promises", + "tls", + "trace_events", + "tty", + "url", + "util", + "util/types", + "v8", + "vm", + "wasi", + "worker_threads", + "zlib" +]; + +const own$1 = {}.hasOwnProperty; +const classRegExp = /^([A-Z][a-z\d]*)+$/; +const kTypes = /* @__PURE__ */ new Set([ + "string", + "function", + "number", + "object", + // Accept 'Function' and 'Object' as alternative to the lower cased version. + "Function", + "Object", + "boolean", + "bigint", + "symbol" +]); +const messages = /* @__PURE__ */ new Map(); +const nodeInternalPrefix = "__node_internal_"; +let userStackTraceLimit; +function formatList(array, type = "and") { + return array.length < 3 ? array.join(` ${type} `) : `${array.slice(0, -1).join(", ")}, ${type} ${array.at(-1)}`; +} +function createError(sym, value, constructor) { + messages.set(sym, value); + return makeNodeErrorWithCode(constructor, sym); +} +function makeNodeErrorWithCode(Base, key) { + return function NodeError(...parameters) { + const limit = Error.stackTraceLimit; + if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = 0; + const error = new Base(); + if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = limit; + const message = getMessage(key, parameters, error); + Object.defineProperties(error, { + // Note: no need to implement `kIsNodeError` symbol, would be hard, + // probably. + message: { + value: message, + enumerable: false, + writable: true, + configurable: true + }, + toString: { + /** @this {Error} */ + value() { + return `${this.name} [${key}]: ${this.message}`; + }, + enumerable: false, + writable: true, + configurable: true + } + }); + captureLargerStackTrace(error); + error.code = key; + return error; + }; +} +function isErrorStackTraceLimitWritable() { + try { + if (v8.startupSnapshot.isBuildingSnapshot()) { + return false; + } + } catch { + } + const desc = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit"); + if (desc === void 0) { + return Object.isExtensible(Error); + } + return own$1.call(desc, "writable") && desc.writable !== void 0 ? desc.writable : desc.set !== void 0; +} +function hideStackFrames(wrappedFunction) { + const hidden = nodeInternalPrefix + wrappedFunction.name; + Object.defineProperty(wrappedFunction, "name", { value: hidden }); + return wrappedFunction; +} +const captureLargerStackTrace = hideStackFrames(function(error) { + const stackTraceLimitIsWritable = isErrorStackTraceLimitWritable(); + if (stackTraceLimitIsWritable) { + userStackTraceLimit = Error.stackTraceLimit; + Error.stackTraceLimit = Number.POSITIVE_INFINITY; + } + Error.captureStackTrace(error); + if (stackTraceLimitIsWritable) Error.stackTraceLimit = userStackTraceLimit; + return error; +}); +function getMessage(key, parameters, self) { + const message = messages.get(key); + assert(message !== void 0, "expected `message` to be found"); + if (typeof message === "function") { + assert( + message.length <= parameters.length, + // Default options do not count. + `Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${message.length}).` + ); + return Reflect.apply(message, self, parameters); + } + const regex = /%[dfijoOs]/g; + let expectedLength = 0; + while (regex.exec(message) !== null) expectedLength++; + assert( + expectedLength === parameters.length, + `Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${expectedLength}).` + ); + if (parameters.length === 0) return message; + parameters.unshift(message); + return Reflect.apply(format, null, parameters); +} +function determineSpecificType(value) { + if (value === null || value === void 0) { + return String(value); + } + if (typeof value === "function" && value.name) { + return `function ${value.name}`; + } + if (typeof value === "object") { + if (value.constructor && value.constructor.name) { + return `an instance of ${value.constructor.name}`; + } + return `${inspect(value, { depth: -1 })}`; + } + let inspected = inspect(value, { colors: false }); + if (inspected.length > 28) { + inspected = `${inspected.slice(0, 25)}...`; + } + return `type ${typeof value} (${inspected})`; +} +createError( + "ERR_INVALID_ARG_TYPE", + (name, expected, actual) => { + assert(typeof name === "string", "'name' must be a string"); + if (!Array.isArray(expected)) { + expected = [expected]; + } + let message = "The "; + if (name.endsWith(" argument")) { + message += `${name} `; + } else { + const type = name.includes(".") ? "property" : "argument"; + message += `"${name}" ${type} `; + } + message += "must be "; + const types = []; + const instances = []; + const other = []; + for (const value of expected) { + assert( + typeof value === "string", + "All expected entries have to be of type string" + ); + if (kTypes.has(value)) { + types.push(value.toLowerCase()); + } else if (classRegExp.exec(value) === null) { + assert( + value !== "object", + 'The value "object" should be written as "Object"' + ); + other.push(value); + } else { + instances.push(value); + } + } + if (instances.length > 0) { + const pos = types.indexOf("object"); + if (pos !== -1) { + types.slice(pos, 1); + instances.push("Object"); + } + } + if (types.length > 0) { + message += `${types.length > 1 ? "one of type" : "of type"} ${formatList( + types, + "or" + )}`; + if (instances.length > 0 || other.length > 0) message += " or "; + } + if (instances.length > 0) { + message += `an instance of ${formatList(instances, "or")}`; + if (other.length > 0) message += " or "; + } + if (other.length > 0) { + if (other.length > 1) { + message += `one of ${formatList(other, "or")}`; + } else { + if (other[0]?.toLowerCase() !== other[0]) message += "an "; + message += `${other[0]}`; + } + } + message += `. Received ${determineSpecificType(actual)}`; + return message; + }, + TypeError +); +const ERR_INVALID_MODULE_SPECIFIER = createError( + "ERR_INVALID_MODULE_SPECIFIER", + /** + * @param {string} request + * @param {string} reason + * @param {string} [base] + */ + (request, reason, base) => { + return `Invalid module "${request}" ${reason}${base ? ` imported from ${base}` : ""}`; + }, + TypeError +); +const ERR_INVALID_PACKAGE_CONFIG = createError( + "ERR_INVALID_PACKAGE_CONFIG", + (path, base, message) => { + return `Invalid package config ${path}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`; + }, + Error +); +const ERR_INVALID_PACKAGE_TARGET = createError( + "ERR_INVALID_PACKAGE_TARGET", + (packagePath, key, target, isImport = false, base) => { + const relatedError = typeof target === "string" && !isImport && target.length > 0 && !target.startsWith("./"); + if (key === ".") { + assert(isImport === false); + return `Invalid "exports" main target ${JSON.stringify(target)} defined in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? '; targets must start with "./"' : ""}`; + } + return `Invalid "${isImport ? "imports" : "exports"}" target ${JSON.stringify( + target + )} defined for '${key}' in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? '; targets must start with "./"' : ""}`; + }, + Error +); +const ERR_MODULE_NOT_FOUND = createError( + "ERR_MODULE_NOT_FOUND", + (path, base, exactUrl = false) => { + return `Cannot find ${exactUrl ? "module" : "package"} '${path}' imported from ${base}`; + }, + Error +); +createError( + "ERR_NETWORK_IMPORT_DISALLOWED", + "import of '%s' by %s is not supported: %s", + Error +); +const ERR_PACKAGE_IMPORT_NOT_DEFINED = createError( + "ERR_PACKAGE_IMPORT_NOT_DEFINED", + (specifier, packagePath, base) => { + return `Package import specifier "${specifier}" is not defined${packagePath ? ` in package ${packagePath || ""}package.json` : ""} imported from ${base}`; + }, + TypeError +); +const ERR_PACKAGE_PATH_NOT_EXPORTED = createError( + "ERR_PACKAGE_PATH_NOT_EXPORTED", + /** + * @param {string} packagePath + * @param {string} subpath + * @param {string} [base] + */ + (packagePath, subpath, base) => { + if (subpath === ".") + return `No "exports" main defined in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`; + return `Package subpath '${subpath}' is not defined by "exports" in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`; + }, + Error +); +const ERR_UNSUPPORTED_DIR_IMPORT = createError( + "ERR_UNSUPPORTED_DIR_IMPORT", + "Directory import '%s' is not supported resolving ES modules imported from %s", + Error +); +const ERR_UNSUPPORTED_RESOLVE_REQUEST = createError( + "ERR_UNSUPPORTED_RESOLVE_REQUEST", + 'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.', + TypeError +); +const ERR_UNKNOWN_FILE_EXTENSION = createError( + "ERR_UNKNOWN_FILE_EXTENSION", + (extension, path) => { + return `Unknown file extension "${extension}" for ${path}`; + }, + TypeError +); +createError( + "ERR_INVALID_ARG_VALUE", + (name, value, reason = "is invalid") => { + let inspected = inspect(value); + if (inspected.length > 128) { + inspected = `${inspected.slice(0, 128)}...`; + } + const type = name.includes(".") ? "property" : "argument"; + return `The ${type} '${name}' ${reason}. Received ${inspected}`; + }, + TypeError + // Note: extra classes have been shaken out. + // , RangeError +); + +const hasOwnProperty$1 = {}.hasOwnProperty; +const cache = /* @__PURE__ */ new Map(); +function read(jsonPath, { base, specifier }) { + const existing = cache.get(jsonPath); + if (existing) { + return existing; + } + let string; + try { + string = fs.readFileSync(path.toNamespacedPath(jsonPath), "utf8"); + } catch (error) { + const exception = error; + if (exception.code !== "ENOENT") { + throw exception; + } + } + const result = { + exists: false, + pjsonPath: jsonPath, + main: void 0, + name: void 0, + type: "none", + // Ignore unknown types for forwards compatibility + exports: void 0, + imports: void 0 + }; + if (string !== void 0) { + let parsed; + try { + parsed = JSON.parse(string); + } catch (error_) { + const error = new ERR_INVALID_PACKAGE_CONFIG( + jsonPath, + (base ? `"${specifier}" from ` : "") + fileURLToPath(base || specifier), + error_.message + ); + error.cause = error_; + throw error; + } + result.exists = true; + if (hasOwnProperty$1.call(parsed, "name") && typeof parsed.name === "string") { + result.name = parsed.name; + } + if (hasOwnProperty$1.call(parsed, "main") && typeof parsed.main === "string") { + result.main = parsed.main; + } + if (hasOwnProperty$1.call(parsed, "exports")) { + result.exports = parsed.exports; + } + if (hasOwnProperty$1.call(parsed, "imports")) { + result.imports = parsed.imports; + } + if (hasOwnProperty$1.call(parsed, "type") && (parsed.type === "commonjs" || parsed.type === "module")) { + result.type = parsed.type; + } + } + cache.set(jsonPath, result); + return result; +} +function getPackageScopeConfig(resolved) { + let packageJSONUrl = new URL("package.json", resolved); + while (true) { + const packageJSONPath2 = packageJSONUrl.pathname; + if (packageJSONPath2.endsWith("node_modules/package.json")) { + break; + } + const packageConfig = read(fileURLToPath(packageJSONUrl), { + specifier: resolved + }); + if (packageConfig.exists) { + return packageConfig; + } + const lastPackageJSONUrl = packageJSONUrl; + packageJSONUrl = new URL("../package.json", packageJSONUrl); + if (packageJSONUrl.pathname === lastPackageJSONUrl.pathname) { + break; + } + } + const packageJSONPath = fileURLToPath(packageJSONUrl); + return { + pjsonPath: packageJSONPath, + exists: false, + type: "none" + }; +} + +const hasOwnProperty = {}.hasOwnProperty; +const extensionFormatMap = { + __proto__: null, + ".json": "json", + ".cjs": "commonjs", + ".cts": "commonjs", + ".js": "module", + ".ts": "module", + ".mts": "module", + ".mjs": "module" +}; +const protocolHandlers = { + __proto__: null, + "data:": getDataProtocolModuleFormat, + "file:": getFileProtocolModuleFormat, + "node:": () => "builtin" +}; +function mimeToFormat(mime) { + if (mime && /\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(mime)) + return "module"; + if (mime === "application/json") return "json"; + return null; +} +function getDataProtocolModuleFormat(parsed) { + const { 1: mime } = /^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec( + parsed.pathname + ) || [null, null, null]; + return mimeToFormat(mime); +} +function extname(url) { + const pathname = url.pathname; + let index = pathname.length; + while (index--) { + const code = pathname.codePointAt(index); + if (code === 47) { + return ""; + } + if (code === 46) { + return pathname.codePointAt(index - 1) === 47 ? "" : pathname.slice(index); + } + } + return ""; +} +function getFileProtocolModuleFormat(url, _context, ignoreErrors) { + const ext = extname(url); + if (ext === ".js") { + const { type: packageType } = getPackageScopeConfig(url); + if (packageType !== "none") { + return packageType; + } + return "commonjs"; + } + if (ext === "") { + const { type: packageType } = getPackageScopeConfig(url); + if (packageType === "none" || packageType === "commonjs") { + return "commonjs"; + } + return "module"; + } + const format = extensionFormatMap[ext]; + if (format) return format; + if (ignoreErrors) { + return void 0; + } + const filepath = fileURLToPath(url); + throw new ERR_UNKNOWN_FILE_EXTENSION(ext, filepath); +} +function defaultGetFormatWithoutErrors(url, context) { + const protocol = url.protocol; + if (!hasOwnProperty.call(protocolHandlers, protocol)) { + return null; + } + return protocolHandlers[protocol](url, context, true) || null; +} + +const RegExpPrototypeSymbolReplace = RegExp.prototype[Symbol.replace]; +const own = {}.hasOwnProperty; +const invalidSegmentRegEx = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i; +const deprecatedInvalidSegmentRegEx = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i; +const invalidPackageNameRegEx = /^\.|%|\\/; +const patternRegEx = /\*/g; +const encodedSeparatorRegEx = /%2f|%5c/i; +const emittedPackageWarnings = /* @__PURE__ */ new Set(); +const doubleSlashRegEx = /[/\\]{2}/; +function emitInvalidSegmentDeprecation(target, request, match, packageJsonUrl, internal, base, isTarget) { + if (process$1.noDeprecation) { + return; + } + const pjsonPath = fileURLToPath(packageJsonUrl); + const double = doubleSlashRegEx.exec(isTarget ? target : request) !== null; + process$1.emitWarning( + `Use of deprecated ${double ? "double slash" : "leading or trailing slash matching"} resolving "${target}" for module request "${request}" ${request === match ? "" : `matched to "${match}" `}in the "${internal ? "imports" : "exports"}" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${fileURLToPath(base)}` : ""}.`, + "DeprecationWarning", + "DEP0166" + ); +} +function emitLegacyIndexDeprecation(url, packageJsonUrl, base, main) { + if (process$1.noDeprecation) { + return; + } + const format = defaultGetFormatWithoutErrors(url, { parentURL: base.href }); + if (format !== "module") return; + const urlPath = fileURLToPath(url.href); + const packagePath = fileURLToPath(new URL$1(".", packageJsonUrl)); + const basePath = fileURLToPath(base); + if (!main) { + process$1.emitWarning( + `No "main" or "exports" field defined in the package.json for ${packagePath} resolving the main entry point "${urlPath.slice( + packagePath.length + )}", imported from ${basePath}. +Default "index" lookups for the main are deprecated for ES modules.`, + "DeprecationWarning", + "DEP0151" + ); + } else if (path.resolve(packagePath, main) !== urlPath) { + process$1.emitWarning( + `Package ${packagePath} has a "main" field set to "${main}", excluding the full filename and extension to the resolved file at "${urlPath.slice( + packagePath.length + )}", imported from ${basePath}. + Automatic extension resolution of the "main" field is deprecated for ES modules.`, + "DeprecationWarning", + "DEP0151" + ); + } +} +function tryStatSync(path2) { + try { + return statSync(path2); + } catch { + } +} +function fileExists(url) { + const stats = statSync(url, { throwIfNoEntry: false }); + const isFile = stats ? stats.isFile() : void 0; + return isFile === null || isFile === void 0 ? false : isFile; +} +function legacyMainResolve(packageJsonUrl, packageConfig, base) { + let guess; + if (packageConfig.main !== void 0) { + guess = new URL$1(packageConfig.main, packageJsonUrl); + if (fileExists(guess)) return guess; + const tries2 = [ + `./${packageConfig.main}.js`, + `./${packageConfig.main}.json`, + `./${packageConfig.main}.node`, + `./${packageConfig.main}/index.js`, + `./${packageConfig.main}/index.json`, + `./${packageConfig.main}/index.node` + ]; + let i2 = -1; + while (++i2 < tries2.length) { + guess = new URL$1(tries2[i2], packageJsonUrl); + if (fileExists(guess)) break; + guess = void 0; + } + if (guess) { + emitLegacyIndexDeprecation( + guess, + packageJsonUrl, + base, + packageConfig.main + ); + return guess; + } + } + const tries = ["./index.js", "./index.json", "./index.node"]; + let i = -1; + while (++i < tries.length) { + guess = new URL$1(tries[i], packageJsonUrl); + if (fileExists(guess)) break; + guess = void 0; + } + if (guess) { + emitLegacyIndexDeprecation(guess, packageJsonUrl, base, packageConfig.main); + return guess; + } + throw new ERR_MODULE_NOT_FOUND( + fileURLToPath(new URL$1(".", packageJsonUrl)), + fileURLToPath(base) + ); +} +function finalizeResolution(resolved, base, preserveSymlinks) { + if (encodedSeparatorRegEx.exec(resolved.pathname) !== null) { + throw new ERR_INVALID_MODULE_SPECIFIER( + resolved.pathname, + String.raw`must not include encoded "/" or "\" characters`, + fileURLToPath(base) + ); + } + let filePath; + try { + filePath = fileURLToPath(resolved); + } catch (error) { + Object.defineProperty(error, "input", { value: String(resolved) }); + Object.defineProperty(error, "module", { value: String(base) }); + throw error; + } + const stats = tryStatSync( + filePath.endsWith("/") ? filePath.slice(-1) : filePath + ); + if (stats && stats.isDirectory()) { + const error = new ERR_UNSUPPORTED_DIR_IMPORT(filePath, fileURLToPath(base)); + error.url = String(resolved); + throw error; + } + if (!stats || !stats.isFile()) { + const error = new ERR_MODULE_NOT_FOUND( + filePath || resolved.pathname, + base && fileURLToPath(base), + true + ); + error.url = String(resolved); + throw error; + } + { + const real = realpathSync(filePath); + const { search, hash } = resolved; + resolved = pathToFileURL(real + (filePath.endsWith(path.sep) ? "/" : "")); + resolved.search = search; + resolved.hash = hash; + } + return resolved; +} +function importNotDefined(specifier, packageJsonUrl, base) { + return new ERR_PACKAGE_IMPORT_NOT_DEFINED( + specifier, + packageJsonUrl && fileURLToPath(new URL$1(".", packageJsonUrl)), + fileURLToPath(base) + ); +} +function exportsNotFound(subpath, packageJsonUrl, base) { + return new ERR_PACKAGE_PATH_NOT_EXPORTED( + fileURLToPath(new URL$1(".", packageJsonUrl)), + subpath, + base && fileURLToPath(base) + ); +} +function throwInvalidSubpath(request, match, packageJsonUrl, internal, base) { + const reason = `request is not a valid match in pattern "${match}" for the "${internal ? "imports" : "exports"}" resolution of ${fileURLToPath(packageJsonUrl)}`; + throw new ERR_INVALID_MODULE_SPECIFIER( + request, + reason, + base && fileURLToPath(base) + ); +} +function invalidPackageTarget(subpath, target, packageJsonUrl, internal, base) { + target = typeof target === "object" && target !== null ? JSON.stringify(target, null, "") : `${target}`; + return new ERR_INVALID_PACKAGE_TARGET( + fileURLToPath(new URL$1(".", packageJsonUrl)), + subpath, + target, + internal, + base && fileURLToPath(base) + ); +} +function resolvePackageTargetString(target, subpath, match, packageJsonUrl, base, pattern, internal, isPathMap, conditions) { + if (subpath !== "" && !pattern && target.at(-1) !== "/") + throw invalidPackageTarget(match, target, packageJsonUrl, internal, base); + if (!target.startsWith("./")) { + if (internal && !target.startsWith("../") && !target.startsWith("/")) { + let isURL = false; + try { + new URL$1(target); + isURL = true; + } catch { + } + if (!isURL) { + const exportTarget = pattern ? RegExpPrototypeSymbolReplace.call( + patternRegEx, + target, + () => subpath + ) : target + subpath; + return packageResolve(exportTarget, packageJsonUrl, conditions); + } + } + throw invalidPackageTarget(match, target, packageJsonUrl, internal, base); + } + if (invalidSegmentRegEx.exec(target.slice(2)) !== null) { + if (deprecatedInvalidSegmentRegEx.exec(target.slice(2)) === null) { + if (!isPathMap) { + const request = pattern ? match.replace("*", () => subpath) : match + subpath; + const resolvedTarget = pattern ? RegExpPrototypeSymbolReplace.call( + patternRegEx, + target, + () => subpath + ) : target; + emitInvalidSegmentDeprecation( + resolvedTarget, + request, + match, + packageJsonUrl, + internal, + base, + true + ); + } + } else { + throw invalidPackageTarget(match, target, packageJsonUrl, internal, base); + } + } + const resolved = new URL$1(target, packageJsonUrl); + const resolvedPath = resolved.pathname; + const packagePath = new URL$1(".", packageJsonUrl).pathname; + if (!resolvedPath.startsWith(packagePath)) + throw invalidPackageTarget(match, target, packageJsonUrl, internal, base); + if (subpath === "") return resolved; + if (invalidSegmentRegEx.exec(subpath) !== null) { + const request = pattern ? match.replace("*", () => subpath) : match + subpath; + if (deprecatedInvalidSegmentRegEx.exec(subpath) === null) { + if (!isPathMap) { + const resolvedTarget = pattern ? RegExpPrototypeSymbolReplace.call( + patternRegEx, + target, + () => subpath + ) : target; + emitInvalidSegmentDeprecation( + resolvedTarget, + request, + match, + packageJsonUrl, + internal, + base, + false + ); + } + } else { + throwInvalidSubpath(request, match, packageJsonUrl, internal, base); + } + } + if (pattern) { + return new URL$1( + RegExpPrototypeSymbolReplace.call( + patternRegEx, + resolved.href, + () => subpath + ) + ); + } + return new URL$1(subpath, resolved); +} +function isArrayIndex(key) { + const keyNumber = Number(key); + if (`${keyNumber}` !== key) return false; + return keyNumber >= 0 && keyNumber < 4294967295; +} +function resolvePackageTarget(packageJsonUrl, target, subpath, packageSubpath, base, pattern, internal, isPathMap, conditions) { + if (typeof target === "string") { + return resolvePackageTargetString( + target, + subpath, + packageSubpath, + packageJsonUrl, + base, + pattern, + internal, + isPathMap, + conditions + ); + } + if (Array.isArray(target)) { + const targetList = target; + if (targetList.length === 0) return null; + let lastException; + let i = -1; + while (++i < targetList.length) { + const targetItem = targetList[i]; + let resolveResult; + try { + resolveResult = resolvePackageTarget( + packageJsonUrl, + targetItem, + subpath, + packageSubpath, + base, + pattern, + internal, + isPathMap, + conditions + ); + } catch (error) { + const exception = error; + lastException = exception; + if (exception.code === "ERR_INVALID_PACKAGE_TARGET") continue; + throw error; + } + if (resolveResult === void 0) continue; + if (resolveResult === null) { + lastException = null; + continue; + } + return resolveResult; + } + if (lastException === void 0 || lastException === null) { + return null; + } + throw lastException; + } + if (typeof target === "object" && target !== null) { + const keys = Object.getOwnPropertyNames(target); + let i = -1; + while (++i < keys.length) { + const key = keys[i]; + if (isArrayIndex(key)) { + throw new ERR_INVALID_PACKAGE_CONFIG( + fileURLToPath(packageJsonUrl), + fileURLToPath(base), + '"exports" cannot contain numeric property keys.' + ); + } + } + i = -1; + while (++i < keys.length) { + const key = keys[i]; + if (key === "default" || conditions && conditions.has(key)) { + const conditionalTarget = target[key]; + const resolveResult = resolvePackageTarget( + packageJsonUrl, + conditionalTarget, + subpath, + packageSubpath, + base, + pattern, + internal, + isPathMap, + conditions + ); + if (resolveResult === void 0) continue; + return resolveResult; + } + } + return null; + } + if (target === null) { + return null; + } + throw invalidPackageTarget( + packageSubpath, + target, + packageJsonUrl, + internal, + base + ); +} +function isConditionalExportsMainSugar(exports, packageJsonUrl, base) { + if (typeof exports === "string" || Array.isArray(exports)) return true; + if (typeof exports !== "object" || exports === null) return false; + const keys = Object.getOwnPropertyNames(exports); + let isConditionalSugar = false; + let i = 0; + let keyIndex = -1; + while (++keyIndex < keys.length) { + const key = keys[keyIndex]; + const currentIsConditionalSugar = key === "" || key[0] !== "."; + if (i++ === 0) { + isConditionalSugar = currentIsConditionalSugar; + } else if (isConditionalSugar !== currentIsConditionalSugar) { + throw new ERR_INVALID_PACKAGE_CONFIG( + fileURLToPath(packageJsonUrl), + fileURLToPath(base), + `"exports" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.` + ); + } + } + return isConditionalSugar; +} +function emitTrailingSlashPatternDeprecation(match, pjsonUrl, base) { + if (process$1.noDeprecation) { + return; + } + const pjsonPath = fileURLToPath(pjsonUrl); + if (emittedPackageWarnings.has(pjsonPath + "|" + match)) return; + emittedPackageWarnings.add(pjsonPath + "|" + match); + process$1.emitWarning( + `Use of deprecated trailing slash pattern mapping "${match}" in the "exports" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${fileURLToPath(base)}` : ""}. Mapping specifiers ending in "/" is no longer supported.`, + "DeprecationWarning", + "DEP0155" + ); +} +function packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, base, conditions) { + let exports = packageConfig.exports; + if (isConditionalExportsMainSugar(exports, packageJsonUrl, base)) { + exports = { ".": exports }; + } + if (own.call(exports, packageSubpath) && !packageSubpath.includes("*") && !packageSubpath.endsWith("/")) { + const target = exports[packageSubpath]; + const resolveResult = resolvePackageTarget( + packageJsonUrl, + target, + "", + packageSubpath, + base, + false, + false, + false, + conditions + ); + if (resolveResult === null || resolveResult === void 0) { + throw exportsNotFound(packageSubpath, packageJsonUrl, base); + } + return resolveResult; + } + let bestMatch = ""; + let bestMatchSubpath = ""; + const keys = Object.getOwnPropertyNames(exports); + let i = -1; + while (++i < keys.length) { + const key = keys[i]; + const patternIndex = key.indexOf("*"); + if (patternIndex !== -1 && packageSubpath.startsWith(key.slice(0, patternIndex))) { + if (packageSubpath.endsWith("/")) { + emitTrailingSlashPatternDeprecation( + packageSubpath, + packageJsonUrl, + base + ); + } + const patternTrailer = key.slice(patternIndex + 1); + if (packageSubpath.length >= key.length && packageSubpath.endsWith(patternTrailer) && patternKeyCompare(bestMatch, key) === 1 && key.lastIndexOf("*") === patternIndex) { + bestMatch = key; + bestMatchSubpath = packageSubpath.slice( + patternIndex, + packageSubpath.length - patternTrailer.length + ); + } + } + } + if (bestMatch) { + const target = exports[bestMatch]; + const resolveResult = resolvePackageTarget( + packageJsonUrl, + target, + bestMatchSubpath, + bestMatch, + base, + true, + false, + packageSubpath.endsWith("/"), + conditions + ); + if (resolveResult === null || resolveResult === void 0) { + throw exportsNotFound(packageSubpath, packageJsonUrl, base); + } + return resolveResult; + } + throw exportsNotFound(packageSubpath, packageJsonUrl, base); +} +function patternKeyCompare(a, b) { + const aPatternIndex = a.indexOf("*"); + const bPatternIndex = b.indexOf("*"); + const baseLengthA = aPatternIndex === -1 ? a.length : aPatternIndex + 1; + const baseLengthB = bPatternIndex === -1 ? b.length : bPatternIndex + 1; + if (baseLengthA > baseLengthB) return -1; + if (baseLengthB > baseLengthA) return 1; + if (aPatternIndex === -1) return 1; + if (bPatternIndex === -1) return -1; + if (a.length > b.length) return -1; + if (b.length > a.length) return 1; + return 0; +} +function packageImportsResolve(name, base, conditions) { + if (name === "#" || name.startsWith("#/") || name.endsWith("/")) { + const reason = "is not a valid internal imports specifier name"; + throw new ERR_INVALID_MODULE_SPECIFIER(name, reason, fileURLToPath(base)); + } + let packageJsonUrl; + const packageConfig = getPackageScopeConfig(base); + if (packageConfig.exists) { + packageJsonUrl = pathToFileURL(packageConfig.pjsonPath); + const imports = packageConfig.imports; + if (imports) { + if (own.call(imports, name) && !name.includes("*")) { + const resolveResult = resolvePackageTarget( + packageJsonUrl, + imports[name], + "", + name, + base, + false, + true, + false, + conditions + ); + if (resolveResult !== null && resolveResult !== void 0) { + return resolveResult; + } + } else { + let bestMatch = ""; + let bestMatchSubpath = ""; + const keys = Object.getOwnPropertyNames(imports); + let i = -1; + while (++i < keys.length) { + const key = keys[i]; + const patternIndex = key.indexOf("*"); + if (patternIndex !== -1 && name.startsWith(key.slice(0, -1))) { + const patternTrailer = key.slice(patternIndex + 1); + if (name.length >= key.length && name.endsWith(patternTrailer) && patternKeyCompare(bestMatch, key) === 1 && key.lastIndexOf("*") === patternIndex) { + bestMatch = key; + bestMatchSubpath = name.slice( + patternIndex, + name.length - patternTrailer.length + ); + } + } + } + if (bestMatch) { + const target = imports[bestMatch]; + const resolveResult = resolvePackageTarget( + packageJsonUrl, + target, + bestMatchSubpath, + bestMatch, + base, + true, + true, + false, + conditions + ); + if (resolveResult !== null && resolveResult !== void 0) { + return resolveResult; + } + } + } + } + } + throw importNotDefined(name, packageJsonUrl, base); +} +function parsePackageName(specifier, base) { + let separatorIndex = specifier.indexOf("/"); + let validPackageName = true; + let isScoped = false; + if (specifier[0] === "@") { + isScoped = true; + if (separatorIndex === -1 || specifier.length === 0) { + validPackageName = false; + } else { + separatorIndex = specifier.indexOf("/", separatorIndex + 1); + } + } + const packageName = separatorIndex === -1 ? specifier : specifier.slice(0, separatorIndex); + if (invalidPackageNameRegEx.exec(packageName) !== null) { + validPackageName = false; + } + if (!validPackageName) { + throw new ERR_INVALID_MODULE_SPECIFIER( + specifier, + "is not a valid package name", + fileURLToPath(base) + ); + } + const packageSubpath = "." + (separatorIndex === -1 ? "" : specifier.slice(separatorIndex)); + return { packageName, packageSubpath, isScoped }; +} +function packageResolve(specifier, base, conditions) { + if (nodeBuiltins.includes(specifier)) { + return new URL$1("node:" + specifier); + } + const { packageName, packageSubpath, isScoped } = parsePackageName( + specifier, + base + ); + const packageConfig = getPackageScopeConfig(base); + if (packageConfig.exists && packageConfig.name === packageName && packageConfig.exports !== void 0 && packageConfig.exports !== null) { + const packageJsonUrl2 = pathToFileURL(packageConfig.pjsonPath); + return packageExportsResolve( + packageJsonUrl2, + packageSubpath, + packageConfig, + base, + conditions + ); + } + let packageJsonUrl = new URL$1( + "./node_modules/" + packageName + "/package.json", + base + ); + let packageJsonPath = fileURLToPath(packageJsonUrl); + let lastPath; + do { + const stat = tryStatSync(packageJsonPath.slice(0, -13)); + if (!stat || !stat.isDirectory()) { + lastPath = packageJsonPath; + packageJsonUrl = new URL$1( + (isScoped ? "../../../../node_modules/" : "../../../node_modules/") + packageName + "/package.json", + packageJsonUrl + ); + packageJsonPath = fileURLToPath(packageJsonUrl); + continue; + } + const packageConfig2 = read(packageJsonPath, { base, specifier }); + if (packageConfig2.exports !== void 0 && packageConfig2.exports !== null) { + return packageExportsResolve( + packageJsonUrl, + packageSubpath, + packageConfig2, + base, + conditions + ); + } + if (packageSubpath === ".") { + return legacyMainResolve(packageJsonUrl, packageConfig2, base); + } + return new URL$1(packageSubpath, packageJsonUrl); + } while (packageJsonPath.length !== lastPath.length); + throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath(base), false); +} +function isRelativeSpecifier(specifier) { + if (specifier[0] === ".") { + if (specifier.length === 1 || specifier[1] === "/") return true; + if (specifier[1] === "." && (specifier.length === 2 || specifier[2] === "/")) { + return true; + } + } + return false; +} +function shouldBeTreatedAsRelativeOrAbsolutePath(specifier) { + if (specifier === "") return false; + if (specifier[0] === "/") return true; + return isRelativeSpecifier(specifier); +} +function moduleResolve(specifier, base, conditions, preserveSymlinks) { + const protocol = base.protocol; + const isData = protocol === "data:"; + let resolved; + if (shouldBeTreatedAsRelativeOrAbsolutePath(specifier)) { + try { + resolved = new URL$1(specifier, base); + } catch (error_) { + const error = new ERR_UNSUPPORTED_RESOLVE_REQUEST(specifier, base); + error.cause = error_; + throw error; + } + } else if (protocol === "file:" && specifier[0] === "#") { + resolved = packageImportsResolve(specifier, base, conditions); + } else { + try { + resolved = new URL$1(specifier); + } catch (error_) { + if (isData && !nodeBuiltins.includes(specifier)) { + const error = new ERR_UNSUPPORTED_RESOLVE_REQUEST(specifier, base); + error.cause = error_; + throw error; + } + resolved = packageResolve(specifier, base, conditions); + } + } + assert(resolved !== void 0, "expected to be defined"); + if (resolved.protocol !== "file:") { + return resolved; + } + return finalizeResolution(resolved, base); +} + +const DEFAULT_CONDITIONS_SET = /* @__PURE__ */ new Set(["node", "import"]); +const isWindows = /* @__PURE__ */ (() => process.platform === "win32")(); +const NOT_FOUND_ERRORS = /* @__PURE__ */ new Set([ + "ERR_MODULE_NOT_FOUND", + "ERR_UNSUPPORTED_DIR_IMPORT", + "MODULE_NOT_FOUND", + "ERR_PACKAGE_PATH_NOT_EXPORTED", + "ERR_PACKAGE_IMPORT_NOT_DEFINED" +]); +const globalCache = /* @__PURE__ */ (() => ( + // eslint-disable-next-line unicorn/no-unreadable-iife + globalThis["__EXSOLVE_CACHE__"] ||= /* @__PURE__ */ new Map() +))(); +function resolveModuleURL(input, options) { + const parsedInput = _parseInput(input); + if ("external" in parsedInput) { + return parsedInput.external; + } + const specifier = parsedInput.specifier; + let url = parsedInput.url; + let absolutePath = parsedInput.absolutePath; + let cacheKey; + let cacheObj; + if (options?.cache !== false) { + cacheKey = _cacheKey(absolutePath || specifier, options); + cacheObj = options?.cache && typeof options?.cache === "object" ? options.cache : globalCache; + } + if (cacheObj) { + const cached = cacheObj.get(cacheKey); + if (typeof cached === "string") { + return cached; + } + if (cached instanceof Error) { + if (options?.try) { + return void 0; + } + throw cached; + } + } + if (absolutePath) { + try { + const stat = lstatSync(absolutePath); + if (stat.isSymbolicLink()) { + absolutePath = realpathSync(absolutePath); + url = pathToFileURL(absolutePath); + } + if (stat.isFile()) { + if (cacheObj) { + cacheObj.set(cacheKey, url.href); + } + return url.href; + } + } catch (error) { + if (error?.code !== "ENOENT") { + if (cacheObj) { + cacheObj.set(cacheKey, error); + } + throw error; + } + } + } + const conditionsSet = options?.conditions ? new Set(options.conditions) : DEFAULT_CONDITIONS_SET; + const bases = _normalizeBases(options?.from); + const suffixes = options?.suffixes || [""]; + const extensions = options?.extensions ? ["", ...options.extensions] : [""]; + let resolved; + for (const base of bases) { + for (const suffix of suffixes) { + for (const extension of extensions) { + resolved = _tryModuleResolve( + _join(specifier || url.href, suffix) + extension, + base, + conditionsSet + ); + if (resolved) { + break; + } + } + if (resolved) { + break; + } + } + if (resolved) { + break; + } + } + if (!resolved) { + const error = new Error( + `Cannot resolve module "${input}" (from: ${bases.map((u) => _fmtPath(u)).join(", ")})` + ); + error.code = "ERR_MODULE_NOT_FOUND"; + if (cacheObj) { + cacheObj.set(cacheKey, error); + } + if (options?.try) { + return void 0; + } + throw error; + } + if (cacheObj) { + cacheObj.set(cacheKey, resolved.href); + } + return resolved.href; +} +function resolveModulePath(id, options) { + const resolved = resolveModuleURL(id, options); + if (!resolved) { + return void 0; + } + if (!resolved.startsWith("file://") && options?.try) { + return void 0; + } + const absolutePath = fileURLToPath(resolved); + return isWindows ? _normalizeWinPath(absolutePath) : absolutePath; +} +function createResolver(defaults) { + if (defaults?.from) { + defaults = { + ...defaults, + from: _normalizeBases(defaults?.from) + }; + } + return { + resolveModuleURL: (id, opts) => resolveModuleURL(id, { ...defaults, ...opts }), + resolveModulePath: (id, opts) => resolveModulePath(id, { ...defaults, ...opts }), + clearResolveCache: () => { + if (defaults?.cache !== false) { + if (defaults?.cache && typeof defaults?.cache === "object") { + defaults.cache.clear(); + } else { + globalCache.clear(); + } + } + } + }; +} +function clearResolveCache() { + globalCache.clear(); +} +function _tryModuleResolve(specifier, base, conditions) { + try { + return moduleResolve(specifier, base, conditions); + } catch (error) { + if (!NOT_FOUND_ERRORS.has(error?.code)) { + throw error; + } + } +} +function _normalizeBases(inputs) { + const urls = (Array.isArray(inputs) ? inputs : [inputs]).flatMap( + (input) => _normalizeBase(input) + ); + if (urls.length === 0) { + return [pathToFileURL("./")]; + } + return urls; +} +function _normalizeBase(input) { + if (!input) { + return []; + } + if (input instanceof URL) { + return [input]; + } + if (typeof input !== "string") { + return []; + } + if (/^(?:node|data|http|https|file):/.test(input)) { + return new URL(input); + } + try { + if (input.endsWith("/") || statSync(input).isDirectory()) { + return pathToFileURL(input + "/"); + } + return pathToFileURL(input); + } catch { + return [pathToFileURL(input + "/"), pathToFileURL(input)]; + } +} +function _fmtPath(input) { + try { + return fileURLToPath(input); + } catch { + return input; + } +} +function _cacheKey(id, opts) { + return JSON.stringify([ + id, + (opts?.conditions || ["node", "import"]).sort(), + opts?.extensions, + opts?.from, + opts?.suffixes + ]); +} +function _join(a, b) { + if (!a || !b || b === "/") { + return a; + } + return (a.endsWith("/") ? a : a + "/") + (b.startsWith("/") ? b.slice(1) : b); +} +function _normalizeWinPath(path) { + return path.replace(/\\/g, "/").replace(/^[a-z]:\//, (r) => r.toUpperCase()); +} +function _parseInput(input) { + if (typeof input === "string") { + if (input.startsWith("file:")) { + const url = new URL(input); + return { url, absolutePath: fileURLToPath(url) }; + } + if (isAbsolute(input)) { + return { url: pathToFileURL(input), absolutePath: input }; + } + if (/^(?:node|data|http|https):/.test(input)) { + return { external: input }; + } + if (nodeBuiltins.includes(input) && !input.includes(":")) { + return { external: `node:${input}` }; + } + return { specifier: input }; + } + if (input instanceof URL) { + if (input.protocol === "file:") { + return { url: input, absolutePath: fileURLToPath(input) }; + } + return { external: input.href }; + } + throw new TypeError("id must be a `string` or `URL`"); +} + +export { clearResolveCache, createResolver, resolveModulePath, resolveModuleURL }; diff --git a/node_modules/exsolve/package.json b/node_modules/exsolve/package.json new file mode 100644 index 0000000..29ef541 --- /dev/null +++ b/node_modules/exsolve/package.json @@ -0,0 +1,42 @@ +{ + "name": "exsolve", + "version": "1.0.5", + "description": "Module resolution utilities based on Node.js upstream implementation.", + "repository": "unjs/exsolve", + "license": "MIT", + "sideEffects": false, + "type": "module", + "exports": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "types": "./dist/index.d.mts", + "files": [ + "dist" + ], + "scripts": { + "build": "unbuild", + "dev": "vitest dev", + "lint": "eslint . && prettier -c .", + "node-ts": "node --disable-warning=ExperimentalWarning --experimental-strip-types", + "lint:fix": "automd && eslint . --fix && prettier -w .", + "prepack": "pnpm build", + "release": "pnpm test && changelogen --release && npm publish && git push --follow-tags", + "test": "pnpm lint && pnpm test:types && vitest run --coverage", + "test:types": "tsc --noEmit --skipLibCheck" + }, + "devDependencies": { + "@types/node": "^22.14.1", + "@vitest/coverage-v8": "^3.1.1", + "automd": "^0.4.0", + "changelogen": "^0.6.1", + "eslint": "^9.24.0", + "eslint-config-unjs": "^0.4.2", + "jiti": "^2.4.2", + "prettier": "^3.5.3", + "typescript": "^5.8.3", + "unbuild": "^3.5.0", + "vitest": "^3.1.1" + }, + "packageManager": "pnpm@10.8.1" +} diff --git a/node_modules/fsevents/LICENSE b/node_modules/fsevents/LICENSE new file mode 100644 index 0000000..5d70441 --- /dev/null +++ b/node_modules/fsevents/LICENSE @@ -0,0 +1,22 @@ +MIT License +----------- + +Copyright (C) 2010-2020 by Philipp Dunkel, Ben Noordhuis, Elan Shankar, Paul Miller + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/fsevents/README.md b/node_modules/fsevents/README.md new file mode 100644 index 0000000..50373a0 --- /dev/null +++ b/node_modules/fsevents/README.md @@ -0,0 +1,89 @@ +# fsevents + +Native access to MacOS FSEvents in [Node.js](https://nodejs.org/) + +The FSEvents API in MacOS allows applications to register for notifications of +changes to a given directory tree. It is a very fast and lightweight alternative +to kqueue. + +This is a low-level library. For a cross-platform file watching module that +uses fsevents, check out [Chokidar](https://github.com/paulmillr/chokidar). + +## Usage + +```sh +npm install fsevents +``` + +Supports only **Node.js v8.16 and higher**. + +```js +const fsevents = require('fsevents'); + +// To start observation +const stop = fsevents.watch(__dirname, (path, flags, id) => { + const info = fsevents.getInfo(path, flags); +}); + +// To end observation +stop(); +``` + +> **Important note:** The API behaviour is slightly different from typical JS APIs. The `stop` function **must** be +> retrieved and stored somewhere, even if you don't plan to stop the watcher. If you forget it, the garbage collector +> will eventually kick in, the watcher will be unregistered, and your callbacks won't be called anymore. + +The callback passed as the second parameter to `.watch` get's called whenever the operating system detects a +a change in the file system. It takes three arguments: + +###### `fsevents.watch(dirname: string, (path: string, flags: number, id: string) => void): () => Promise` + + * `path: string` - the item in the filesystem that have been changed + * `flags: number` - a numeric value describing what the change was + * `id: string` - an unique-id identifying this specific event + + Returns closer callback which when called returns a Promise resolving when the watcher process has been shut down. + +###### `fsevents.getInfo(path: string, flags: number, id: string): FsEventInfo` + +The `getInfo` function takes the `path`, `flags` and `id` arguments and converts those parameters into a structure +that is easier to digest to determine what the change was. + +The `FsEventsInfo` has the following shape: + +```js +/** + * @typedef {'created'|'modified'|'deleted'|'moved'|'root-changed'|'cloned'|'unknown'} FsEventsEvent + * @typedef {'file'|'directory'|'symlink'} FsEventsType + */ +{ + "event": "created", // {FsEventsEvent} + "path": "file.txt", + "type": "file", // {FsEventsType} + "changes": { + "inode": true, // Had iNode Meta-Information changed + "finder": false, // Had Finder Meta-Data changed + "access": false, // Had access permissions changed + "xattrs": false // Had xAttributes changed + }, + "flags": 0x100000000 +} +``` + +## Changelog + +- v2.3 supports Apple Silicon ARM CPUs +- v2 supports node 8.16+ and reduces package size massively +- v1.2.8 supports node 6+ +- v1.2.7 supports node 4+ + +## Troubleshooting + +- I'm getting `EBADPLATFORM` `Unsupported platform for fsevents` error. +- It's fine, nothing is broken. fsevents is macos-only. Other platforms are skipped. If you want to hide this warning, report a bug to NPM bugtracker asking them to hide ebadplatform warnings by default. + +## License + +The MIT License Copyright (C) 2010-2020 by Philipp Dunkel, Ben Noordhuis, Elan Shankar, Paul Miller — see LICENSE file. + +Visit our [GitHub page](https://github.com/fsevents/fsevents) and [NPM Page](https://npmjs.org/package/fsevents) diff --git a/node_modules/fsevents/fsevents.d.ts b/node_modules/fsevents/fsevents.d.ts new file mode 100644 index 0000000..2723c04 --- /dev/null +++ b/node_modules/fsevents/fsevents.d.ts @@ -0,0 +1,46 @@ +declare type Event = "created" | "cloned" | "modified" | "deleted" | "moved" | "root-changed" | "unknown"; +declare type Type = "file" | "directory" | "symlink"; +declare type FileChanges = { + inode: boolean; + finder: boolean; + access: boolean; + xattrs: boolean; +}; +declare type Info = { + event: Event; + path: string; + type: Type; + changes: FileChanges; + flags: number; +}; +declare type WatchHandler = (path: string, flags: number, id: string) => void; +export declare function watch(path: string, handler: WatchHandler): () => Promise; +export declare function watch(path: string, since: number, handler: WatchHandler): () => Promise; +export declare function getInfo(path: string, flags: number): Info; +export declare const constants: { + None: 0x00000000; + MustScanSubDirs: 0x00000001; + UserDropped: 0x00000002; + KernelDropped: 0x00000004; + EventIdsWrapped: 0x00000008; + HistoryDone: 0x00000010; + RootChanged: 0x00000020; + Mount: 0x00000040; + Unmount: 0x00000080; + ItemCreated: 0x00000100; + ItemRemoved: 0x00000200; + ItemInodeMetaMod: 0x00000400; + ItemRenamed: 0x00000800; + ItemModified: 0x00001000; + ItemFinderInfoMod: 0x00002000; + ItemChangeOwner: 0x00004000; + ItemXattrMod: 0x00008000; + ItemIsFile: 0x00010000; + ItemIsDir: 0x00020000; + ItemIsSymlink: 0x00040000; + ItemIsHardlink: 0x00100000; + ItemIsLastHardlink: 0x00200000; + OwnEvent: 0x00080000; + ItemCloned: 0x00400000; +}; +export {}; diff --git a/node_modules/fsevents/fsevents.js b/node_modules/fsevents/fsevents.js new file mode 100644 index 0000000..198da98 --- /dev/null +++ b/node_modules/fsevents/fsevents.js @@ -0,0 +1,83 @@ +/* + ** © 2020 by Philipp Dunkel, Ben Noordhuis, Elan Shankar, Paul Miller + ** Licensed under MIT License. + */ + +/* jshint node:true */ +"use strict"; + +if (process.platform !== "darwin") { + throw new Error(`Module 'fsevents' is not compatible with platform '${process.platform}'`); +} + +const Native = require("./fsevents.node"); +const events = Native.constants; + +function watch(path, since, handler) { + if (typeof path !== "string") { + throw new TypeError(`fsevents argument 1 must be a string and not a ${typeof path}`); + } + if ("function" === typeof since && "undefined" === typeof handler) { + handler = since; + since = Native.flags.SinceNow; + } + if (typeof since !== "number") { + throw new TypeError(`fsevents argument 2 must be a number and not a ${typeof since}`); + } + if (typeof handler !== "function") { + throw new TypeError(`fsevents argument 3 must be a function and not a ${typeof handler}`); + } + + let instance = Native.start(Native.global, path, since, handler); + if (!instance) throw new Error(`could not watch: ${path}`); + return () => { + const result = instance ? Promise.resolve(instance).then(Native.stop) : Promise.resolve(undefined); + instance = undefined; + return result; + }; +} + +function getInfo(path, flags) { + return { + path, + flags, + event: getEventType(flags), + type: getFileType(flags), + changes: getFileChanges(flags), + }; +} + +function getFileType(flags) { + if (events.ItemIsFile & flags) return "file"; + if (events.ItemIsDir & flags) return "directory"; + if (events.MustScanSubDirs & flags) return "directory"; + if (events.ItemIsSymlink & flags) return "symlink"; +} +function anyIsTrue(obj) { + for (let key in obj) { + if (obj[key]) return true; + } + return false; +} +function getEventType(flags) { + if (events.ItemRemoved & flags) return "deleted"; + if (events.ItemRenamed & flags) return "moved"; + if (events.ItemCreated & flags) return "created"; + if (events.ItemModified & flags) return "modified"; + if (events.RootChanged & flags) return "root-changed"; + if (events.ItemCloned & flags) return "cloned"; + if (anyIsTrue(flags)) return "modified"; + return "unknown"; +} +function getFileChanges(flags) { + return { + inode: !!(events.ItemInodeMetaMod & flags), + finder: !!(events.ItemFinderInfoMod & flags), + access: !!(events.ItemChangeOwner & flags), + xattrs: !!(events.ItemXattrMod & flags), + }; +} + +exports.watch = watch; +exports.getInfo = getInfo; +exports.constants = events; diff --git a/node_modules/fsevents/fsevents.node b/node_modules/fsevents/fsevents.node new file mode 100755 index 0000000..1cc3345 Binary files /dev/null and b/node_modules/fsevents/fsevents.node differ diff --git a/node_modules/fsevents/package.json b/node_modules/fsevents/package.json new file mode 100644 index 0000000..5d0ee15 --- /dev/null +++ b/node_modules/fsevents/package.json @@ -0,0 +1,62 @@ +{ + "name": "fsevents", + "version": "2.3.3", + "description": "Native Access to MacOS FSEvents", + "main": "fsevents.js", + "types": "fsevents.d.ts", + "os": [ + "darwin" + ], + "files": [ + "fsevents.d.ts", + "fsevents.js", + "fsevents.node" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + }, + "scripts": { + "clean": "node-gyp clean && rm -f fsevents.node", + "build": "node-gyp clean && rm -f fsevents.node && node-gyp rebuild && node-gyp clean", + "test": "/bin/bash ./test.sh 2>/dev/null", + "prepublishOnly": "npm run build" + }, + "repository": { + "type": "git", + "url": "https://github.com/fsevents/fsevents.git" + }, + "keywords": [ + "fsevents", + "mac" + ], + "contributors": [ + { + "name": "Philipp Dunkel", + "email": "pip@pipobscure.com" + }, + { + "name": "Ben Noordhuis", + "email": "info@bnoordhuis.nl" + }, + { + "name": "Elan Shankar", + "email": "elan.shanker@gmail.com" + }, + { + "name": "Miroslav Bajtoš", + "email": "mbajtoss@gmail.com" + }, + { + "name": "Paul Miller", + "url": "https://paulmillr.com" + } + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/fsevents/fsevents/issues" + }, + "homepage": "https://github.com/fsevents/fsevents", + "devDependencies": { + "node-gyp": "^9.4.0" + } +} diff --git a/node_modules/get-source/.eslintrc b/node_modules/get-source/.eslintrc new file mode 100644 index 0000000..955b07d --- /dev/null +++ b/node_modules/get-source/.eslintrc @@ -0,0 +1,6 @@ +{ + "parserOptions": { + "ecmaVersion": 6, + "sourceType": "script" + } +} \ No newline at end of file diff --git a/node_modules/get-source/.travis.yml b/node_modules/get-source/.travis.yml new file mode 100644 index 0000000..551eaa9 --- /dev/null +++ b/node_modules/get-source/.travis.yml @@ -0,0 +1,24 @@ +language: node_js +node_js: +- '10' +script: +- set -e +- npm run test +- npm run coveralls +# after_success: +# - git config --global user.email "travis@travis-ci.org" +# - git config --global user.name "Travis CI" +# - npm config set git-tag-version=false +# - NPM_VERSION=$(npm version patch) +# - git commit -a -m "${NPM_VERSION:1}" -m "[ci skip]" +# - git remote remove origin +# - git remote add origin https://${GITHUB_TOKEN}@github.com/xpl/get-source.git +# - git push origin HEAD:master +# deploy: +# provider: npm +# email: rocket.mind@gmail.com +# api_key: +# secure: jEWoCdiL3qadEKV36Aw1On1JNNvzSKIaZELVp0NiQLoWwbnTXzkXJuabHGDUQFnD9VXjhqtduS0GMpaV//HOXalSR72s8+VnnLYxsVj+Aslh1kDEwXW3OsQ2O5PSZY5nmGVYuZVjwFeOa70+cvMd0nE1v9HNgJBhhzeKiewgzusGrGBaW3ovXz9Bf7ITsbkVO55SbW8CroKILrQiPBTSqEUqH0Vx+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Yt/HwPRAoGb9t/7KAOT6otKplIk8qy/tTzIc0fZm6mG8FmRQsisIrfWTiWh37jSZU9FGdNGkF/tjjZ/bmEPiJ56fWiXvzVv9CQAeF/0= diff --git a/node_modules/get-source/LICENSE b/node_modules/get-source/LICENSE new file mode 100644 index 0000000..49dbbe1 --- /dev/null +++ b/node_modules/get-source/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Vitaly Gordon (https://github.com/xpl) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/get-source/README.md b/node_modules/get-source/README.md new file mode 100644 index 0000000..c0cd7fb --- /dev/null +++ b/node_modules/get-source/README.md @@ -0,0 +1,112 @@ +# get-source + +[![Build Status](https://travis-ci.org/xpl/get-source.svg?branch=master)](https://travis-ci.org/xpl/get-source) [![Coverage Status](https://coveralls.io/repos/github/xpl/get-source/badge.svg)](https://coveralls.io/github/xpl/get-source) [![npm](https://img.shields.io/npm/v/get-source.svg)](https://npmjs.com/package/get-source) + +Fetch source-mapped sources. Peek by file, line, column. Node & browsers. Sync & async. + +```bash +npm install get-source +``` + +## Features + +- [x] Allows to read source code files in Node and browsers +- [x] Full sourcemap support (path resolving, external/embedded/inline linking, and long chains) +- [x] **Synchronous** API — good for CLI tools (e.g. [logging](https://github.com/xpl/ololog)). Works in browsers! +- [x] **Asynchronous** API — good for everything web! +- [x] Built-in cache + +## What for + +- [x] Call stacks enhanced with source code information (see the [StackTracey](https://github.com/xpl/stacktracey) library) +- [x] [Advanced logging](https://github.com/xpl/ololog) / assertion printing +- [x] [Error displaying components](https://github.com/xpl/panic-overlay) for front-end web development + +## Usage (Synchronous) + +```javascript +import getSource from 'get-source' +``` +```javascript +file = getSource ('./scripts/index.min.js') +``` + +Will read the file synchronously (either via XHR or by filesystem API, depending on the environment) and return it's cached representation. Result will contain the following fields: + +```javascript +file.path // normalized file path +file.text // text contents +file.lines // array of lines +``` + +And the `resolve` method: + +```javascript +file.resolve ({ line: 1, column: 8 }) // indexes here start from 1 (by widely accepted convention). Zero indexes are invalid. +``` + +It will look through the sourcemap chain, returning following: + +```javascript +{ + line: , + column: , + sourceFile: , + sourceLine: +} +``` + +In that returned object, `sourceFile` is the same kind of object that `getSource` returns. So you can access its `text`, `lines` and `path` fields to obtain the full information. And the `sourceLine` is returned just for the convenience, as a shortcut. + +## Usage (Asynchronous) + +Pretty much the same as synchronous, except it's `getSource.async`. It returns awaitable promises: + +```javascript +file = await getSource.async ('./scripts/index.min.js') +location = await file.resolve ({ line: 1, column: 8 }) +``` + +## Error handling + +In synchronous mode, it never throws (due to backward compatibility reasons with existing code): + +```javascript +nonsense = getSource ('/some/nonexistent/file') + +nonsense.text // should be '' (so it's safe to access without checking) +nonsense.error // should be an Error object, representing an actual error thrown during reading/parsing +``` +```javascript +resolved = nonsense.resolve ({ line: 5, column: 0 }) + +resolved.sourceLine // empty string (so it's safe to access without checking) +resolved.error // should be an Error object, representing an actual error thrown during reading/parsing +``` + +In asychronous mode, it throws an error: + +```javascript +try { + file = await getSource.async ('/some/file') + location = await file.resolve ({ line: 5, column: 0 }) +} catch (e) { + ... +} +``` + +## Resetting Cache + +E.g. when you need to force-reload files: + +```javascript +getSource.resetCache () // sync cache +getSource.async.resetCache () // async cache +``` + +Also, viewing cached files: + +```javascript +getSource.getCache () // sync cache +getSource.async.getCache () // async cache +``` diff --git a/node_modules/get-source/get-source.d.ts b/node_modules/get-source/get-source.d.ts new file mode 100644 index 0000000..fb9b81f --- /dev/null +++ b/node_modules/get-source/get-source.d.ts @@ -0,0 +1,48 @@ + +declare interface Location { + + line: number; + column: number; +} + +declare interface ResolvedLocation extends Location { + + sourceFile: FileType; + sourceLine: string; + error?: Error; +} + +declare interface File { + + path: string; + text: string; + lines: string[]; + error?: Error; +} + +declare interface FileAsync extends File { + resolve (location: Location): Promise> +} + +declare interface FileSync extends File { + resolve (location: Location): ResolvedLocation +} + +declare interface FileCache { + + resetCache (): void; + getCache (): { [key: string]: T }; +} + +declare interface getSourceAsync extends FileCache { + (path: string): Promise; +} + +declare interface getSourceSync extends FileCache { + (path: string): FileSync; + async: getSourceAsync; +} + +declare const getSource: getSourceSync; + +export = getSource; diff --git a/node_modules/get-source/get-source.js b/node_modules/get-source/get-source.js new file mode 100644 index 0000000..5f2d2d7 --- /dev/null +++ b/node_modules/get-source/get-source.js @@ -0,0 +1,176 @@ +"use strict"; + +/* ------------------------------------------------------------------------ */ + +const { assign } = Object, + isBrowser = (typeof window !== 'undefined') && (window.window === window) && window.navigator, + SourceMapConsumer = require ('source-map').SourceMapConsumer, + SyncPromise = require ('./impl/SyncPromise'), + path = require ('./impl/path'), + dataURIToBuffer = require ('data-uri-to-buffer'), + nodeRequire = isBrowser ? null : module.require + +/* ------------------------------------------------------------------------ */ + +const memoize = f => { + + const m = x => (x in m.cache) ? m.cache[x] : (m.cache[x] = f(x)) + m.forgetEverything = () => { m.cache = Object.create (null) } + m.cache = Object.create (null) + + return m +} + +function impl (fetchFile, sync) { + + const PromiseImpl = sync ? SyncPromise : Promise + const SourceFileMemoized = memoize (path => SourceFile (path, fetchFile (path))) + + function SourceFile (srcPath, text) { + if (text === undefined) return SourceFileMemoized (path.resolve (srcPath)) + + return PromiseImpl.resolve (text).then (text => { + + let file + let lines + let resolver + let _resolve = loc => (resolver = resolver || SourceMapResolverFromFetchedFile (file)) (loc) + + return (file = { + path: srcPath, + text, + get lines () { return lines = (lines || text.split ('\n')) }, + resolve (loc) { + const result = _resolve (loc) + if (sync) { + try { return SyncPromise.valueFrom (result) } + catch (e) { return assign ({}, loc, { error: e }) } + } else { + return Promise.resolve (result) + } + }, + _resolve, + }) + }) + } + + function SourceMapResolverFromFetchedFile (file) { + + /* Extract the last sourceMap occurence (TODO: support multiple sourcemaps) */ + + const re = /\u0023 sourceMappingURL=(.+)\n?/g + let lastMatch = undefined + + while (true) { + const match = re.exec (file.text) + if (match) lastMatch = match + else break + } + + const url = lastMatch && lastMatch[1] + + const defaultResolver = loc => assign ({}, loc, { + sourceFile: file, + sourceLine: (file.lines[loc.line - 1] || '') + }) + + return url ? SourceMapResolver (file.path, url, defaultResolver) + : defaultResolver + } + + function SourceMapResolver (originalFilePath, sourceMapPath, fallbackResolve) { + + const srcFile = sourceMapPath.startsWith ('data:') + ? SourceFile (originalFilePath, dataURIToBuffer (sourceMapPath).toString ()) + : SourceFile (path.relativeToFile (originalFilePath, sourceMapPath)) + + const parsedMap = srcFile.then (f => SourceMapConsumer (JSON.parse (f.text))) + + const sourceFor = memoize (function sourceFor (filePath) { + return srcFile.then (f => { + const fullPath = path.relativeToFile (f.path, filePath) + return parsedMap.then (x => SourceFile ( + fullPath, + x.sourceContentFor (filePath, true /* return null on missing */) || undefined)) + }) + }) + + return loc => parsedMap.then (x => { + const originalLoc = x.originalPositionFor (loc) + return originalLoc.source ? sourceFor (originalLoc.source).then (x => + x._resolve (assign ({}, loc, { + line: originalLoc.line, + column: originalLoc.column + 1, + name: originalLoc.name + })) + ) + : fallbackResolve (loc) + }).catch (e => + assign (fallbackResolve (loc), { sourceMapError: e })) + } + + return assign (function getSource (path) { + const file = SourceFile (path) + if (sync) { + try { return SyncPromise.valueFrom (file) } + catch (e) { + const noFile = { + path, + text: '', + lines: [], + error: e, + resolve (loc) { + return assign ({}, loc, { error: e, sourceLine: '', sourceFile: noFile }) + } + } + return noFile + } + } + return file + }, { + resetCache: () => SourceFileMemoized.forgetEverything (), + getCache: () => SourceFileMemoized.cache + }) +} + +/* ------------------------------------------------------------------------ */ + +module.exports = impl (function fetchFileSync (path) { + return new SyncPromise (resolve => { + if (isBrowser) { + let xhr = new XMLHttpRequest () + xhr.open ('GET', path, false /* SYNCHRONOUS XHR FTW :) */) + xhr.send (null) + resolve (xhr.responseText) + } else { + resolve (nodeRequire ('fs').readFileSync (path, { encoding: 'utf8' })) + } + }) + }, true) + +/* ------------------------------------------------------------------------ */ + +module.exports.async = impl (function fetchFileAsync (path) { + return new Promise ((resolve, reject) => { + if (isBrowser) { + let xhr = new XMLHttpRequest () + xhr.open ('GET', path) + xhr.onreadystatechange = event => { + if (xhr.readyState === 4) { + if (xhr.status === 200) { + resolve (xhr.responseText) + } else { + reject (new Error (xhr.statusText)) + } + } + } + xhr.send (null) + } else { + nodeRequire ('fs').readFile (path, { encoding: 'utf8' }, (e, x) => { + e ? reject (e) : resolve (x) + }) + } + }) + }) + +/* ------------------------------------------------------------------------ */ diff --git a/node_modules/get-source/impl/SyncPromise.js b/node_modules/get-source/impl/SyncPromise.js new file mode 100644 index 0000000..1412532 --- /dev/null +++ b/node_modules/get-source/impl/SyncPromise.js @@ -0,0 +1,51 @@ +"use strict"; + +/* ------------------------------------------------------------------------ */ + +module.exports = class SyncPromise { + + constructor (fn) { + try { + fn ( + x => { this.setValue (x, false) }, // resolve + x => { this.setValue (x, true) } // reject + ) + } catch (e) { + this.setValue (e, true) + } + } + + setValue (x, rejected) { + this.val = (x instanceof SyncPromise) ? x.val : x + this.rejected = rejected || ((x instanceof SyncPromise) ? x.rejected : false) + } + + static valueFrom (x) { + if (x instanceof SyncPromise) { + if (x.rejected) throw x.val + else return x.val + } else { + return x + } + } + + then (fn) { + try { if (!this.rejected) return SyncPromise.resolve (fn (this.val)) } + catch (e) { return SyncPromise.reject (e) } + return this + } + + catch (fn) { + try { if (this.rejected) return SyncPromise.resolve (fn (this.val)) } + catch (e) { return SyncPromise.reject (e) } + return this + } + + static resolve (x) { + return new SyncPromise (resolve => { resolve (x) }) + } + + static reject (x) { + return new SyncPromise ((_, reject) => { reject (x) }) + } +} \ No newline at end of file diff --git a/node_modules/get-source/impl/path.js b/node_modules/get-source/impl/path.js new file mode 100644 index 0000000..4a0eb3d --- /dev/null +++ b/node_modules/get-source/impl/path.js @@ -0,0 +1,62 @@ +"use strict"; + +/* ------------------------------------------------------------------------ */ + +const isBrowser = (typeof window !== 'undefined') && (window.window === window) && window.navigator +const cwd = isBrowser ? window.location.href : process.cwd () + +const urlRegexp = new RegExp ("^((https|http)://)?[a-z0-9A-Z]{3}\.[a-z0-9A-Z][a-z0-9A-Z]{0,61}?[a-z0-9A-Z]\.com|net|cn|cc (:s[0-9]{1-4})?/$") + +/* ------------------------------------------------------------------------ */ + +const path = module.exports = { + + concat (a, b) { + + const a_endsWithSlash = (a[a.length - 1] === '/'), + b_startsWithSlash = (b[0] === '/') + + return a + ((a_endsWithSlash || b_startsWithSlash) ? '' : '/') + + ((a_endsWithSlash && b_startsWithSlash) ? b.substring (1) : b) + }, + + resolve (x) { + + if (path.isAbsolute (x)) { + return path.normalize (x) } + + return path.normalize (path.concat (cwd, x)) + }, + + normalize (x) { + + let output = [], + skip = 0 + + x.split ('/').reverse ().filter (x => x !== '.').forEach (x => { + + if (x === '..') { skip++ } + else if (skip === 0) { output.push (x) } + else { skip-- } + }) + + const result = output.reverse ().join ('/') + + return ((isBrowser && (result[0] === '/')) ? result[1] === '/' ? window.location.protocol : window.location.origin : '') + result + }, + + isData: x => x.indexOf ('data:') === 0, + + isURL: x => urlRegexp.test (x), + + isAbsolute: x => (x[0] === '/') || /^[^\/]*:/.test (x), + + relativeToFile (a, b) { + + return (path.isData (a) || path.isAbsolute (b)) ? + path.normalize (b) : + path.normalize (path.concat (a.split ('/').slice (0, -1).join ('/'), b)) + } +} + +/* ------------------------------------------------------------------------ */ diff --git a/node_modules/get-source/package.json b/node_modules/get-source/package.json new file mode 100644 index 0000000..1040982 --- /dev/null +++ b/node_modules/get-source/package.json @@ -0,0 +1,43 @@ +{ + "name": "get-source", + "version": "2.0.12", + "description": "Fetch source-mapped sources. Peek by file, line, column. Node & browsers. Sync & async.", + "main": "get-source", + "types": "./get-source.d.ts", + "scripts": { + "test-browser": "mocha test/test.browser --reporter spec", + "test-node": "mocha test/test.node --reporter spec", + "test-path": "mocha test/test.path --reporter spec", + "test": "nyc --reporter=html --reporter=text mocha test/test.path test/test.node --reporter spec", + "coveralls": "nyc report --reporter=text-lcov | coveralls" + }, + "repository": { + "type": "git", + "url": "https://github.com/xpl/get-source.git" + }, + "keywords": [ + "sources", + "sourcemap", + "read source", + "cached sources" + ], + "author": "Vitaly Gordon ", + "license": "Unlicense", + "bugs": { + "url": "https://github.com/xpl/get-source/issues" + }, + "homepage": "https://github.com/xpl/get-source", + "devDependencies": { + "chai": "^3.5.0", + "coveralls": "^3.0.3", + "istanbul": "^0.4.5", + "memory-fs": "^0.3.0", + "mocha": "^8.0.1", + "nyc": "^15.1.0", + "webpack": "^4.43.0" + }, + "dependencies": { + "data-uri-to-buffer": "^2.0.0", + "source-map": "^0.6.1" + } +} diff --git a/node_modules/get-source/test/files/get-source.webpack.entry.js b/node_modules/get-source/test/files/get-source.webpack.entry.js new file mode 100644 index 0000000..aa676cd --- /dev/null +++ b/node_modules/get-source/test/files/get-source.webpack.entry.js @@ -0,0 +1,3 @@ +require ('chai').should () +window.path = require ('../../impl/path') +window.getSource = require ('../../get-source') \ No newline at end of file diff --git a/node_modules/get-source/test/files/original.babeled.with.inline.sourcemap.js b/node_modules/get-source/test/files/original.babeled.with.inline.sourcemap.js new file mode 100644 index 0000000..8ed6136 --- /dev/null +++ b/node_modules/get-source/test/files/original.babeled.with.inline.sourcemap.js @@ -0,0 +1,9 @@ +'use strict'; + +/* Dummy javascript file */ + +function hello() { + return 'hello world'; +} + +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm9yaWdpbmFsLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUE7O0FBRUEsU0FBUyxLQUFULEdBQWtCO0FBQ2pCLFFBQU8sYUFBUDtBQUFzQiIsImZpbGUiOiJvcmlnaW5hbC5iYWJlbGVkLndpdGguaW5saW5lLnNvdXJjZW1hcC5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8qXHREdW1teSBqYXZhc2NyaXB0IGZpbGVcdCovXG5cbmZ1bmN0aW9uIGhlbGxvICgpIHtcblx0cmV0dXJuICdoZWxsbyB3b3JsZCcgfSJdfQ== \ No newline at end of file diff --git a/node_modules/get-source/test/files/original.js b/node_modules/get-source/test/files/original.js new file mode 100644 index 0000000..f91aae4 --- /dev/null +++ b/node_modules/get-source/test/files/original.js @@ -0,0 +1,4 @@ +/* Dummy javascript file */ + +function hello () { + return 'hello world' } \ No newline at end of file diff --git a/node_modules/get-source/test/files/original.uglified.beautified.js b/node_modules/get-source/test/files/original.uglified.beautified.js new file mode 100644 index 0000000..b92406c --- /dev/null +++ b/node_modules/get-source/test/files/original.uglified.beautified.js @@ -0,0 +1,4 @@ +function hello() { + return "hello world"; +} +//# sourceMappingURL=original.uglified.beautified.js.map diff --git a/node_modules/get-source/test/files/original.uglified.beautified.js.map b/node_modules/get-source/test/files/original.uglified.beautified.js.map new file mode 100644 index 0000000..8750ef6 --- /dev/null +++ b/node_modules/get-source/test/files/original.uglified.beautified.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["original.uglified.js"],"names":["hello"],"mappings":"AAAA,SAASA;IAAQ,OAAM"} \ No newline at end of file diff --git a/node_modules/get-source/test/files/original.uglified.js b/node_modules/get-source/test/files/original.uglified.js new file mode 100644 index 0000000..14b93ce --- /dev/null +++ b/node_modules/get-source/test/files/original.uglified.js @@ -0,0 +1,2 @@ +function hello(){return"hello world"} +//# sourceMappingURL=original.uglified.js.map diff --git a/node_modules/get-source/test/files/original.uglified.js.map b/node_modules/get-source/test/files/original.uglified.js.map new file mode 100644 index 0000000..1018216 --- /dev/null +++ b/node_modules/get-source/test/files/original.uglified.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["original.js"],"names":["hello"],"mappings":"AAEA,QAASA,SACR,MAAO"} \ No newline at end of file diff --git a/node_modules/get-source/test/files/original.uglified.with.sources.js b/node_modules/get-source/test/files/original.uglified.with.sources.js new file mode 100644 index 0000000..1b9f726 --- /dev/null +++ b/node_modules/get-source/test/files/original.uglified.with.sources.js @@ -0,0 +1,2 @@ +function hello(){return"hello world"} +//# sourceMappingURL=original.uglified.with.sources.js.map diff --git a/node_modules/get-source/test/files/original.uglified.with.sources.js.map b/node_modules/get-source/test/files/original.uglified.with.sources.js.map new file mode 100644 index 0000000..77923be --- /dev/null +++ b/node_modules/get-source/test/files/original.uglified.with.sources.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["## embedded ##"],"names":["hello"],"mappings":"AAEA,QAASA,SACR,MAAO","sourcesContent":["/*\tDummy javascript file\t*/\n\nfunction hello () {\n\treturn 'hello world' }"]} \ No newline at end of file diff --git a/node_modules/get-source/test/files/test.html b/node_modules/get-source/test/files/test.html new file mode 100644 index 0000000..6c70bcf --- /dev/null +++ b/node_modules/get-source/test/files/test.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/node_modules/get-source/test/test.browser.js b/node_modules/get-source/test/test.browser.js new file mode 100644 index 0000000..ed7b523 --- /dev/null +++ b/node_modules/get-source/test/test.browser.js @@ -0,0 +1,98 @@ + +/* TODO: make it work in Travis CI + ------------------------------------------------------------------------ */ + +const selenium = require ('selenium-webdriver/testing') + +/* ------------------------------------------------------------------------ */ + +selenium.describe ('Chrome test', (done) => { + + const webdriver = require ('selenium-webdriver') + , path = require ('path') + , fs = require ('fs') + , memFS = new (require ('memory-fs')) () + , it = selenium.it + , webpack = require ('webpack') + , logging = require ('selenium-webdriver/lib/logging') + + let driver + +/* Prepare ChromeDriver (with CORS disabled and log interception enabled) */ + + selenium.before (() => driver = + new webdriver + .Builder () + .withCapabilities ( + webdriver.Capabilities + .chrome () + .setLoggingPrefs (new logging.Preferences ().setLevel (logging.Type.BROWSER, logging.Level.ALL)) + .set ('chromeOptions', { + 'args': ['--disable-web-security'] })) + .build ()) + + selenium.after (() => driver.quit ()) + + it ('works', async () => { + + /* Compile get-source */ + + const compiledScript = await (new Promise (resolve => { Object.assign (webpack ({ + + entry: './test/files/get-source.webpack.entry.js', + output: { path: '/', filename: 'get-source.webpack.compiled.js' }, + plugins: [ new webpack.IgnorePlugin(/^fs$/) ] + + }), { outputFileSystem: memFS }).run ((err, stats) => { + + if (err) throw err + + resolve (memFS.readFileSync ('/get-source.webpack.compiled.js').toString ('utf-8')) + }) + })) + + /* Inject it into Chrome */ + + driver.get ('file://' + path.resolve ('./test/files/test.html')) + driver.executeScript (compiledScript) + + /* Execute test */ + + const exec = fn => driver.executeScript (`(${fn.toString ()})()`) + + try { + + await exec (function () { + + path.relativeToFile ('http://foo.com/scripts/bar.js', '../bar.js.map') + .should.equal ('http://foo.com/bar.js.map') + + path.relativeToFile ('http://foo.com/scripts/bar.js', 'http://bar.js.map') + .should.equal ('http://bar.js.map') + + path.relativeToFile ('http://foo.com/scripts/bar.js', '/bar.js.map') + .should.equal ('file:///bar.js.map') + + path.relativeToFile ('http://foo.com/scripts/bar.js', '//bar.com/bar.js.map') + .should.equal ('http://bar.com/bar.js.map') + + var loc = getSource ('../original.uglified.beautified.js').resolve ({ line: 2, column: 4 }) + + loc.line.should.equal (4) + loc.column.should.equal (2) + loc.sourceFile.path.should.contain ('test/files/original.js') + loc.sourceLine.should.equal ('\treturn \'hello world\' }') + }) + + } catch (e) { throw e } finally { + + driver.manage ().logs ().get (logging.Type.BROWSER).then (entries => { + entries.forEach (entry => { + console.log('[BROWSER] [%s] %s', entry.level.name, entry.message); + }) + }) + } + }) +}) + +/* ------------------------------------------------------------------------ */ diff --git a/node_modules/get-source/test/test.node.js b/node_modules/get-source/test/test.node.js new file mode 100644 index 0000000..d546ff6 --- /dev/null +++ b/node_modules/get-source/test/test.node.js @@ -0,0 +1,222 @@ +"use strict"; + +/* NOTE: I've used supervisor to auto-restart mocha, because mocha --watch + didn't work for selenium tests (not reloading them)... + ------------------------------------------------------------------ */ + +require ('chai').should () + +/* ------------------------------------------------------------------------ */ + +describe ('get-source', () => { + + const getSource = require ('../get-source'), + fs = require ('fs'), + path = require ('path') + + it ('cache sanity check', () => { + + getSource ('./get-source.js').should.equal (getSource ('./get-source.js')) + getSource ('./get-source.js').should.not.equal (getSource ('./package.json')) + }) + + it ('reads sources (not sourcemapped)', () => { + + const original = getSource ('./test/files/original.js') + + original.path.should.equal (path.resolve ('./test/files/original.js')) // resolves input paths + original.text.should.equal (fs.readFileSync ('./test/files/original.js', { encoding: 'utf-8' })) + original.lines.should.deep.equal ([ + '/*\tDummy javascript file\t*/', + '', + 'function hello () {', + '\treturn \'hello world\' }' + ]) + + const resolved = original.resolve ({ line: 4, column: 1 }) + + resolved.line.should.equal (4) + resolved.column.should.equal (1) + resolved.sourceFile.should.equal (original) + resolved.sourceLine.should.equal ('\treturn \'hello world\' }') + }) + + it ('reads sources (sourcemapped, with external links)', () => { + + const uglified = getSource ('./test/files/original.uglified.js') + + uglified.path.should.equal (path.resolve ('./test/files/original.uglified.js')) + uglified.lines.should.deep.equal ([ + 'function hello(){return"hello world"}', + '//# sourceMappingURL=original.uglified.js.map', + '' + ]) + + // uglified.sourceMap.should.not.equal (undefined) + // uglified.sourceMap.should.equal (uglified.sourceMap) // memoization should work + + const resolved = uglified.resolve ({ line: 1, column: 18 }) // should be tolerant to column omission + + resolved.line.should.equal (4) + resolved.column.should.equal (2) + resolved.sourceFile.should.equal (getSource ('./test/files/original.js')) + resolved.sourceLine.should.equal ('\treturn \'hello world\' }') + }) + + it ('reads sources (sourcemapped, with external links) — ASYNC', () => { + + const uglified = getSource.async ('./test/files/original.uglified.js') + + return uglified.then (uglified => { + + uglified.path.should.equal (path.resolve ('./test/files/original.uglified.js')) + uglified.lines.should.deep.equal ([ + 'function hello(){return"hello world"}', + '//# sourceMappingURL=original.uglified.js.map', + '' + ]) + + // uglified.sourceMap.should.not.equal (undefined) + // uglified.sourceMap.should.equal (uglified.sourceMap) // memoization should work + + return uglified.resolve ({ line: 1, column: 18 }).then (resolved => { + + return getSource.async ('./test/files/original.js').then (originalFile => { + resolved.line.should.equal (4) + resolved.column.should.equal (2) + resolved.sourceFile.should.equal (originalFile) + resolved.sourceLine.should.equal ('\treturn \'hello world\' }') + }) + }) + }) + }) + + it ('reads sources (sourcemapped, with embedded sources)', () => { + + const uglified = getSource ('./test/files/original.uglified.with.sources.js') + + uglified.path.should.equal (path.resolve ('./test/files/original.uglified.with.sources.js')) + uglified.lines.should.deep.equal ([ + 'function hello(){return"hello world"}', + '//# sourceMappingURL=original.uglified.with.sources.js.map', + '' + ]) + + // uglified.sourceMap.should.not.equal (undefined) + + const resolved = uglified.resolve ({ line: 1, column: 18 }) + + resolved.line.should.equal (4) + resolved.column.should.equal (2) + resolved.sourceFile.path.should.equal (path.resolve ('./test/files') + '/## embedded ##') // I've changed the filename manually, by editing .map file + resolved.sourceLine.should.equal ('\treturn \'hello world\' }') + }) + + it ('reads sources (sourcemapped, with inline base64 sourcemaps)', () => { + + const babeled = getSource ('./test/files/original.babeled.with.inline.sourcemap.js') + + // babeled.sourceMap.should.not.equal (undefined) + // babeled.sourceMap.file.path.should.equal (babeled.path) + + const resolved = babeled.resolve ({ line: 6, column: 1 }) + + resolved.line.should.equal (4) + resolved.column.should.equal (2) + resolved.sourceLine.should.equal ('\treturn \'hello world\' }') + }) + + it ('supports even CHAINED sourcemaps!', () => { + + /* original.js → original.uglified.js → original.uglified.beautified.js */ + + const beautified = getSource ('./test/files/original.uglified.beautified.js') + + beautified.path.should.equal (path.resolve ('./test/files/original.uglified.beautified.js')) + beautified.text.should.equal (fs.readFileSync ('./test/files/original.uglified.beautified.js', { encoding: 'utf-8' })) + + // beautified.sourceMap.should.not.equal (undefined) + + const resolved = beautified.resolve ({ line: 2, column: 4 }) + + resolved.line.should.equal (4) + resolved.column.should.equal (2) + resolved.sourceFile.path.should.equal (path.resolve ('./test/files/original.js')) + resolved.sourceLine.should.equal ('\treturn \'hello world\' }') + }) + + it ('adheres to async interface', () => { + + return getSource.async ('./get-source.js').then (result => { + + ;(result.resolve ({ line: 1, column: 0 }) instanceof Promise).should.equal (true) + }) + }) + + it ('supports even CHAINED sourcemaps! — ASYNC', () => { + + /* original.js → original.uglified.js → original.uglified.beautified.js */ + + return getSource.async ('./test/files/original.uglified.beautified.js').then (beautified => { + + beautified.text.should.equal (fs.readFileSync ('./test/files/original.uglified.beautified.js', { encoding: 'utf-8' })) + beautified.path.should.equal (path.resolve ('./test/files/original.uglified.beautified.js')) + + return beautified.resolve ({ line: 2, column: 4 }).then (resolved => { + + resolved.line.should.equal (4) + resolved.column.should.equal (2) + resolved.sourceFile.path.should.equal (path.resolve ('./test/files/original.js')) + resolved.sourceLine.should.equal ('\treturn \'hello world\' }') + }) + }) + }) + + it ('does some error handling', () => { + + const nonsense = getSource ('abyrvalg') + + nonsense.text.should.equal ('') + nonsense.error.should.be.an.instanceof (Error) + + const resolved = nonsense.resolve ({ line: 5, column: 0 }) + + resolved.error.should.equal (nonsense.error) + resolved.sourceLine.should.equal ('') + resolved.sourceFile.path.should.equal ('abyrvalg') + }) + + it ('does some error handling - ASYNC', () => { + + return getSource.async ('abyrvalg').then (x => { console.log (x) }).catch (error => { + error.should.be.an.instanceof (Error) + }) + }) + + it ('allows absolute paths', () => { + + getSource (require ('path').resolve ('./get-source.js')).should.equal (getSource ('./get-source.js')) + }) + + it ('caching works', () => { + + const files = + [ './get-source.js', + './package.json', + './test/files/original.js', + './test/files/original.uglified.js', + './test/files/original.uglified.js.map', + './test/files/original.uglified.with.sources.js', + './test/files/original.uglified.with.sources.js.map', + './test/files/original.babeled.with.inline.sourcemap.js', + './test/files/original.uglified.beautified.js', + './test/files/original.uglified.beautified.js.map', + './abyrvalg' ] + + Object.keys (getSource.getCache ()).should.deep.equal (files.map (x => path.resolve (x))) + + getSource.resetCache () + + Object.keys (getSource.getCache ()).length.should.equal (0) + }) +}) \ No newline at end of file diff --git a/node_modules/get-source/test/test.path.js b/node_modules/get-source/test/test.path.js new file mode 100644 index 0000000..610ac2f --- /dev/null +++ b/node_modules/get-source/test/test.path.js @@ -0,0 +1,56 @@ +"use strict"; + +/* ------------------------------------------------------------------------ */ + +require ('chai').should () + +/* ------------------------------------------------------------------------ */ + +describe ('path', () => { + + const path = require ('../impl/path') + + it ('resolves', () => { + + path.resolve ('./foo/bar/../qux').should.equal (process.cwd () + '/foo/qux') + }) + + it ('normalizes', () => { + + path.normalize ('./foo/./bar/.././.././qux.map./').should.equal ('qux.map./') + + path.normalize ('/a/b').should.equal ('/a/b') + path.normalize ('http://foo/bar').should.equal ('http://foo/bar') + }) + + it ('computes relative location', () => { + + path.relativeToFile ('/foo/bar.js', './qux.map') + .should.equal ('/foo/qux.map') + + path.relativeToFile ('/foo/bar/baz.js', './../.././qux.map') + .should.equal ('/qux.map') + + path.relativeToFile ('/foo/bar', 'webpack:something') + .should.equal ('webpack:something') + + path.relativeToFile ('/foo/bar', 'web/pack:something') + .should.equal ('/foo/web/pack:something') + }) + + it ('works with data URIs', () => { + + path.relativeToFile ('/foo/bar.js', 'data:application/json;charset=utf-8;base64,eyJ2ZXJza==') + .should.equal ( 'data:application/json;charset=utf-8;base64,eyJ2ZXJza==') + + path.relativeToFile ('data:application/json;charset=utf-8;base64,eyJ2ZXJza==', 'foo.js') + .should.equal ( 'foo.js') + }) + + it ('implements isURL', () => { + + path.isURL ('foo.js').should.equal (false) + path.isURL ('/foo/bar.js').should.equal (false) + path.isURL ('https://google.com').should.equal (true) + }) +}) \ No newline at end of file diff --git a/node_modules/glob-to-regexp/.travis.yml b/node_modules/glob-to-regexp/.travis.yml new file mode 100644 index 0000000..ddc9c4f --- /dev/null +++ b/node_modules/glob-to-regexp/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.8 + - "0.10" \ No newline at end of file diff --git a/node_modules/glob-to-regexp/README.md b/node_modules/glob-to-regexp/README.md new file mode 100644 index 0000000..afb4114 --- /dev/null +++ b/node_modules/glob-to-regexp/README.md @@ -0,0 +1,75 @@ +# Glob To Regular Expression + +[![Build Status](https://travis-ci.org/fitzgen/glob-to-regexp.png?branch=master)](https://travis-ci.org/fitzgen/glob-to-regexp) + +Turn a \*-wildcard style glob (`"*.min.js"`) into a regular expression +(`/^.*\.min\.js$/`)! + +To match bash-like globs, eg. `?` for any single-character match, `[a-z]` for +character ranges, and `{*.html, *.js}` for multiple alternatives, call with +`{ extended: true }`. + +To obey [globstars `**`](https://github.com/isaacs/node-glob#glob-primer) rules set option `{globstar: true}`. +NOTE: This changes the behavior of `*` when `globstar` is `true` as shown below: +When `{globstar: true}`: `/foo/**` will match any string that starts with `/foo/` +like `/foo/index.htm`, `/foo/bar/baz.txt`, etc. Also, `/foo/**/*.txt` will match +any string that starts with `/foo/` and ends with `.txt` like `/foo/bar.txt`, +`/foo/bar/baz.txt`, etc. +Whereas `/foo/*` (single `*`, not a globstar) will match strings that start with +`/foo/` like `/foo/index.htm`, `/foo/baz.txt` but will not match strings that +contain a `/` to the right like `/foo/bar/baz.txt`, `/foo/bar/baz/qux.dat`, etc. + +Set flags on the resulting `RegExp` object by adding the `flags` property to the option object, eg `{ flags: "i" }` for ignoring case. + +## Install + + npm install glob-to-regexp + +## Usage +```js +var globToRegExp = require('glob-to-regexp'); +var re = globToRegExp("p*uck"); +re.test("pot luck"); // true +re.test("pluck"); // true +re.test("puck"); // true + +re = globToRegExp("*.min.js"); +re.test("http://example.com/jquery.min.js"); // true +re.test("http://example.com/jquery.min.js.map"); // false + +re = globToRegExp("*/www/*.js"); +re.test("http://example.com/www/app.js"); // true +re.test("http://example.com/www/lib/factory-proxy-model-observer.js"); // true + +// Extended globs +re = globToRegExp("*/www/{*.js,*.html}", { extended: true }); +re.test("http://example.com/www/app.js"); // true +re.test("http://example.com/www/index.html"); // true +``` + +## License + +Copyright (c) 2013, Nick Fitzgerald + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/glob-to-regexp/index.js b/node_modules/glob-to-regexp/index.js new file mode 100644 index 0000000..365cf22 --- /dev/null +++ b/node_modules/glob-to-regexp/index.js @@ -0,0 +1,130 @@ +module.exports = function (glob, opts) { + if (typeof glob !== 'string') { + throw new TypeError('Expected a string'); + } + + var str = String(glob); + + // The regexp we are building, as a string. + var reStr = ""; + + // Whether we are matching so called "extended" globs (like bash) and should + // support single character matching, matching ranges of characters, group + // matching, etc. + var extended = opts ? !!opts.extended : false; + + // When globstar is _false_ (default), '/foo/*' is translated a regexp like + // '^\/foo\/.*$' which will match any string beginning with '/foo/' + // When globstar is _true_, '/foo/*' is translated to regexp like + // '^\/foo\/[^/]*$' which will match any string beginning with '/foo/' BUT + // which does not have a '/' to the right of it. + // E.g. with '/foo/*' these will match: '/foo/bar', '/foo/bar.txt' but + // these will not '/foo/bar/baz', '/foo/bar/baz.txt' + // Lastely, when globstar is _true_, '/foo/**' is equivelant to '/foo/*' when + // globstar is _false_ + var globstar = opts ? !!opts.globstar : false; + + // If we are doing extended matching, this boolean is true when we are inside + // a group (eg {*.html,*.js}), and false otherwise. + var inGroup = false; + + // RegExp flags (eg "i" ) to pass in to RegExp constructor. + var flags = opts && typeof( opts.flags ) === "string" ? opts.flags : ""; + + var c; + for (var i = 0, len = str.length; i < len; i++) { + c = str[i]; + + switch (c) { + case "/": + case "$": + case "^": + case "+": + case ".": + case "(": + case ")": + case "=": + case "!": + case "|": + reStr += "\\" + c; + break; + + case "?": + if (extended) { + reStr += "."; + break; + } + + case "[": + case "]": + if (extended) { + reStr += c; + break; + } + + case "{": + if (extended) { + inGroup = true; + reStr += "("; + break; + } + + case "}": + if (extended) { + inGroup = false; + reStr += ")"; + break; + } + + case ",": + if (inGroup) { + reStr += "|"; + break; + } + reStr += "\\" + c; + break; + + case "*": + // Move over all consecutive "*"'s. + // Also store the previous and next characters + var prevChar = str[i - 1]; + var starCount = 1; + while(str[i + 1] === "*") { + starCount++; + i++; + } + var nextChar = str[i + 1]; + + if (!globstar) { + // globstar is disabled, so treat any number of "*" as one + reStr += ".*"; + } else { + // globstar is enabled, so determine if this is a globstar segment + var isGlobstar = starCount > 1 // multiple "*"'s + && (prevChar === "/" || prevChar === undefined) // from the start of the segment + && (nextChar === "/" || nextChar === undefined) // to the end of the segment + + if (isGlobstar) { + // it's a globstar, so match zero or more path segments + reStr += "((?:[^/]*(?:\/|$))*)"; + i++; // move over the "/" + } else { + // it's not a globstar, so only match one path segment + reStr += "([^/]*)"; + } + } + break; + + default: + reStr += c; + } + } + + // When regexp 'g' flag is specified don't + // constrain the regular expression with ^ & $ + if (!flags || !~flags.indexOf('g')) { + reStr = "^" + reStr + "$"; + } + + return new RegExp(reStr, flags); +}; diff --git a/node_modules/glob-to-regexp/package.json b/node_modules/glob-to-regexp/package.json new file mode 100644 index 0000000..467daf3 --- /dev/null +++ b/node_modules/glob-to-regexp/package.json @@ -0,0 +1,23 @@ +{ + "name": "glob-to-regexp", + "version": "0.4.1", + "description": "Convert globs to regular expressions", + "main": "index.js", + "scripts": { + "test": "node test.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/fitzgen/glob-to-regexp.git" + }, + "keywords": [ + "regexp", + "glob", + "regexps", + "regular expressions", + "regular expression", + "wildcard" + ], + "author": "Nick Fitzgerald ", + "license": "BSD-2-Clause" +} diff --git a/node_modules/glob-to-regexp/test.js b/node_modules/glob-to-regexp/test.js new file mode 100644 index 0000000..58ee622 --- /dev/null +++ b/node_modules/glob-to-regexp/test.js @@ -0,0 +1,235 @@ +var globToRegexp = require("./index.js"); +var assert = require("assert"); + +function assertMatch(glob, str, opts) { + //console.log(glob, globToRegexp(glob, opts)); + assert.ok(globToRegexp(glob, opts).test(str)); +} + +function assertNotMatch(glob, str, opts) { + //console.log(glob, globToRegexp(glob, opts)); + assert.equal(false, globToRegexp(glob, opts).test(str)); +} + +function test(globstar) { + // Match everything + assertMatch("*", "foo"); + assertMatch("*", "foo", { flags: 'g' }); + + // Match the end + assertMatch("f*", "foo"); + assertMatch("f*", "foo", { flags: 'g' }); + + // Match the start + assertMatch("*o", "foo"); + assertMatch("*o", "foo", { flags: 'g' }); + + // Match the middle + assertMatch("f*uck", "firetruck"); + assertMatch("f*uck", "firetruck", { flags: 'g' }); + + // Don't match without Regexp 'g' + assertNotMatch("uc", "firetruck"); + // Match anywhere with RegExp 'g' + assertMatch("uc", "firetruck", { flags: 'g' }); + + // Match zero characters + assertMatch("f*uck", "fuck"); + assertMatch("f*uck", "fuck", { flags: 'g' }); + + // More complex matches + assertMatch("*.min.js", "http://example.com/jquery.min.js", {globstar: false}); + assertMatch("*.min.*", "http://example.com/jquery.min.js", {globstar: false}); + assertMatch("*/js/*.js", "http://example.com/js/jquery.min.js", {globstar: false}); + + // More complex matches with RegExp 'g' flag (complex regression) + assertMatch("*.min.*", "http://example.com/jquery.min.js", { flags: 'g' }); + assertMatch("*.min.js", "http://example.com/jquery.min.js", { flags: 'g' }); + assertMatch("*/js/*.js", "http://example.com/js/jquery.min.js", { flags: 'g' }); + + // Test string "\\\\/$^+?.()=!|{},[].*" represents \\/$^+?.()=!|{},[].* + // The equivalent regex is: /^\\\/\$\^\+\?\.\(\)\=\!\|\{\}\,\[\]\..*$/ + // Both glob and regex match: \/$^+?.()=!|{},[].* + var testStr = "\\\\/$^+?.()=!|{},[].*"; + var targetStr = "\\/$^+?.()=!|{},[].*"; + assertMatch(testStr, targetStr); + assertMatch(testStr, targetStr, { flags: 'g' }); + + // Equivalent matches without/with using RegExp 'g' + assertNotMatch(".min.", "http://example.com/jquery.min.js"); + assertMatch("*.min.*", "http://example.com/jquery.min.js"); + assertMatch(".min.", "http://example.com/jquery.min.js", { flags: 'g' }); + + assertNotMatch("http:", "http://example.com/jquery.min.js"); + assertMatch("http:*", "http://example.com/jquery.min.js"); + assertMatch("http:", "http://example.com/jquery.min.js", { flags: 'g' }); + + assertNotMatch("min.js", "http://example.com/jquery.min.js"); + assertMatch("*.min.js", "http://example.com/jquery.min.js"); + assertMatch("min.js", "http://example.com/jquery.min.js", { flags: 'g' }); + + // Match anywhere (globally) using RegExp 'g' + assertMatch("min", "http://example.com/jquery.min.js", { flags: 'g' }); + assertMatch("/js/", "http://example.com/js/jquery.min.js", { flags: 'g' }); + + assertNotMatch("/js*jq*.js", "http://example.com/js/jquery.min.js"); + assertMatch("/js*jq*.js", "http://example.com/js/jquery.min.js", { flags: 'g' }); + + // Extended mode + + // ?: Match one character, no more and no less + assertMatch("f?o", "foo", { extended: true }); + assertNotMatch("f?o", "fooo", { extended: true }); + assertNotMatch("f?oo", "foo", { extended: true }); + + // ?: Match one character with RegExp 'g' + assertMatch("f?o", "foo", { extended: true, globstar: globstar, flags: 'g' }); + assertMatch("f?o", "fooo", { extended: true, globstar: globstar, flags: 'g' }); + assertMatch("f?o?", "fooo", { extended: true, globstar: globstar, flags: 'g' }); + assertNotMatch("?fo", "fooo", { extended: true, globstar: globstar, flags: 'g' }); + assertNotMatch("f?oo", "foo", { extended: true, globstar: globstar, flags: 'g' }); + assertNotMatch("foo?", "foo", { extended: true, globstar: globstar, flags: 'g' }); + + // []: Match a character range + assertMatch("fo[oz]", "foo", { extended: true }); + assertMatch("fo[oz]", "foz", { extended: true }); + assertNotMatch("fo[oz]", "fog", { extended: true }); + + // []: Match a character range and RegExp 'g' (regresion) + assertMatch("fo[oz]", "foo", { extended: true, globstar: globstar, flags: 'g' }); + assertMatch("fo[oz]", "foz", { extended: true, globstar: globstar, flags: 'g' }); + assertNotMatch("fo[oz]", "fog", { extended: true, globstar: globstar, flags: 'g' }); + + // {}: Match a choice of different substrings + assertMatch("foo{bar,baaz}", "foobaaz", { extended: true }); + assertMatch("foo{bar,baaz}", "foobar", { extended: true }); + assertNotMatch("foo{bar,baaz}", "foobuzz", { extended: true }); + assertMatch("foo{bar,b*z}", "foobuzz", { extended: true }); + + // {}: Match a choice of different substrings and RegExp 'g' (regression) + assertMatch("foo{bar,baaz}", "foobaaz", { extended: true, globstar: globstar, flags: 'g' }); + assertMatch("foo{bar,baaz}", "foobar", { extended: true, globstar: globstar, flags: 'g' }); + assertNotMatch("foo{bar,baaz}", "foobuzz", { extended: true, globstar: globstar, flags: 'g' }); + assertMatch("foo{bar,b*z}", "foobuzz", { extended: true, globstar: globstar, flags: 'g' }); + + // More complex extended matches + assertMatch("http://?o[oz].b*z.com/{*.js,*.html}", + "http://foo.baaz.com/jquery.min.js", + { extended: true }); + assertMatch("http://?o[oz].b*z.com/{*.js,*.html}", + "http://moz.buzz.com/index.html", + { extended: true }); + assertNotMatch("http://?o[oz].b*z.com/{*.js,*.html}", + "http://moz.buzz.com/index.htm", + { extended: true }); + assertNotMatch("http://?o[oz].b*z.com/{*.js,*.html}", + "http://moz.bar.com/index.html", + { extended: true }); + assertNotMatch("http://?o[oz].b*z.com/{*.js,*.html}", + "http://flozz.buzz.com/index.html", + { extended: true }); + + // More complex extended matches and RegExp 'g' (regresion) + assertMatch("http://?o[oz].b*z.com/{*.js,*.html}", + "http://foo.baaz.com/jquery.min.js", + { extended: true, globstar: globstar, flags: 'g' }); + assertMatch("http://?o[oz].b*z.com/{*.js,*.html}", + "http://moz.buzz.com/index.html", + { extended: true, globstar: globstar, flags: 'g' }); + assertNotMatch("http://?o[oz].b*z.com/{*.js,*.html}", + "http://moz.buzz.com/index.htm", + { extended: true, globstar: globstar, flags: 'g' }); + assertNotMatch("http://?o[oz].b*z.com/{*.js,*.html}", + "http://moz.bar.com/index.html", + { extended: true, globstar: globstar, flags: 'g' }); + assertNotMatch("http://?o[oz].b*z.com/{*.js,*.html}", + "http://flozz.buzz.com/index.html", + { extended: true, globstar: globstar, flags: 'g' }); + + // globstar + assertMatch("http://foo.com/**/{*.js,*.html}", + "http://foo.com/bar/jquery.min.js", + { extended: true, globstar: globstar, flags: 'g' }); + assertMatch("http://foo.com/**/{*.js,*.html}", + "http://foo.com/bar/baz/jquery.min.js", + { extended: true, globstar: globstar, flags: 'g' }); + assertMatch("http://foo.com/**", + "http://foo.com/bar/baz/jquery.min.js", + { extended: true, globstar: globstar, flags: 'g' }); + + // Remaining special chars should still match themselves + // Test string "\\\\/$^+.()=!|,.*" represents \\/$^+.()=!|,.* + // The equivalent regex is: /^\\\/\$\^\+\.\(\)\=\!\|\,\..*$/ + // Both glob and regex match: \/$^+.()=!|,.* + var testExtStr = "\\\\/$^+.()=!|,.*"; + var targetExtStr = "\\/$^+.()=!|,.*"; + assertMatch(testExtStr, targetExtStr, { extended: true }); + assertMatch(testExtStr, targetExtStr, { extended: true, globstar: globstar, flags: 'g' }); +} + +// regression +// globstar false +test(false) +// globstar true +test(true); + +// globstar specific tests +assertMatch("/foo/*", "/foo/bar.txt", {globstar: true }); +assertMatch("/foo/**", "/foo/baz.txt", {globstar: true }); +assertMatch("/foo/**", "/foo/bar/baz.txt", {globstar: true }); +assertMatch("/foo/*/*.txt", "/foo/bar/baz.txt", {globstar: true }); +assertMatch("/foo/**/*.txt", "/foo/bar/baz.txt", {globstar: true }); +assertMatch("/foo/**/*.txt", "/foo/bar/baz/qux.txt", {globstar: true }); +assertMatch("/foo/**/bar.txt", "/foo/bar.txt", {globstar: true }); +assertMatch("/foo/**/**/bar.txt", "/foo/bar.txt", {globstar: true }); +assertMatch("/foo/**/*/baz.txt", "/foo/bar/baz.txt", {globstar: true }); +assertMatch("/foo/**/*.txt", "/foo/bar.txt", {globstar: true }); +assertMatch("/foo/**/**/*.txt", "/foo/bar.txt", {globstar: true }); +assertMatch("/foo/**/*/*.txt", "/foo/bar/baz.txt", {globstar: true }); +assertMatch("**/*.txt", "/foo/bar/baz/qux.txt", {globstar: true }); +assertMatch("**/foo.txt", "foo.txt", {globstar: true }); +assertMatch("**/*.txt", "foo.txt", {globstar: true }); + +assertNotMatch("/foo/*", "/foo/bar/baz.txt", {globstar: true }); +assertNotMatch("/foo/*.txt", "/foo/bar/baz.txt", {globstar: true }); +assertNotMatch("/foo/*/*.txt", "/foo/bar/baz/qux.txt", {globstar: true }); +assertNotMatch("/foo/*/bar.txt", "/foo/bar.txt", {globstar: true }); +assertNotMatch("/foo/*/*/baz.txt", "/foo/bar/baz.txt", {globstar: true }); +assertNotMatch("/foo/**.txt", "/foo/bar/baz/qux.txt", {globstar: true }); +assertNotMatch("/foo/bar**/*.txt", "/foo/bar/baz/qux.txt", {globstar: true }); +assertNotMatch("/foo/bar**", "/foo/bar/baz.txt", {globstar: true }); +assertNotMatch("**/.txt", "/foo/bar/baz/qux.txt", {globstar: true }); +assertNotMatch("*/*.txt", "/foo/bar/baz/qux.txt", {globstar: true }); +assertNotMatch("*/*.txt", "foo.txt", {globstar: true }); + +assertNotMatch("http://foo.com/*", + "http://foo.com/bar/baz/jquery.min.js", + { extended: true, globstar: true }); +assertNotMatch("http://foo.com/*", + "http://foo.com/bar/baz/jquery.min.js", + { globstar: true }); + +assertMatch("http://foo.com/*", + "http://foo.com/bar/baz/jquery.min.js", + { globstar: false }); +assertMatch("http://foo.com/**", + "http://foo.com/bar/baz/jquery.min.js", + { globstar: true }); + +assertMatch("http://foo.com/*/*/jquery.min.js", + "http://foo.com/bar/baz/jquery.min.js", + { globstar: true }); +assertMatch("http://foo.com/**/jquery.min.js", + "http://foo.com/bar/baz/jquery.min.js", + { globstar: true }); +assertMatch("http://foo.com/*/*/jquery.min.js", + "http://foo.com/bar/baz/jquery.min.js", + { globstar: false }); +assertMatch("http://foo.com/*/jquery.min.js", + "http://foo.com/bar/baz/jquery.min.js", + { globstar: false }); +assertNotMatch("http://foo.com/*/jquery.min.js", + "http://foo.com/bar/baz/jquery.min.js", + { globstar: true }); + +console.log("Ok!"); diff --git a/node_modules/is-arrayish/LICENSE b/node_modules/is-arrayish/LICENSE new file mode 100644 index 0000000..0a5f461 --- /dev/null +++ b/node_modules/is-arrayish/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 JD Ballard + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/is-arrayish/README.md b/node_modules/is-arrayish/README.md new file mode 100644 index 0000000..7d36072 --- /dev/null +++ b/node_modules/is-arrayish/README.md @@ -0,0 +1,16 @@ +# node-is-arrayish [![Travis-CI.org Build Status](https://img.shields.io/travis/Qix-/node-is-arrayish.svg?style=flat-square)](https://travis-ci.org/Qix-/node-is-arrayish) [![Coveralls.io Coverage Rating](https://img.shields.io/coveralls/Qix-/node-is-arrayish.svg?style=flat-square)](https://coveralls.io/r/Qix-/node-is-arrayish) +> Determines if an object can be used like an Array + +## Example +```javascript +var isArrayish = require('is-arrayish'); + +isArrayish([]); // true +isArrayish({__proto__: []}); // true +isArrayish({}); // false +isArrayish({length:10}); // false +``` + +## License +Licensed under the [MIT License](http://opensource.org/licenses/MIT). +You can find a copy of it in [LICENSE](LICENSE). diff --git a/node_modules/is-arrayish/index.js b/node_modules/is-arrayish/index.js new file mode 100644 index 0000000..729ca40 --- /dev/null +++ b/node_modules/is-arrayish/index.js @@ -0,0 +1,9 @@ +module.exports = function isArrayish(obj) { + if (!obj || typeof obj === 'string') { + return false; + } + + return obj instanceof Array || Array.isArray(obj) || + (obj.length >= 0 && (obj.splice instanceof Function || + (Object.getOwnPropertyDescriptor(obj, (obj.length - 1)) && obj.constructor.name !== 'String'))); +}; diff --git a/node_modules/is-arrayish/package.json b/node_modules/is-arrayish/package.json new file mode 100644 index 0000000..8a54e33 --- /dev/null +++ b/node_modules/is-arrayish/package.json @@ -0,0 +1,45 @@ +{ + "name": "is-arrayish", + "description": "Determines if an object can be used as an array", + "version": "0.3.2", + "author": "Qix (http://github.com/qix-)", + "keywords": [ + "is", + "array", + "duck", + "type", + "arrayish", + "similar", + "proto", + "prototype", + "type" + ], + "license": "MIT", + "scripts": { + "test": "mocha --require coffeescript/register ./test/**/*.coffee", + "lint": "zeit-eslint --ext .jsx,.js .", + "lint-staged": "git diff --diff-filter=ACMRT --cached --name-only '*.js' '*.jsx' | xargs zeit-eslint" + }, + "repository": { + "type": "git", + "url": "https://github.com/qix-/node-is-arrayish.git" + }, + "devDependencies": { + "@zeit/eslint-config-node": "^0.3.0", + "@zeit/git-hooks": "^0.1.4", + "coffeescript": "^2.3.1", + "coveralls": "^3.0.1", + "eslint": "^4.19.1", + "istanbul": "^0.4.5", + "mocha": "^5.2.0", + "should": "^13.2.1" + }, + "eslintConfig": { + "extends": [ + "@zeit/eslint-config-node" + ] + }, + "git": { + "pre-commit": "lint-staged" + } +} diff --git a/node_modules/is-arrayish/yarn-error.log b/node_modules/is-arrayish/yarn-error.log new file mode 100644 index 0000000..d3dcf37 --- /dev/null +++ b/node_modules/is-arrayish/yarn-error.log @@ -0,0 +1,1443 @@ +Arguments: + /Users/junon/n/bin/node /Users/junon/.yarn/bin/yarn.js test + +PATH: + /Users/junon/.yarn/bin:/Users/junon/.config/yarn/global/node_modules/.bin:/Users/junon/perl5/bin:/Users/junon/google-cloud-sdk/bin:/usr/local/sbin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/junon/bin:/Users/junon/.local/bin:/src/.go/bin:/src/llvm/llvm/build/bin:/Users/junon/Library/Android/sdk/platform-tools:/Users/junon/n/bin:/usr/local/texlive/2017/bin/x86_64-darwin/ + +Yarn version: + 1.5.1 + +Node version: + 9.6.1 + +Platform: + darwin x64 + +npm manifest: + { + "name": "is-arrayish", + "description": "Determines if an object can be used as an array", + "version": "0.3.1", + "author": "Qix (http://github.com/qix-)", + "keywords": [ + "is", + "array", + "duck", + "type", + "arrayish", + "similar", + "proto", + "prototype", + "type" + ], + "license": "MIT", + "scripts": { + "test": "mocha --require coffeescript/register", + "lint": "zeit-eslint --ext .jsx,.js .", + "lint-staged": "git diff --diff-filter=ACMRT --cached --name-only '*.js' '*.jsx' | xargs zeit-eslint" + }, + "repository": { + "type": "git", + "url": "https://github.com/qix-/node-is-arrayish.git" + }, + "devDependencies": { + "@zeit/eslint-config-node": "^0.3.0", + "@zeit/git-hooks": "^0.1.4", + "coffeescript": "^2.3.1", + "coveralls": "^3.0.1", + "eslint": "^4.19.1", + "istanbul": "^0.4.5", + "mocha": "^5.2.0", + "should": "^13.2.1" + }, + "eslintConfig": { + "extends": [ + "@zeit/eslint-config-node" + ] + }, + "git": { + "pre-commit": "lint-staged" + } + } + +yarn manifest: + No manifest + +Lockfile: + # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. + # yarn lockfile v1 + + + "@zeit/eslint-config-base@0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@zeit/eslint-config-base/-/eslint-config-base-0.3.0.tgz#32a58c3e52eca4025604758cb4591f3d28e22fb4" + dependencies: + arg "^1.0.0" + chalk "^2.3.0" + + "@zeit/eslint-config-node@^0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@zeit/eslint-config-node/-/eslint-config-node-0.3.0.tgz#6e328328f366f66c2a0549a69131bbcd9735f098" + dependencies: + "@zeit/eslint-config-base" "0.3.0" + + "@zeit/git-hooks@^0.1.4": + version "0.1.4" + resolved "https://registry.yarnpkg.com/@zeit/git-hooks/-/git-hooks-0.1.4.tgz#70583db5dd69726a62c7963520e67f2c3a33cc5f" + + abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + + abbrev@1.0.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" + + acorn-jsx@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" + dependencies: + acorn "^3.0.4" + + acorn@^3.0.4: + version "3.3.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" + + acorn@^5.5.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.1.tgz#f095829297706a7c9776958c0afc8930a9b9d9d8" + + ajv-keywords@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.1.tgz#617997fc5f60576894c435f940d819e135b80762" + + ajv@^5.1.0, ajv@^5.2.3, ajv@^5.3.0: + version "5.5.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" + dependencies: + co "^4.6.0" + fast-deep-equal "^1.0.0" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.3.0" + + align-text@^0.1.1, align-text@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" + dependencies: + kind-of "^3.0.2" + longest "^1.0.1" + repeat-string "^1.5.2" + + amdefine@>=0.0.4: + version "1.0.1" + resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + + ansi-escapes@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.1.0.tgz#f73207bb81207d75fd6c83f125af26eea378ca30" + + ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + + ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + + ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + + ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + dependencies: + color-convert "^1.9.0" + + arg@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arg/-/arg-1.0.1.tgz#892a26d841bd5a64880bbc8f73dd64a705910ca3" + + argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + dependencies: + sprintf-js "~1.0.2" + + array-union@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + dependencies: + array-uniq "^1.0.1" + + array-uniq@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + + arrify@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + + asn1@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + + assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + + async@1.x, async@^1.4.0: + version "1.5.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + + asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + + aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + + aws4@^1.6.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.7.0.tgz#d4d0e9b9dbfca77bf08eeb0a8a471550fe39e289" + + babel-code-frame@^6.22.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" + dependencies: + chalk "^1.1.3" + esutils "^2.0.2" + js-tokens "^3.0.2" + + balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + + bcrypt-pbkdf@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" + dependencies: + tweetnacl "^0.14.3" + + brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + + browser-stdout@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" + + buffer-from@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.0.tgz#87fcaa3a298358e0ade6e442cfce840740d1ad04" + + caller-path@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" + dependencies: + callsites "^0.2.0" + + callsites@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" + + camelcase@^1.0.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + + caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + + center-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" + dependencies: + align-text "^0.1.3" + lazy-cache "^1.0.3" + + chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + + chalk@^2.0.0, chalk@^2.1.0, chalk@^2.3.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + + chardet@^0.4.0: + version "0.4.2" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2" + + circular-json@^0.3.1: + version "0.3.3" + resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" + + cli-cursor@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" + dependencies: + restore-cursor "^2.0.0" + + cli-width@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" + + cliui@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" + dependencies: + center-align "^0.1.1" + right-align "^0.1.1" + wordwrap "0.0.2" + + co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + + coffeescript@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/coffeescript/-/coffeescript-2.3.1.tgz#a25f69c251d25805c9842e57fc94bfc453ef6aed" + + color-convert@^1.9.0: + version "1.9.2" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.2.tgz#49881b8fba67df12a96bdf3f56c0aab9e7913147" + dependencies: + color-name "1.1.1" + + color-name@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.1.tgz#4b1415304cf50028ea81643643bd82ea05803689" + + combined-stream@1.0.6, combined-stream@~1.0.5: + version "1.0.6" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818" + dependencies: + delayed-stream "~1.0.0" + + commander@2.15.1: + version "2.15.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" + + concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + + concat-stream@^1.6.0: + version "1.6.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" + dependencies: + buffer-from "^1.0.0" + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + + core-util-is@1.0.2, core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + + coveralls@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.0.1.tgz#12e15914eaa29204e56869a5ece7b9e1492d2ae2" + dependencies: + js-yaml "^3.6.1" + lcov-parse "^0.0.10" + log-driver "^1.2.5" + minimist "^1.2.0" + request "^2.79.0" + + cross-spawn@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + + dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + dependencies: + assert-plus "^1.0.0" + + debug@3.1.0, debug@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + dependencies: + ms "2.0.0" + + decamelize@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + + deep-is@~0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + + del@^2.0.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" + dependencies: + globby "^5.0.0" + is-path-cwd "^1.0.0" + is-path-in-cwd "^1.0.0" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + rimraf "^2.2.8" + + delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + + diff@3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" + + doctrine@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" + dependencies: + esutils "^2.0.2" + + ecc-jsbn@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" + dependencies: + jsbn "~0.1.0" + + escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + + escodegen@1.8.x: + version "1.8.1" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" + dependencies: + esprima "^2.7.1" + estraverse "^1.9.1" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.2.0" + + eslint-scope@^3.7.1: + version "3.7.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8" + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + + eslint-visitor-keys@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" + + eslint@^4.19.1: + version "4.19.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.19.1.tgz#32d1d653e1d90408854bfb296f076ec7e186a300" + dependencies: + ajv "^5.3.0" + babel-code-frame "^6.22.0" + chalk "^2.1.0" + concat-stream "^1.6.0" + cross-spawn "^5.1.0" + debug "^3.1.0" + doctrine "^2.1.0" + eslint-scope "^3.7.1" + eslint-visitor-keys "^1.0.0" + espree "^3.5.4" + esquery "^1.0.0" + esutils "^2.0.2" + file-entry-cache "^2.0.0" + functional-red-black-tree "^1.0.1" + glob "^7.1.2" + globals "^11.0.1" + ignore "^3.3.3" + imurmurhash "^0.1.4" + inquirer "^3.0.6" + is-resolvable "^1.0.0" + js-yaml "^3.9.1" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.3.0" + lodash "^4.17.4" + minimatch "^3.0.2" + mkdirp "^0.5.1" + natural-compare "^1.4.0" + optionator "^0.8.2" + path-is-inside "^1.0.2" + pluralize "^7.0.0" + progress "^2.0.0" + regexpp "^1.0.1" + require-uncached "^1.0.3" + semver "^5.3.0" + strip-ansi "^4.0.0" + strip-json-comments "~2.0.1" + table "4.0.2" + text-table "~0.2.0" + + espree@^3.5.4: + version "3.5.4" + resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.4.tgz#b0f447187c8a8bed944b815a660bddf5deb5d1a7" + dependencies: + acorn "^5.5.0" + acorn-jsx "^3.0.0" + + esprima@2.7.x, esprima@^2.7.1: + version "2.7.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + + esprima@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" + + esquery@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708" + dependencies: + estraverse "^4.0.0" + + esrecurse@^4.1.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf" + dependencies: + estraverse "^4.1.0" + + estraverse@^1.9.1: + version "1.9.3" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" + + estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1: + version "4.2.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" + + esutils@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + + extend@~3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" + + external-editor@^2.0.4: + version "2.2.0" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.2.0.tgz#045511cfd8d133f3846673d1047c154e214ad3d5" + dependencies: + chardet "^0.4.0" + iconv-lite "^0.4.17" + tmp "^0.0.33" + + extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + + extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + + fast-deep-equal@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614" + + fast-json-stable-stringify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" + + fast-levenshtein@~2.0.4: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + + figures@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" + dependencies: + escape-string-regexp "^1.0.5" + + file-entry-cache@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" + dependencies: + flat-cache "^1.2.1" + object-assign "^4.0.1" + + flat-cache@^1.2.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.3.0.tgz#d3030b32b38154f4e3b7e9c709f490f7ef97c481" + dependencies: + circular-json "^0.3.1" + del "^2.0.2" + graceful-fs "^4.1.2" + write "^0.2.1" + + forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + + form-data@~2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.2.tgz#4970498be604c20c005d4f5c23aecd21d6b49099" + dependencies: + asynckit "^0.4.0" + combined-stream "1.0.6" + mime-types "^2.1.12" + + fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + + functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + + getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + dependencies: + assert-plus "^1.0.0" + + glob@7.1.2, glob@^7.0.3, glob@^7.0.5, glob@^7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + + glob@^5.0.15: + version "5.0.15" + resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "2 || 3" + once "^1.3.0" + path-is-absolute "^1.0.0" + + globals@^11.0.1: + version "11.5.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.5.0.tgz#6bc840de6771173b191f13d3a9c94d441ee92642" + + globby@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" + dependencies: + array-union "^1.0.1" + arrify "^1.0.0" + glob "^7.0.3" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + + graceful-fs@^4.1.2: + version "4.1.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + + growl@1.10.5: + version "1.10.5" + resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" + + handlebars@^4.0.1: + version "4.0.11" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc" + dependencies: + async "^1.4.0" + optimist "^0.6.1" + source-map "^0.4.4" + optionalDependencies: + uglify-js "^2.6" + + har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + + har-validator@~5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd" + dependencies: + ajv "^5.1.0" + har-schema "^2.0.0" + + has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + + has-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + + has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + + he@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" + + http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + + iconv-lite@^0.4.17: + version "0.4.23" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63" + dependencies: + safer-buffer ">= 2.1.2 < 3" + + ignore@^3.3.3: + version "3.3.8" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.8.tgz#3f8e9c35d38708a3a7e0e9abb6c73e7ee7707b2b" + + imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + + inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + + inherits@2, inherits@^2.0.3, inherits@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + + inquirer@^3.0.6: + version "3.3.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9" + dependencies: + ansi-escapes "^3.0.0" + chalk "^2.0.0" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^2.0.4" + figures "^2.0.0" + lodash "^4.3.0" + mute-stream "0.0.7" + run-async "^2.2.0" + rx-lite "^4.0.8" + rx-lite-aggregates "^4.0.8" + string-width "^2.1.0" + strip-ansi "^4.0.0" + through "^2.3.6" + + is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + + is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + + is-path-cwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" + + is-path-in-cwd@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz#5ac48b345ef675339bd6c7a48a912110b241cf52" + dependencies: + is-path-inside "^1.0.0" + + is-path-inside@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036" + dependencies: + path-is-inside "^1.0.1" + + is-promise@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" + + is-resolvable@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" + + is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + + isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + + isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + + isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + + istanbul@^0.4.5: + version "0.4.5" + resolved "https://registry.yarnpkg.com/istanbul/-/istanbul-0.4.5.tgz#65c7d73d4c4da84d4f3ac310b918fb0b8033733b" + dependencies: + abbrev "1.0.x" + async "1.x" + escodegen "1.8.x" + esprima "2.7.x" + glob "^5.0.15" + handlebars "^4.0.1" + js-yaml "3.x" + mkdirp "0.5.x" + nopt "3.x" + once "1.x" + resolve "1.1.x" + supports-color "^3.1.0" + which "^1.1.1" + wordwrap "^1.0.0" + + js-tokens@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + + js-yaml@3.x, js-yaml@^3.6.1, js-yaml@^3.9.1: + version "3.12.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1" + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + + jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + + json-schema-traverse@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" + + json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + + json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + + json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + + jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + + kind-of@^3.0.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + dependencies: + is-buffer "^1.1.5" + + lazy-cache@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" + + lcov-parse@^0.0.10: + version "0.0.10" + resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3" + + levn@^0.3.0, levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + + lodash@^4.17.4, lodash@^4.3.0: + version "4.17.10" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" + + log-driver@^1.2.5: + version "1.2.7" + resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8" + + longest@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + + lru-cache@^4.0.1: + version "4.1.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.3.tgz#a1175cf3496dfc8436c156c334b4955992bce69c" + dependencies: + pseudomap "^1.0.2" + yallist "^2.1.2" + + mime-db@~1.33.0: + version "1.33.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" + + mime-types@^2.1.12, mime-types@~2.1.17: + version "2.1.18" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" + dependencies: + mime-db "~1.33.0" + + mimic-fn@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" + + "minimatch@2 || 3", minimatch@3.0.4, minimatch@^3.0.2, minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + dependencies: + brace-expansion "^1.1.7" + + minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + + minimist@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + + minimist@~0.0.1: + version "0.0.10" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" + + mkdirp@0.5.1, mkdirp@0.5.x, mkdirp@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + + mocha@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-5.2.0.tgz#6d8ae508f59167f940f2b5b3c4a612ae50c90ae6" + dependencies: + browser-stdout "1.3.1" + commander "2.15.1" + debug "3.1.0" + diff "3.5.0" + escape-string-regexp "1.0.5" + glob "7.1.2" + growl "1.10.5" + he "1.1.1" + minimatch "3.0.4" + mkdirp "0.5.1" + supports-color "5.4.0" + + ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + + mute-stream@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" + + natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + + nopt@3.x: + version "3.0.6" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" + dependencies: + abbrev "1" + + oauth-sign@~0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" + + object-assign@^4.0.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + + once@1.x, once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + dependencies: + wrappy "1" + + onetime@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" + dependencies: + mimic-fn "^1.0.0" + + optimist@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" + dependencies: + minimist "~0.0.1" + wordwrap "~0.0.2" + + optionator@^0.8.1, optionator@^0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.4" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + wordwrap "~1.0.0" + + os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + + path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + + path-is-inside@^1.0.1, path-is-inside@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + + performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + + pify@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + + pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + dependencies: + pinkie "^2.0.0" + + pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + + pluralize@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777" + + prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + + process-nextick-args@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" + + progress@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f" + + pseudomap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + + punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + + qs@~6.5.1: + version "6.5.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" + + readable-stream@^2.2.2: + version "2.3.6" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + + regexpp@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-1.1.0.tgz#0e3516dd0b7904f413d2d4193dce4618c3a689ab" + + repeat-string@^1.5.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + + request@^2.79.0: + version "2.87.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.87.0.tgz#32f00235cd08d482b4d0d68db93a829c0ed5756e" + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.6.0" + caseless "~0.12.0" + combined-stream "~1.0.5" + extend "~3.0.1" + forever-agent "~0.6.1" + form-data "~2.3.1" + har-validator "~5.0.3" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.17" + oauth-sign "~0.8.2" + performance-now "^2.1.0" + qs "~6.5.1" + safe-buffer "^5.1.1" + tough-cookie "~2.3.3" + tunnel-agent "^0.6.0" + uuid "^3.1.0" + + require-uncached@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" + dependencies: + caller-path "^0.1.0" + resolve-from "^1.0.0" + + resolve-from@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" + + resolve@1.1.x: + version "1.1.7" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + + restore-cursor@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" + dependencies: + onetime "^2.0.0" + signal-exit "^3.0.2" + + right-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" + dependencies: + align-text "^0.1.1" + + rimraf@^2.2.8: + version "2.6.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" + dependencies: + glob "^7.0.5" + + run-async@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" + dependencies: + is-promise "^2.1.0" + + rx-lite-aggregates@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be" + dependencies: + rx-lite "*" + + rx-lite@*, rx-lite@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" + + safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + + "safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + + semver@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" + + shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + dependencies: + shebang-regex "^1.0.0" + + shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + + should-equal@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/should-equal/-/should-equal-2.0.0.tgz#6072cf83047360867e68e98b09d71143d04ee0c3" + dependencies: + should-type "^1.4.0" + + should-format@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/should-format/-/should-format-3.0.3.tgz#9bfc8f74fa39205c53d38c34d717303e277124f1" + dependencies: + should-type "^1.3.0" + should-type-adaptors "^1.0.1" + + should-type-adaptors@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz#401e7f33b5533033944d5cd8bf2b65027792e27a" + dependencies: + should-type "^1.3.0" + should-util "^1.0.0" + + should-type@^1.3.0, should-type@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/should-type/-/should-type-1.4.0.tgz#0756d8ce846dfd09843a6947719dfa0d4cff5cf3" + + should-util@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/should-util/-/should-util-1.0.0.tgz#c98cda374aa6b190df8ba87c9889c2b4db620063" + + should@^13.2.1: + version "13.2.1" + resolved "https://registry.yarnpkg.com/should/-/should-13.2.1.tgz#84e6ebfbb145c79e0ae42307b25b3f62dcaf574e" + dependencies: + should-equal "^2.0.0" + should-format "^3.0.3" + should-type "^1.4.0" + should-type-adaptors "^1.0.1" + should-util "^1.0.0" + + signal-exit@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + + slice-ansi@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-1.0.0.tgz#044f1a49d8842ff307aad6b505ed178bd950134d" + dependencies: + is-fullwidth-code-point "^2.0.0" + + source-map@^0.4.4: + version "0.4.4" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" + dependencies: + amdefine ">=0.0.4" + + source-map@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" + dependencies: + amdefine ">=0.0.4" + + source-map@~0.5.1: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + + sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + + sshpk@^1.7.0: + version "1.14.2" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.2.tgz#c6fc61648a3d9c4e764fd3fcdf4ea105e492ba98" + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + dashdash "^1.12.0" + getpass "^0.1.1" + safer-buffer "^2.0.2" + optionalDependencies: + bcrypt-pbkdf "^1.0.0" + ecc-jsbn "~0.1.1" + jsbn "~0.1.0" + tweetnacl "~0.14.0" + + string-width@^2.1.0, string-width@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + + string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + dependencies: + safe-buffer "~5.1.0" + + strip-ansi@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + + strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + dependencies: + ansi-regex "^3.0.0" + + strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + + supports-color@5.4.0, supports-color@^5.3.0: + version "5.4.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" + dependencies: + has-flag "^3.0.0" + + supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + + supports-color@^3.1.0: + version "3.2.3" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + dependencies: + has-flag "^1.0.0" + + table@4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/table/-/table-4.0.2.tgz#a33447375391e766ad34d3486e6e2aedc84d2e36" + dependencies: + ajv "^5.2.3" + ajv-keywords "^2.1.0" + chalk "^2.1.0" + lodash "^4.17.4" + slice-ansi "1.0.0" + string-width "^2.1.1" + + text-table@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + + through@^2.3.6: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + + tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + dependencies: + os-tmpdir "~1.0.2" + + tough-cookie@~2.3.3: + version "2.3.4" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655" + dependencies: + punycode "^1.4.1" + + tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + dependencies: + safe-buffer "^5.0.1" + + tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + + type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + dependencies: + prelude-ls "~1.1.2" + + typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + + uglify-js@^2.6: + version "2.8.29" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" + dependencies: + source-map "~0.5.1" + yargs "~3.10.0" + optionalDependencies: + uglify-to-browserify "~1.0.0" + + uglify-to-browserify@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" + + util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + + uuid@^3.1.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.2.1.tgz#12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14" + + verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + + which@^1.1.1, which@^1.2.9: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + dependencies: + isexe "^2.0.0" + + window-size@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + + wordwrap@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + + wordwrap@^1.0.0, wordwrap@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + + wordwrap@~0.0.2: + version "0.0.3" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" + + wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + + write@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" + dependencies: + mkdirp "^0.5.1" + + yallist@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + + yargs@~3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" + dependencies: + camelcase "^1.0.2" + cliui "^2.1.0" + decamelize "^1.0.0" + window-size "0.1.0" + +Trace: + Error: Command failed. + Exit code: 1 + Command: sh + Arguments: -c mocha --require coffeescript/register + Directory: /src/qix-/node-is-arrayish + Output: + + at ProcessTermError.MessageError (/Users/junon/.yarn/lib/cli.js:186:110) + at new ProcessTermError (/Users/junon/.yarn/lib/cli.js:226:113) + at ChildProcess. (/Users/junon/.yarn/lib/cli.js:30281:17) + at ChildProcess.emit (events.js:127:13) + at maybeClose (internal/child_process.js:933:16) + at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5) diff --git a/node_modules/mime/CHANGELOG.md b/node_modules/mime/CHANGELOG.md new file mode 100644 index 0000000..cdf9be5 --- /dev/null +++ b/node_modules/mime/CHANGELOG.md @@ -0,0 +1,312 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [3.0.0](https://github.com/broofa/mime/compare/v2.6.0...v3.0.0) (2021-11-03) + + +### ⚠ BREAKING CHANGES + +* drop support for node < 10.x + +### Bug Fixes + +* skypack.dev for direct browser import, fixes [#263](https://github.com/broofa/mime/issues/263) ([41db4c0](https://github.com/broofa/mime/commit/41db4c042ccf50ea7baf3d2160ea37dcca37998d)) + + +### update + +* drop support for node < 10.x ([8857363](https://github.com/broofa/mime/commit/8857363ae0446ed0229b17291cf4483cf801f0d0)) + +## [2.6.0](https://github.com/broofa/mime/compare/v2.5.2...v2.6.0) (2021-11-02) + + +### Features + +* mime-db@1.50.0 ([cef0cc4](https://github.com/broofa/mime/commit/cef0cc484ff6d05ff1e12b54ca3e8b856fbc14d8)) + +### [2.5.2](https://github.com/broofa/mime/compare/v2.5.0...v2.5.2) (2021-02-17) + + +### Bug Fixes + +* update to mime-db@1.46.0, fixes [#253](https://github.com/broofa/mime/issues/253) ([f10e6aa](https://github.com/broofa/mime/commit/f10e6aa62e1356de7e2491d7fb4374c8dac65800)) + +## [2.5.0](https://github.com/broofa/mime/compare/v2.4.7...v2.5.0) (2021-01-16) + + +### Features + +* improved CLI ([#244](https://github.com/broofa/mime/issues/244)) ([c8a8356](https://github.com/broofa/mime/commit/c8a8356e3b27f3ef46b64b89b428fdb547b14d5f)) + +### [2.4.7](https://github.com/broofa/mime/compare/v2.4.6...v2.4.7) (2020-12-16) + + +### Bug Fixes + +* update to latest mime-db ([43b09ef](https://github.com/broofa/mime/commit/43b09eff0233eacc449af2b1f99a19ba9e104a44)) + +### [2.4.6](https://github.com/broofa/mime/compare/v2.4.5...v2.4.6) (2020-05-27) + + +### Bug Fixes + +* add cli.js to package.json files ([#237](https://github.com/broofa/mime/issues/237)) ([6c070bc](https://github.com/broofa/mime/commit/6c070bc298fa12a48e2ed126fbb9de641a1e7ebc)) + +### [2.4.5](https://github.com/broofa/mime/compare/v2.4.4...v2.4.5) (2020-05-01) + + +### Bug Fixes + +* fix [#236](https://github.com/broofa/mime/issues/236) ([7f4ecd0](https://github.com/broofa/mime/commit/7f4ecd0d850ed22c9e3bfda2c11fc74e4dde12a7)) +* update to latest mime-db ([c5cb3f2](https://github.com/broofa/mime/commit/c5cb3f2ab8b07642a066efbde1142af1b90c927b)) + +### [2.4.4](https://github.com/broofa/mime/compare/v2.4.3...v2.4.4) (2019-06-07) + + + +### [2.4.3](https://github.com/broofa/mime/compare/v2.4.2...v2.4.3) (2019-05-15) + + + +### [2.4.2](https://github.com/broofa/mime/compare/v2.4.1...v2.4.2) (2019-04-07) + + +### Bug Fixes + +* don't use arrow function introduced in 2.4.1 ([2e00b5c](https://github.com/broofa/mime/commit/2e00b5c)) + + + +### [2.4.1](https://github.com/broofa/mime/compare/v2.4.0...v2.4.1) (2019-04-03) + + +### Bug Fixes + +* update MDN and mime-db types ([3e567a9](https://github.com/broofa/mime/commit/3e567a9)) + + + +# [2.4.0](https://github.com/broofa/mime/compare/v2.3.1...v2.4.0) (2018-11-26) + + +### Features + +* Bind exported methods ([9d2a7b8](https://github.com/broofa/mime/commit/9d2a7b8)) +* update to mime-db@1.37.0 ([49e6e41](https://github.com/broofa/mime/commit/49e6e41)) + + + +### [2.3.1](https://github.com/broofa/mime/compare/v2.3.0...v2.3.1) (2018-04-11) + + +### Bug Fixes + +* fix [#198](https://github.com/broofa/mime/issues/198) ([25ca180](https://github.com/broofa/mime/commit/25ca180)) + + + +# [2.3.0](https://github.com/broofa/mime/compare/v2.2.2...v2.3.0) (2018-04-11) + + +### Bug Fixes + +* fix [#192](https://github.com/broofa/mime/issues/192) ([5c35df6](https://github.com/broofa/mime/commit/5c35df6)) + + +### Features + +* add travis-ci testing ([d64160f](https://github.com/broofa/mime/commit/d64160f)) + + + +### [2.2.2](https://github.com/broofa/mime/compare/v2.2.1...v2.2.2) (2018-03-30) + + +### Bug Fixes + +* update types files to mime-db@1.32.0 ([85aac16](https://github.com/broofa/mime/commit/85aac16)) + + +### [2.2.1](https://github.com/broofa/mime/compare/v2.2.0...v2.2.1) (2018-03-30) + + +### Bug Fixes + +* Retain type->extension mappings for non-default types. Fixes [#180](https://github.com/broofa/mime/issues/180) ([b5c83fb](https://github.com/broofa/mime/commit/b5c83fb)) + + + +# [2.2.0](https://github.com/broofa/mime/compare/v2.1.0...v2.2.0) (2018-01-04) + + +### Features + +* Retain type->extension mappings for non-default types. Fixes [#180](https://github.com/broofa/mime/issues/180) ([10f82ac](https://github.com/broofa/mime/commit/10f82ac)) + + + +# [2.1.0](https://github.com/broofa/mime/compare/v2.0.5...v2.1.0) (2017-12-22) + + +### Features + +* Upgrade to mime-db@1.32.0. Fixes [#185](https://github.com/broofa/mime/issues/185) ([3f775ba](https://github.com/broofa/mime/commit/3f775ba)) + + + +### [2.0.5](https://github.com/broofa/mime/compare/v2.0.1...v2.0.5) (2017-12-22) + + +### Bug Fixes + +* ES5 support (back to node v0.4) ([f14ccb6](https://github.com/broofa/mime/commit/f14ccb6)) + + + +# Changelog + +### v2.0.4 (24/11/2017) +- [**closed**] Switch to mime-score module for resolving extension contention issues. [#182](https://github.com/broofa/mime/issues/182) +- [**closed**] Update mime-db to 1.31.0 in v1.x branch [#181](https://github.com/broofa/mime/issues/181) + +--- + +## v1.5.0 (22/11/2017) +- [**closed**] need ES5 version ready in npm package [#179](https://github.com/broofa/mime/issues/179) +- [**closed**] mime-db no trace of iWork - pages / numbers / etc. [#178](https://github.com/broofa/mime/issues/178) +- [**closed**] How it works in brownser ? [#176](https://github.com/broofa/mime/issues/176) +- [**closed**] Missing `./Mime` [#175](https://github.com/broofa/mime/issues/175) +- [**closed**] Vulnerable Regular Expression [#167](https://github.com/broofa/mime/issues/167) + +--- + +### v2.0.3 (25/09/2017) +*No changelog for this release.* + +--- + +### v1.4.1 (25/09/2017) +- [**closed**] Issue when bundling with webpack [#172](https://github.com/broofa/mime/issues/172) + +--- + +### v2.0.2 (15/09/2017) +- [**V2**] fs.readFileSync is not a function [#165](https://github.com/broofa/mime/issues/165) +- [**closed**] The extension for video/quicktime should map to .mov, not .qt [#164](https://github.com/broofa/mime/issues/164) +- [**V2**] [v2 Feedback request] Mime class API [#163](https://github.com/broofa/mime/issues/163) +- [**V2**] [v2 Feedback request] Resolving conflicts over extensions [#162](https://github.com/broofa/mime/issues/162) +- [**V2**] Allow callers to load module with official, full, or no defined types. [#161](https://github.com/broofa/mime/issues/161) +- [**V2**] Use "facets" to resolve extension conflicts [#160](https://github.com/broofa/mime/issues/160) +- [**V2**] Remove fs and path dependencies [#152](https://github.com/broofa/mime/issues/152) +- [**V2**] Default content-type should not be application/octet-stream [#139](https://github.com/broofa/mime/issues/139) +- [**V2**] reset mime-types [#124](https://github.com/broofa/mime/issues/124) +- [**V2**] Extensionless paths should return null or false [#113](https://github.com/broofa/mime/issues/113) + +--- + +### v2.0.1 (14/09/2017) +- [**closed**] Changelog for v2.0 does not mention breaking changes [#171](https://github.com/broofa/mime/issues/171) +- [**closed**] MIME breaking with 'class' declaration as it is without 'use strict mode' [#170](https://github.com/broofa/mime/issues/170) + +--- + +## v2.0.0 (12/09/2017) +- [**closed**] woff and woff2 [#168](https://github.com/broofa/mime/issues/168) + +--- + +## v1.4.0 (28/08/2017) +- [**closed**] support for ac3 voc files [#159](https://github.com/broofa/mime/issues/159) +- [**closed**] Help understanding change from application/xml to text/xml [#158](https://github.com/broofa/mime/issues/158) +- [**closed**] no longer able to override mimetype [#157](https://github.com/broofa/mime/issues/157) +- [**closed**] application/vnd.adobe.photoshop [#147](https://github.com/broofa/mime/issues/147) +- [**closed**] Directories should appear as something other than application/octet-stream [#135](https://github.com/broofa/mime/issues/135) +- [**closed**] requested features [#131](https://github.com/broofa/mime/issues/131) +- [**closed**] Make types.json loading optional? [#129](https://github.com/broofa/mime/issues/129) +- [**closed**] Cannot find module './types.json' [#120](https://github.com/broofa/mime/issues/120) +- [**V2**] .wav files show up as "audio/x-wav" instead of "audio/x-wave" [#118](https://github.com/broofa/mime/issues/118) +- [**closed**] Don't be a pain in the ass for node community [#108](https://github.com/broofa/mime/issues/108) +- [**closed**] don't make default_type global [#78](https://github.com/broofa/mime/issues/78) +- [**closed**] mime.extension() fails if the content-type is parameterized [#74](https://github.com/broofa/mime/issues/74) + +--- + +### v1.3.6 (11/05/2017) +- [**closed**] .md should be text/markdown as of March 2016 [#154](https://github.com/broofa/mime/issues/154) +- [**closed**] Error while installing mime [#153](https://github.com/broofa/mime/issues/153) +- [**closed**] application/manifest+json [#149](https://github.com/broofa/mime/issues/149) +- [**closed**] Dynamic adaptive streaming over HTTP (DASH) file extension typo [#141](https://github.com/broofa/mime/issues/141) +- [**closed**] charsets image/png undefined [#140](https://github.com/broofa/mime/issues/140) +- [**closed**] Mime-db dependency out of date [#130](https://github.com/broofa/mime/issues/130) +- [**closed**] how to support plist? [#126](https://github.com/broofa/mime/issues/126) +- [**closed**] how does .types file format look like? [#123](https://github.com/broofa/mime/issues/123) +- [**closed**] Feature: support for expanding MIME patterns [#121](https://github.com/broofa/mime/issues/121) +- [**closed**] DEBUG_MIME doesn't work [#117](https://github.com/broofa/mime/issues/117) + +--- + +### v1.3.4 (06/02/2015) +*No changelog for this release.* + +--- + +### v1.3.3 (06/02/2015) +*No changelog for this release.* + +--- + +### v1.3.1 (05/02/2015) +- [**closed**] Consider adding support for Handlebars .hbs file ending [#111](https://github.com/broofa/mime/issues/111) +- [**closed**] Consider adding support for hjson. [#110](https://github.com/broofa/mime/issues/110) +- [**closed**] Add mime type for Opus audio files [#94](https://github.com/broofa/mime/issues/94) +- [**closed**] Consider making the `Requesting New Types` information more visible [#77](https://github.com/broofa/mime/issues/77) + +--- + +## v1.3.0 (05/02/2015) +- [**closed**] Add common name? [#114](https://github.com/broofa/mime/issues/114) +- [**closed**] application/x-yaml [#104](https://github.com/broofa/mime/issues/104) +- [**closed**] Add mime type for WOFF file format 2.0 [#102](https://github.com/broofa/mime/issues/102) +- [**closed**] application/x-msi for .msi [#99](https://github.com/broofa/mime/issues/99) +- [**closed**] Add mimetype for gettext translation files [#98](https://github.com/broofa/mime/issues/98) +- [**closed**] collaborators [#88](https://github.com/broofa/mime/issues/88) +- [**closed**] getting errot in installation of mime module...any1 can help? [#87](https://github.com/broofa/mime/issues/87) +- [**closed**] should application/json's charset be utf8? [#86](https://github.com/broofa/mime/issues/86) +- [**closed**] Add "license" and "licenses" to package.json [#81](https://github.com/broofa/mime/issues/81) +- [**closed**] lookup with extension-less file on Windows returns wrong type [#68](https://github.com/broofa/mime/issues/68) + +--- + +### v1.2.11 (15/08/2013) +- [**closed**] Update mime.types [#65](https://github.com/broofa/mime/issues/65) +- [**closed**] Publish a new version [#63](https://github.com/broofa/mime/issues/63) +- [**closed**] README should state upfront that "application/octet-stream" is default for unknown extension [#55](https://github.com/broofa/mime/issues/55) +- [**closed**] Suggested improvement to the charset API [#52](https://github.com/broofa/mime/issues/52) + +--- + +### v1.2.10 (25/07/2013) +- [**closed**] Mime type for woff files should be application/font-woff and not application/x-font-woff [#62](https://github.com/broofa/mime/issues/62) +- [**closed**] node.types in conflict with mime.types [#51](https://github.com/broofa/mime/issues/51) + +--- + +### v1.2.9 (17/01/2013) +- [**closed**] Please update "mime" NPM [#49](https://github.com/broofa/mime/issues/49) +- [**closed**] Please add semicolon [#46](https://github.com/broofa/mime/issues/46) +- [**closed**] parse full mime types [#43](https://github.com/broofa/mime/issues/43) + +--- + +### v1.2.8 (10/01/2013) +- [**closed**] /js directory mime is application/javascript. Is it correct? [#47](https://github.com/broofa/mime/issues/47) +- [**closed**] Add mime types for lua code. [#45](https://github.com/broofa/mime/issues/45) + +--- + +### v1.2.7 (19/10/2012) +- [**closed**] cannot install 1.2.7 via npm [#41](https://github.com/broofa/mime/issues/41) +- [**closed**] Transfer ownership to @broofa [#36](https://github.com/broofa/mime/issues/36) +- [**closed**] it's wrong to set charset to UTF-8 for text [#30](https://github.com/broofa/mime/issues/30) +- [**closed**] Allow multiple instances of MIME types container [#27](https://github.com/broofa/mime/issues/27) diff --git a/node_modules/mime/LICENSE b/node_modules/mime/LICENSE new file mode 100644 index 0000000..d3f46f7 --- /dev/null +++ b/node_modules/mime/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2010 Benjamin Thomas, Robert Kieffer + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/mime/Mime.js b/node_modules/mime/Mime.js new file mode 100644 index 0000000..969a66e --- /dev/null +++ b/node_modules/mime/Mime.js @@ -0,0 +1,97 @@ +'use strict'; + +/** + * @param typeMap [Object] Map of MIME type -> Array[extensions] + * @param ... + */ +function Mime() { + this._types = Object.create(null); + this._extensions = Object.create(null); + + for (let i = 0; i < arguments.length; i++) { + this.define(arguments[i]); + } + + this.define = this.define.bind(this); + this.getType = this.getType.bind(this); + this.getExtension = this.getExtension.bind(this); +} + +/** + * Define mimetype -> extension mappings. Each key is a mime-type that maps + * to an array of extensions associated with the type. The first extension is + * used as the default extension for the type. + * + * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']}); + * + * If a type declares an extension that has already been defined, an error will + * be thrown. To suppress this error and force the extension to be associated + * with the new type, pass `force`=true. Alternatively, you may prefix the + * extension with "*" to map the type to extension, without mapping the + * extension to the type. + * + * e.g. mime.define({'audio/wav', ['wav']}, {'audio/x-wav', ['*wav']}); + * + * + * @param map (Object) type definitions + * @param force (Boolean) if true, force overriding of existing definitions + */ +Mime.prototype.define = function(typeMap, force) { + for (let type in typeMap) { + let extensions = typeMap[type].map(function(t) { + return t.toLowerCase(); + }); + type = type.toLowerCase(); + + for (let i = 0; i < extensions.length; i++) { + const ext = extensions[i]; + + // '*' prefix = not the preferred type for this extension. So fixup the + // extension, and skip it. + if (ext[0] === '*') { + continue; + } + + if (!force && (ext in this._types)) { + throw new Error( + 'Attempt to change mapping for "' + ext + + '" extension from "' + this._types[ext] + '" to "' + type + + '". Pass `force=true` to allow this, otherwise remove "' + ext + + '" from the list of extensions for "' + type + '".' + ); + } + + this._types[ext] = type; + } + + // Use first extension as default + if (force || !this._extensions[type]) { + const ext = extensions[0]; + this._extensions[type] = (ext[0] !== '*') ? ext : ext.substr(1); + } + } +}; + +/** + * Lookup a mime type based on extension + */ +Mime.prototype.getType = function(path) { + path = String(path); + let last = path.replace(/^.*[/\\]/, '').toLowerCase(); + let ext = last.replace(/^.*\./, '').toLowerCase(); + + let hasPath = last.length < path.length; + let hasDot = ext.length < last.length - 1; + + return (hasDot || !hasPath) && this._types[ext] || null; +}; + +/** + * Return file extension associated with a mime type + */ +Mime.prototype.getExtension = function(type) { + type = /^\s*([^;\s]*)/.test(type) && RegExp.$1; + return type && this._extensions[type.toLowerCase()] || null; +}; + +module.exports = Mime; diff --git a/node_modules/mime/README.md b/node_modules/mime/README.md new file mode 100644 index 0000000..fc816cb --- /dev/null +++ b/node_modules/mime/README.md @@ -0,0 +1,178 @@ + +# Mime + +A comprehensive, compact MIME type module. + +[![Build Status](https://travis-ci.org/broofa/mime.svg?branch=master)](https://travis-ci.org/broofa/mime) + +## Install + +### NPM +``` +npm install mime +``` + +### Browser + +It is recommended that you use a bundler such as +[webpack](https://webpack.github.io/) or [browserify](http://browserify.org/) to +package your code. However, browser-ready versions are available via +skypack.dev as follows: +``` +// Full version + +``` + +``` +// "lite" version + +``` + +## Quick Start + +For the full version (800+ MIME types, 1,000+ extensions): + +```javascript +const mime = require('mime'); + +mime.getType('txt'); // ⇨ 'text/plain' +mime.getExtension('text/plain'); // ⇨ 'txt' +``` + +See [Mime API](#mime-api) below for API details. + +## Lite Version + +The "lite" version of this module omits vendor-specific (`*/vnd.*`) and +experimental (`*/x-*`) types. It weighs in at ~2.5KB, compared to 8KB for the +full version. To load the lite version: + +```javascript +const mime = require('mime/lite'); +``` + +## Mime .vs. mime-types .vs. mime-db modules + +For those of you wondering about the difference between these [popular] NPM modules, +here's a brief rundown ... + +[`mime-db`](https://github.com/jshttp/mime-db) is "the source of +truth" for MIME type information. It is not an API. Rather, it is a canonical +dataset of mime type definitions pulled from IANA, Apache, NGINX, and custom mappings +submitted by the Node.js community. + +[`mime-types`](https://github.com/jshttp/mime-types) is a thin +wrapper around mime-db that provides an API drop-in compatible(ish) with `mime @ < v1.3.6` API. + +`mime` is, as of v2, a self-contained module bundled with a pre-optimized version +of the `mime-db` dataset. It provides a simplified API with the following characteristics: + +* Intelligently resolved type conflicts (See [mime-score](https://github.com/broofa/mime-score) for details) +* Method naming consistent with industry best-practices +* Compact footprint. E.g. The minified+compressed sizes of the various modules: + +Module | Size +--- | --- +`mime-db` | 18 KB +`mime-types` | same as mime-db +`mime` | 8 KB +`mime/lite` | 2 KB + +## Mime API + +Both `require('mime')` and `require('mime/lite')` return instances of the MIME +class, documented below. + +Note: Inputs to this API are case-insensitive. Outputs (returned values) will +be lowercase. + +### new Mime(typeMap, ... more maps) + +Most users of this module will not need to create Mime instances directly. +However if you would like to create custom mappings, you may do so as follows +... + +```javascript +// Require Mime class +const Mime = require('mime/Mime'); + +// Define mime type -> extensions map +const typeMap = { + 'text/abc': ['abc', 'alpha', 'bet'], + 'text/def': ['leppard'] +}; + +// Create and use Mime instance +const myMime = new Mime(typeMap); +myMime.getType('abc'); // ⇨ 'text/abc' +myMime.getExtension('text/def'); // ⇨ 'leppard' +``` + +If more than one map argument is provided, each map is `define()`ed (see below), in order. + +### mime.getType(pathOrExtension) + +Get mime type for the given path or extension. E.g. + +```javascript +mime.getType('js'); // ⇨ 'application/javascript' +mime.getType('json'); // ⇨ 'application/json' + +mime.getType('txt'); // ⇨ 'text/plain' +mime.getType('dir/text.txt'); // ⇨ 'text/plain' +mime.getType('dir\\text.txt'); // ⇨ 'text/plain' +mime.getType('.text.txt'); // ⇨ 'text/plain' +mime.getType('.txt'); // ⇨ 'text/plain' +``` + +`null` is returned in cases where an extension is not detected or recognized + +```javascript +mime.getType('foo/txt'); // ⇨ null +mime.getType('bogus_type'); // ⇨ null +``` + +### mime.getExtension(type) +Get extension for the given mime type. Charset options (often included in +Content-Type headers) are ignored. + +```javascript +mime.getExtension('text/plain'); // ⇨ 'txt' +mime.getExtension('application/json'); // ⇨ 'json' +mime.getExtension('text/html; charset=utf8'); // ⇨ 'html' +``` + +### mime.define(typeMap[, force = false]) + +Define [more] type mappings. + +`typeMap` is a map of type -> extensions, as documented in `new Mime`, above. + +By default this method will throw an error if you try to map a type to an +extension that is already assigned to another type. Passing `true` for the +`force` argument will suppress this behavior (overriding any previous mapping). + +```javascript +mime.define({'text/x-abc': ['abc', 'abcd']}); + +mime.getType('abcd'); // ⇨ 'text/x-abc' +mime.getExtension('text/x-abc') // ⇨ 'abc' +``` + +## Command Line + + mime [path_or_extension] + +E.g. + + > mime scripts/jquery.js + application/javascript + +---- +Markdown generated from [src/README_js.md](src/README_js.md) by [![RunMD Logo](http://i.imgur.com/h0FVyzU.png)](https://github.com/broofa/runmd) \ No newline at end of file diff --git a/node_modules/mime/cli.js b/node_modules/mime/cli.js new file mode 100755 index 0000000..ab70a49 --- /dev/null +++ b/node_modules/mime/cli.js @@ -0,0 +1,46 @@ +#!/usr/bin/env node + +'use strict'; + +process.title = 'mime'; +let mime = require('.'); +let pkg = require('./package.json'); +let args = process.argv.splice(2); + +if (args.includes('--version') || args.includes('-v') || args.includes('--v')) { + console.log(pkg.version); + process.exit(0); +} else if (args.includes('--name') || args.includes('-n') || args.includes('--n')) { + console.log(pkg.name); + process.exit(0); +} else if (args.includes('--help') || args.includes('-h') || args.includes('--h')) { + console.log(pkg.name + ' - ' + pkg.description + '\n'); + console.log(`Usage: + + mime [flags] [path_or_extension] + + Flags: + --help, -h Show this message + --version, -v Display the version + --name, -n Print the name of the program + + Note: the command will exit after it executes if a command is specified + The path_or_extension is the path to the file or the extension of the file. + + Examples: + mime --help + mime --version + mime --name + mime -v + mime src/log.js + mime new.py + mime foo.sh + `); + process.exit(0); +} + +let file = args[0]; +let type = mime.getType(file); + +process.stdout.write(type + '\n'); + diff --git a/node_modules/mime/index.js b/node_modules/mime/index.js new file mode 100644 index 0000000..fadcf8d --- /dev/null +++ b/node_modules/mime/index.js @@ -0,0 +1,4 @@ +'use strict'; + +let Mime = require('./Mime'); +module.exports = new Mime(require('./types/standard'), require('./types/other')); diff --git a/node_modules/mime/lite.js b/node_modules/mime/lite.js new file mode 100644 index 0000000..835cffb --- /dev/null +++ b/node_modules/mime/lite.js @@ -0,0 +1,4 @@ +'use strict'; + +let Mime = require('./Mime'); +module.exports = new Mime(require('./types/standard')); diff --git a/node_modules/mime/package.json b/node_modules/mime/package.json new file mode 100644 index 0000000..84f5132 --- /dev/null +++ b/node_modules/mime/package.json @@ -0,0 +1,52 @@ +{ + "author": { + "name": "Robert Kieffer", + "url": "http://github.com/broofa", + "email": "robert@broofa.com" + }, + "engines": { + "node": ">=10.0.0" + }, + "bin": { + "mime": "cli.js" + }, + "contributors": [], + "description": "A comprehensive library for mime-type mapping", + "license": "MIT", + "dependencies": {}, + "devDependencies": { + "benchmark": "*", + "chalk": "4.1.2", + "eslint": "8.1.0", + "mime-db": "1.50.0", + "mime-score": "1.2.0", + "mime-types": "2.1.33", + "mocha": "9.1.3", + "runmd": "*", + "standard-version": "9.3.2" + }, + "files": [ + "index.js", + "lite.js", + "Mime.js", + "cli.js", + "/types" + ], + "scripts": { + "prepare": "node src/build.js && runmd --output README.md src/README_js.md", + "release": "standard-version", + "benchmark": "node src/benchmark.js", + "md": "runmd --watch --output README.md src/README_js.md", + "test": "mocha src/test.js" + }, + "keywords": [ + "util", + "mime" + ], + "name": "mime", + "repository": { + "url": "https://github.com/broofa/mime", + "type": "git" + }, + "version": "3.0.0" +} diff --git a/node_modules/mime/types/other.js b/node_modules/mime/types/other.js new file mode 100644 index 0000000..bb6a035 --- /dev/null +++ b/node_modules/mime/types/other.js @@ -0,0 +1 @@ +module.exports = {"application/prs.cww":["cww"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mapbox-vector-tile":["mvt"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":["*iso"],"application/x-iwork-keynote-sffkey":["*key"],"application/x-iwork-numbers-sffnumbers":["*numbers"],"application/x-iwork-pages-sffpages":["*pages"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.sap.vds":["vds"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]}; \ No newline at end of file diff --git a/node_modules/mime/types/standard.js b/node_modules/mime/types/standard.js new file mode 100644 index 0000000..5ee9937 --- /dev/null +++ b/node_modules/mime/types/standard.js @@ -0,0 +1 @@ +module.exports = {"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}; \ No newline at end of file diff --git a/node_modules/miniflare/README.md b/node_modules/miniflare/README.md new file mode 100644 index 0000000..71cf184 --- /dev/null +++ b/node_modules/miniflare/README.md @@ -0,0 +1,888 @@ +# 🔥 Miniflare + +**Miniflare 3** is a simulator for developing and testing +[**Cloudflare Workers**](https://workers.cloudflare.com/), powered by +[`workerd`](https://github.com/cloudflare/workerd). + +> :warning: Miniflare 3 is API-only, and does not expose a CLI. Use Wrangler +> with `wrangler dev` to develop your Workers locally with Miniflare 3. + +## Quick Start + +```shell +$ npm install miniflare --save-dev +``` + +```js +import { Miniflare } from "miniflare"; + +// Create a new Miniflare instance, starting a workerd server +const mf = new Miniflare({ + script: `addEventListener("fetch", (event) => { + event.respondWith(new Response("Hello Miniflare!")); + })`, +}); + +// Send a request to the workerd server, the host is ignored +const response = await mf.dispatchFetch("http://localhost:8787/"); +console.log(await response.text()); // Hello Miniflare! + +// Cleanup Miniflare, shutting down the workerd server +await mf.dispose(); +``` + +## API + +### `type Awaitable` + +`T | Promise` + +Represents a value that can be `await`ed. Used in callback types to allow +`Promise`s to be returned if necessary. + +### `type Json` + +`string | number | boolean | null | Record | Json[]` + +Represents a JSON-serialisable value. + +### `type ModuleRuleType` + +`"ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm"` + +Represents how a module's contents should be interpreted. + +- `"ESModule"`: interpret as + [ECMAScript module](https://tc39.es/ecma262/#sec-modules) +- `"CommonJS"`: interpret as + [CommonJS module](https://nodejs.org/api/modules.html#modules-commonjs-modules) +- `"Text"`: interpret as UTF8-encoded data, expose in runtime with + `string`-typed `default` export +- `"Data"`: interpret as arbitrary binary data, expose in runtime with + `ArrayBuffer`-typed `default` export +- `"CompiledWasm"`: interpret as binary WebAssembly module data, expose in + runtime with `WebAssembly.Module`-typed `default` export + +### `interface ModuleDefinition` + +Represents a manually defined module. + +- `type: ModuleRuleType` + + How this module's contents should be interpreted. + +- `path: string` + + Path of this module. The module's "name" will be obtained by converting this + to a relative path. The original path will be used to read `contents` if it's + omitted. + +- `contents?: string | Uint8Array` + + Contents override for this module. Binary data should be passed as + `Uint8Array`s. If omitted, will be read from `path`. + +### `interface ModuleRule` + +Represents a rule for identifying the `ModuleRuleType` of automatically located +modules. + +- `type: ModuleRuleType` + + How to interpret modules that match the `include` patterns. + +- `include: string[]` + + Glob patterns to match located module paths against (e.g. `["**/*.txt"]`). + +- `fallthrough?: boolean` + + If `true`, ignore any further rules of this `type`. This is useful for + disabling the built-in `ESModule` and `CommonJS` rules that match `*.mjs` and + `*.js`/`*.cjs` files respectively. + +### `type Persistence` + +`boolean | string | undefined` + +Represents where data should be persisted, if anywhere. + +- If this is `undefined` or `false`, data will be stored in-memory and only + persist between `Miniflare#setOptions()` calls, not restarts nor + `new Miniflare` instances. +- If this is `true`, data will be stored on the file-system, in the `$PWD/.mf` + directory. +- If this looks like a URL, then: + - If the protocol is `memory:`, data will be stored in-memory as above. + - If the protocol is `file:`, data will be stored on the file-system, in the + specified directory (e.g. `file:///path/to/directory`). +- Otherwise, if this is just a regular `string`, data will be stored on the + file-system, using the value as the directory path. + +### `enum LogLevel` + +`NONE, ERROR, WARN, INFO, DEBUG, VERBOSE` + +Controls which messages Miniflare logs. All messages at or below the selected +level will be logged. + +### `interface LogOptions` + +- `prefix?: string` + + String to add before the level prefix when logging messages. Defaults to `mf`. + +- `suffix?: string` + + String to add after the level prefix when logging messages. + +### `class Log` + +- `constructor(level?: LogLevel, opts?: LogOptions)` + + Creates a new logger that logs all messages at or below the specified level to + the `console`. + +- `error(message: Error)` + + Logs a message at the `ERROR` level. If the constructed log `level` is less + than `ERROR`, `throw`s the `message` instead. + +- `warn(message: string)` + + Logs a message at the `WARN` level. + +- `info(message: string)` + + Logs a message at the `INFO` level. + +- `debug(message: string)` + + Logs a message at the `DEBUG` level. + +- `verbose(message: string)` + + Logs a message at the `VERBOSE` level. + +### `class NoOpLog extends Log` + +- `constructor()` + + Creates a new logger that logs nothing to the `console`, and always `throw`s + `message`s logged at the `ERROR` level. + +### `interface QueueProducerOptions` + +- `queueName: string` + + The name of the queue where messages will be sent by the producer. + +- `deliveryDelay?: number` + + Default number of seconds to delay the delivery of messages to consumers. + Value between `0` (no delay) and `42300` (12 hours). + +### `interface QueueConsumerOptions` + +- `maxBatchSize?: number` + + Maximum number of messages allowed in each batch. Defaults to `5`. + +- `maxBatchTimeout?: number` + + Maximum number of seconds to wait for a full batch. If a message is sent, and + this timeout elapses, a partial batch will be dispatched. Defaults to `1`. + +- `maxRetries?: number` + + Maximum number of times to retry dispatching a message, if handling it throws, + or it is explicitly retried. Defaults to `2`. + +- `deadLetterQueue?: string` + + Name of another Queue to send a message on if it fails processing after + `maxRetries`. If this isn't specified, failed messages will be discarded. + +- `retryDelay?: number` + + Number of seconds to delay the (re-)delivery of messages by default. Value + between `0` (no delay) and `42300` (12 hours). + +### `interface WorkerOptions` + +Options for an individual Worker/"nanoservice". All bindings are accessible on +the global scope in service-worker format Workers, or via the 2nd `env` +parameter in module format Workers. + +### `interface WorkflowOptions` + +- `name: string` + + The name of the Workflow. + +- `className: string` + + The name of the class exported from the Worker that implements the `WorkflowEntrypoint`. + +- `scriptName?`: string + + The name of the script that includes the `WorkflowEntrypoint`. This is optional because it defaults to the current script if not set. + +#### Core + +- `name?: string` + + Unique name for this worker. Only required if multiple `workers` are + specified. + +- `rootPath?: string` + + Path against which all other path options for this Worker are resolved + relative to. This path is itself resolved relative to the `rootPath` from + `SharedOptions` if multiple workers are specified. Defaults to the current + working directory. + +- `script?: string` + + JavaScript code for this worker. If this is a service worker format Worker, it + must not have any imports. If this is a modules format Worker, it must not + have any _npm_ imports, and `modules: true` must be set. If it does have + imports, `scriptPath` must also be set so Miniflare knows where to resolve + them relative to. + +- `scriptPath?: string` + + Path of JavaScript entrypoint. If this is a service worker format Worker, it + must not have any imports. If this is a modules format Worker, it must not + have any _npm_ imports, and `modules: true` must be set. + +- `modules?: boolean | ModuleDefinition[]` + + - If `true`, Miniflare will treat `script`/`scriptPath` as an ES Module and + automatically locate transitive module dependencies according to + `modulesRules`. Note that automatic location is not perfect: if the + specifier to a dynamic `import()` or `require()` is not a string literal, an + exception will be thrown. + + - If set to an array, modules can be defined manually. Transitive dependencies + must also be defined. Note the first module must be the entrypoint and have + type `"ESModule"`. + +- `modulesRoot?: string` + + If `modules` is set to `true` or an array, modules' "name"s will be their + `path`s relative to this value. This ensures file paths in stack traces are + correct. + + + + +- `modulesRules?: ModuleRule[]` + + Rules for identifying the `ModuleRuleType` of automatically located modules + when `modules: true` is set. Note the following default rules are always + included at the end: + + ```js + [ + { type: "ESModule", include: ["**/*.mjs"] }, + { type: "CommonJS", include: ["**/*.js", "**/*.cjs"] }, + ] + ``` + + > If `script` and `scriptPath` are set, and `modules` is set to an array, + > `modules` takes priority for a Worker's code, followed by `script`, then + > `scriptPath`. + + + +- `compatibilityDate?: string` + + [Compatibility date](https://developers.cloudflare.com/workers/platform/compatibility-dates/) + to use for this Worker. Defaults to a date far in the past. + +- `compatibilityFlags?: string[]` + + [Compatibility flags](https://developers.cloudflare.com/workers/platform/compatibility-dates/) + to use for this Worker. + +- `bindings?: Record` + + Record mapping binding name to arbitrary JSON-serialisable values to inject as + bindings into this Worker. + +- `wasmBindings?: Record` + + Record mapping binding name to paths containing binary WebAssembly module data + to inject as `WebAssembly.Module` bindings into this Worker. + +- `textBlobBindings?: Record` + + Record mapping binding name to paths containing UTF8-encoded data to inject as + `string` bindings into this Worker. + +- `dataBlobBindings?: Record` + + Record mapping binding name to paths containing arbitrary binary data to + inject as `ArrayBuffer` bindings into this Worker. + +- `serviceBindings?: Record Awaitable>` + + Record mapping binding name to service designators to inject as + `{ fetch: typeof fetch }` + [service bindings](https://developers.cloudflare.com/workers/platform/bindings/about-service-bindings/) + into this Worker. + + - If the designator is a `string`, requests will be dispatched to the Worker + with that `name`. + - If the designator is `(await import("miniflare")).kCurrentWorker`, requests + will be dispatched to the Worker defining the binding. + - If the designator is an object of the form `{ name: ..., entrypoint: ... }`, + requests will be dispatched to the entrypoint named `entrypoint` in the + Worker named `name`. The `entrypoint` defaults to `default`, meaning + `{ name: "a" }` is the same as `"a"`. If `name` is + `(await import("miniflare")).kCurrentWorker`, requests will be dispatched to + the Worker defining the binding. + - If the designator is an object of the form `{ network: { ... } }`, where + `network` is a + [`workerd` `Network` struct](https://github.com/cloudflare/workerd/blob/bdbd6075c7c53948050c52d22f2dfa37bf376253/src/workerd/server/workerd.capnp#L555-L598), + requests will be dispatched according to the `fetch`ed URL. + - If the designator is an object of the form `{ external: { ... } }` where + `external` is a + [`workerd` `ExternalServer` struct](https://github.com/cloudflare/workerd/blob/bdbd6075c7c53948050c52d22f2dfa37bf376253/src/workerd/server/workerd.capnp#L504-L553), + requests will be dispatched to the specified remote server. + - If the designator is an object of the form `{ disk: { ... } }` where `disk` + is a + [`workerd` `DiskDirectory` struct](https://github.com/cloudflare/workerd/blob/bdbd6075c7c53948050c52d22f2dfa37bf376253/src/workerd/server/workerd.capnp#L600-L643), + requests will be dispatched to an HTTP service backed by an on-disk + directory. + - If the designator is a function, requests will be dispatched to your custom + handler. This allows you to access data and functions defined in Node.js + from your Worker. Note `instance` will be the `Miniflare` instance + dispatching the request. + + + +- `wrappedBindings?: Record }>` + + Record mapping binding name to designators to inject as + [wrapped bindings](https://github.com/cloudflare/workerd/blob/bfcef2d850514c569c039cb84c43bc046af4ffb9/src/workerd/server/workerd.capnp#L469-L487) into this Worker. + Wrapped bindings allow custom bindings to be written as JavaScript functions + accepting an `env` parameter of "inner bindings" and returning the value to + bind. A `string` designator is equivalent to `{ scriptName: }`. + `scriptName`'s bindings will be used as "inner bindings". JSON `bindings` in + the `designator` also become "inner bindings" and will override any of + `scriptName` bindings with the same name. The Worker named `scriptName`... + + - Must define a single `ESModule` as its source, using + `{ modules: true, script: "..." }`, `{ modules: true, scriptPath: "..." }`, + or `{ modules: [...] }` + - Must provide the function to use for the wrapped binding as an `entrypoint` + named export or a default export if `entrypoint` is omitted + - Must not be the first/entrypoint worker + - Must not be bound to with service or Durable Object bindings + - Must not define `compatibilityDate` or `compatibilityFlags` + - Must not define `outboundService` + - Must not directly or indirectly have a wrapped binding to itself + - Must not be used as an argument to `Miniflare#getWorker()` + +
+ Wrapped Bindings Example + + ```ts + import { Miniflare } from "miniflare"; + const store = new Map(); + const mf = new Miniflare({ + workers: [ + { + wrappedBindings: { + MINI_KV: { + scriptName: "mini-kv", // Use Worker named `mini-kv` for implementation + bindings: { NAMESPACE: "ns" }, // Override `NAMESPACE` inner binding + }, + }, + modules: true, + script: `export default { + async fetch(request, env, ctx) { + // Example usage of wrapped binding + await env.MINI_KV.set("key", "value"); + return new Response(await env.MINI_KV.get("key")); + } + }`, + }, + { + name: "mini-kv", + serviceBindings: { + // Function-valued service binding for accessing Node.js state + async STORE(request) { + const { pathname } = new URL(request.url); + const key = pathname.substring(1); + if (request.method === "GET") { + const value = store.get(key); + const status = value === undefined ? 404 : 200; + return new Response(value ?? null, { status }); + } else if (request.method === "PUT") { + const value = await request.text(); + store.set(key, value); + return new Response(null, { status: 204 }); + } else if (request.method === "DELETE") { + store.delete(key); + return new Response(null, { status: 204 }); + } else { + return new Response(null, { status: 405 }); + } + }, + }, + modules: true, + script: ` + // Implementation of binding + class MiniKV { + constructor(env) { + this.STORE = env.STORE; + this.baseURL = "http://x/" + (env.NAMESPACE ?? "") + ":"; + } + async get(key) { + const res = await this.STORE.fetch(this.baseURL + key); + return res.status === 404 ? null : await res.text(); + } + async set(key, body) { + await this.STORE.fetch(this.baseURL + key, { method: "PUT", body }); + } + async delete(key) { + await this.STORE.fetch(this.baseURL + key, { method: "DELETE" }); + } + } + + // env has the type { STORE: Fetcher, NAMESPACE?: string } + export default function (env) { + return new MiniKV(env); + } + `, + }, + ], + }); + ``` + +
+ + > :warning: `wrappedBindings` are only supported in modules format Workers. + + + +- `outboundService?: string | { network: Network } | { external: ExternalServer } | { disk: DiskDirectory } | (request: Request) => Awaitable` + + Dispatch this Worker's global `fetch()` and `connect()` requests to the + configured service. Service designators follow the same rules above for + `serviceBindings`. + +- `fetchMock?: import("undici").MockAgent` + + An [`undici` `MockAgent`](https://undici.nodejs.org/#/docs/api/MockAgent) to + dispatch this Worker's global `fetch()` requests through. + + > :warning: `outboundService` and `fetchMock` are mutually exclusive options. + > At most one of them may be specified per Worker. + +- `routes?: string[]` + + Array of route patterns for this Worker. These follow the same + [routing rules](https://developers.cloudflare.com/workers/platform/triggers/routes/#matching-behavior) + as deployed Workers. If no routes match, Miniflare will fallback to the Worker + defined first. + +#### Cache + +- `cache?: boolean` + + If `false`, default and named caches will be disabled. The Cache API will + still be available, it just won't cache anything. + +- `cacheWarnUsage?: boolean` + + If `true`, the first use of the Cache API will log a warning stating that the + Cache API is unsupported on `workers.dev` subdomains. + +#### Durable Objects + +- `durableObjects?: Record` + + Record mapping binding name to Durable Object class designators to inject as + `DurableObjectNamespace` bindings into this Worker. + + - If the designator is a `string`, it should be the name of a `class` exported + by this Worker. + - If the designator is an object, and `scriptName` is `undefined`, `className` + should be the name of a `class` exported by this Worker. + - Otherwise, `className` should be the name of a `class` exported by the + Worker with a `name` of `scriptName`. + +#### KV + +- `kvNamespaces?: Record | string[]` + + Record mapping binding name to KV namespace IDs to inject as `KVNamespace` + bindings into this Worker. Different Workers may bind to the same namespace ID + with different binding names. If a `string[]` of binding names is specified, + the binding name and KV namespace ID are assumed to be the same. + +- `sitePath?: string` + + Path to serve Workers Sites files from. If set, `__STATIC_CONTENT` and + `__STATIC_CONTENT_MANIFEST` bindings will be injected into this Worker. In + modules mode, `__STATIC_CONTENT_MANIFEST` will also be exposed as a module + with a `string`-typed `default` export, containing the JSON-stringified + manifest. Note Workers Sites files are never cached in Miniflare. + +- `siteInclude?: string[]` + + If set, only files with paths matching these glob patterns will be served. + +- `siteExclude?: string[]` + + If set, only files with paths _not_ matching these glob patterns will be + served. + + - `assetsPath?: string` + + Path to serve Workers assets from. + + - `assetsKVBindingName?: string` + Name of the binding to the KV namespace that the assets are in. If `assetsPath` is set, this binding will be injected into this Worker. + + - `assetsManifestBindingName?: string` + Name of the binding to an `ArrayBuffer` containing the binary-encoded assets manifest. If `assetsPath` is set, this binding will be injected into this Worker. + +#### R2 + +- `r2Buckets?: Record | string[]` + + Record mapping binding name to R2 bucket names to inject as `R2Bucket` + bindings into this Worker. Different Workers may bind to the same bucket name + with different binding names. If a `string[]` of binding names is specified, + the binding name and bucket name are assumed to be the same. + +#### D1 + +- `d1Databases?: Record | string[]` + + Record mapping binding name to D1 database IDs to inject as `D1Database` + bindings into this Worker. Note binding names starting with `__D1_BETA__` are + injected as `Fetcher` bindings instead, and must be wrapped with a facade to + provide the expected `D1Database` API. Different Workers may bind to the same + database ID with different binding names. If a `string[]` of binding names is + specified, the binding name and database ID are assumed to be the same. + +#### Queues + +- `queueProducers?: Record | string[]` + + Record mapping binding name to queue options to inject as `WorkerQueue` bindings + into this Worker. Different Workers may bind to the same queue name with + different binding names. If a `string[]` of binding names is specified, the + binding name and queue name (part of the queue options) are assumed to be the same. + +- `queueConsumers?: Record | string[]` + + Record mapping queue name to consumer options. Messages enqueued on the + corresponding queues will be dispatched to this Worker. Note each queue can + have at most one consumer. If a `string[]` of queue names is specified, + default consumer options will be used. + +#### Assets + +- `directory?: string` + Path to serve Workers static asset files from. + +- `binding?: string` + Binding name to inject as a `Fetcher` binding to allow access to static assets from within the Worker. + +- `assetOptions?: { html_handling?: HTMLHandlingOptions, not_found_handling?: NotFoundHandlingOptions}` + Configuration for file-based asset routing - see [docs](https://developers.cloudflare.com/workers/static-assets/routing/#routing-configuration) for options + +#### Pipelines + +- `pipelines?: Record | string[]` + + Record mapping binding name to a Pipeline. Different workers may bind to the same Pipeline with different bindings + names. If a `string[]` of pipeline names, the binding and Pipeline name are assumed to be the same. + +#### Workflows + +- `workflows?: WorkflowOptions[]` + Configuration for one or more Workflows in your project. + +#### Analytics Engine, Sending Email, Vectorize and Workers for Platforms + +_Not yet supported_ + +If you need support for these locally, consider using the `wrappedBindings` +option to mock them out. + +#### Browser Rendering and Workers AI + +_Not yet supported_ + +If you need support for these locally, consider using the `serviceBindings` +option to mock them out. + +### `interface SharedOptions` + +Options shared between all Workers/"nanoservices". + +#### Core + +- `rootPath?: string` + + Path against which all other path options for this instance are resolved + relative to. Defaults to the current working directory. + +- `host?: string` + + Hostname that the `workerd` server should listen on. Defaults to `127.0.0.1`. + +- `port?: number` + + Port that the `workerd` server should listen on. Tries to default to `8787`, + but falls back to a random free port if this is in use. Note if a manually + specified port is in use, Miniflare throws an error, rather than attempting to + find a free port. + +- `https?: boolean` + + If `true`, start an HTTPS server using a pre-generated self-signed certificate + for `localhost`. Note this certificate is not valid for any other hostnames or + IP addresses. If you need to access the HTTPS server from another device, + you'll need to generate your own certificate and use the other `https*` + options below. + + ```shell + $ openssl req -newkey rsa:2048 -nodes -keyout key.pem -x509 -days 365 -out cert.pem + ``` + + ```js + new Miniflare({ + httpsKeyPath: "key.pem", + httpsCertPath: "cert.pem", + }); + ``` + +- `httpsKey?: string` + + When one of `httpsCert` or `httpCertPath` is also specified, starts an HTTPS + server using the value of this option as the PEM encoded private key. + +- `httpsKeyPath?: string` + + When one of `httpsCert` or `httpCertPath` is also specified, starts an HTTPS + server using the PEM encoded private key stored at this file path. + +- `httpsCert?: string` + + When one of `httpsKey` or `httpsKeyPath` is also specified, starts an HTTPS + server using the value of this option as the PEM encoded certificate chain. + +- `httpsCertPath?: string` + + When one of `httpsKey` or `httpsKeyPath` is also specified, starts an HTTPS + server using the PEM encoded certificate chain stored at this file path. + +- `inspectorPort?: number` + + Port that `workerd` should start a DevTools inspector server on. Visit + `chrome://inspect` in a Chromium-based browser to connect to this. This can be + used to see detailed `console.log`s, profile CPU usage, and will eventually + allow step-through debugging. + +- `verbose?: boolean` + + Enable `workerd`'s `--verbose` flag for verbose logging. This can be used to + see simplified `console.log`s. + +- `log?: Log` + + Logger implementation for Miniflare's errors, warnings and informative + messages. + +- `upstream?: string` + + URL to use as the origin for incoming requests. If specified, all incoming + `request.url`s will be rewritten to start with this string. This is especially + useful when testing Workers that act as a proxy, and not as origins + themselves. + +- `cf?: boolean | string | Record` + + Controls the object returned from incoming `Request`'s `cf` property. + + - If set to a falsy value, an object with default placeholder values will be + used + - If set to an object, that object will be used + - If set to `true`, a real `cf` object will be fetched from a trusted + Cloudflare endpoint and cached in `node_modules/.mf` for 30 days + - If set to a `string`, a real `cf` object will be fetched and cached at the + provided path for 30 days + +- `liveReload?: boolean` + + If `true`, Miniflare will inject a script into HTML responses that + automatically reloads the page in-browser whenever the Miniflare instance's + options are updated. + +#### Cache, Durable Objects, KV, R2 and D1 + +- `cachePersist?: Persistence` + + Where to persist data cached in default or named caches. See docs for + `Persistence`. + +- `durableObjectsPersist?: Persistence` + + Where to persist data stored in Durable Objects. See docs for `Persistence`. + +- `kvPersist?: Persistence` + + Where to persist data stored in KV namespaces. See docs for `Persistence`. + +- `r2Persist?: Persistence` + + Where to persist data stored in R2 buckets. See docs for `Persistence`. + +- `d1Persist?: Persistence` + + Where to persist data stored in D1 databases. See docs for `Persistence`. + +- `workflowsPersist?: Persistence` + +Where to persist data stored in Workflows. See docs for `Persistence`. + +#### Analytics Engine, Browser Rendering, Sending Email, Vectorize, Workers AI and Workers for Platforms + +_Not yet supported_ + +### `type MiniflareOptions` + +`SharedOptions & (WorkerOptions | { workers: WorkerOptions[] })` + +Miniflare accepts either a single Worker configuration or multiple Worker +configurations in the `workers` array. When specifying an array of Workers, the +first Worker is designated the entrypoint and will receive all incoming HTTP +requests. Some options are shared between all workers and should always be +defined at the top-level. + +### `class Miniflare` + +- `constructor(opts: MiniflareOptions)` + + Creates a Miniflare instance and starts a new `workerd` server. Note unlike + Miniflare 2, Miniflare 3 _always_ starts a HTTP server listening on the + configured `host` and `port`: there are no `createServer`/`startServer` + functions. + +- `setOptions(opts: MiniflareOptions)` + + Updates the configuration for this Miniflare instance and restarts the + `workerd` server. Note unlike Miniflare 2, this does _not_ merge the new + configuration with the old configuration. Note that calling this function will + invalidate any existing values returned by the `Miniflare#get*()` methods, + preventing them from being used. + +- `ready: Promise` + + Returns a `Promise` that resolves with a `http` `URL` to the `workerd` server + once it has started and is able to accept requests. + +- `dispatchFetch(input: RequestInfo, init?: RequestInit): Promise` + + Sends a HTTP request to the `workerd` server, dispatching a `fetch` event in + the entrypoint Worker. Returns a `Promise` that resolves with the response. + Note that this implicitly waits for the `ready` `Promise` to resolve, there's + no need to do that yourself first. Additionally, the host of the request's URL + is always ignored and replaced with the `workerd` server's. + +- `getBindings = Record>(workerName?: string): Promise` + + Returns a `Promise` that resolves with a record mapping binding names to + bindings, for all bindings in the Worker with the specified `workerName`. If + `workerName` is not specified, defaults to the entrypoint Worker. + +- `getWorker(workerName?: string): Promise` + + Returns a `Promise` that resolves with a + [`Fetcher`](https://workers-types.pages.dev/experimental/#Fetcher) pointing to + the specified `workerName`. If `workerName` is not specified, defaults to the + entrypoint Worker. Note this `Fetcher` uses the experimental + [`service_binding_extra_handlers`](https://github.com/cloudflare/workerd/blob/1d9158af7ca1389474982c76ace9e248320bec77/src/workerd/io/compatibility-date.capnp#L290-L297) + compatibility flag to expose + [`scheduled()`](https://workers-types.pages.dev/experimental/#Fetcher.scheduled) + and [`queue()`](https://workers-types.pages.dev/experimental/#Fetcher.queue) + methods for dispatching `scheduled` and `queue` events. + +- `getCaches(): Promise` + + Returns a `Promise` that resolves with the + [`CacheStorage`](https://developers.cloudflare.com/workers/runtime-apis/cache/) + instance of the entrypoint Worker. This means if `cache: false` is set on the + entrypoint, calling methods on the resolved value won't do anything. + +- `getD1Database(bindingName: string, workerName?: string): Promise` + + Returns a `Promise` that resolves with the + [`D1Database`](https://developers.cloudflare.com/d1/platform/client-api/) + instance corresponding to the specified `bindingName` of `workerName`. Note + `bindingName` must not begin with `__D1_BETA__`. If `workerName` is not + specified, defaults to the entrypoint Worker. + +- `getDurableObjectNamespace(bindingName: string, workerName?: string): Promise` + + Returns a `Promise` that resolves with the + [`DurableObjectNamespace`](https://developers.cloudflare.com/workers/runtime-apis/durable-objects/#access-a-durable-object-from-a-worker) + instance corresponding to the specified `bindingName` of `workerName`. If + `workerName` is not specified, defaults to the entrypoint Worker. + +- `getKVNamespace(bindingName: string, workerName?: string): Promise` + + Returns a `Promise` that resolves with the + [`KVNamespace`](https://developers.cloudflare.com/workers/runtime-apis/kv/) + instance corresponding to the specified `bindingName` of `workerName`. If + `workerName` is not specified, defaults to the entrypoint Worker. + +- `getQueueProducer(bindingName: string, workerName?: string): Promise>` + + Returns a `Promise` that resolves with the + [`Queue`](https://developers.cloudflare.com/queues/platform/javascript-apis/) + producer instance corresponding to the specified `bindingName` of + `workerName`. If `workerName` is not specified, defaults to the entrypoint + Worker. + +- `getR2Bucket(bindingName: string, workerName?: string): Promise` + + Returns a `Promise` that resolves with the + [`R2Bucket`](https://developers.cloudflare.com/r2/api/workers/workers-api-reference/) + producer instance corresponding to the specified `bindingName` of + `workerName`. If `workerName` is not specified, defaults to the entrypoint + Worker. + +- `dispose(): Promise` + + Cleans up the Miniflare instance, and shuts down the `workerd` server. Note + that after this is called, `Miniflare#setOptions()` and + `Miniflare#dispatchFetch()` cannot be called. Additionally, calling this + function will invalidate any values returned by the `Miniflare#get*()` + methods, preventing them from being used. + +- `getCf(): Promise>` + + Returns the same object returned from incoming `Request`'s `cf` property. This + object depends on the `cf` property from `SharedOptions`. + +## Configuration + +### Local `workerd` + +You can override the `workerd` binary being used by miniflare with a your own local build by setting the `MINIFLARE_WORKERD_PATH` environment variable. + +For example: + +```shell +$ export MINIFLARE_WORKERD_PATH="/bazel-bin/src/workerd/server/workerd" +``` diff --git a/node_modules/miniflare/bootstrap.js b/node_modules/miniflare/bootstrap.js new file mode 100755 index 0000000..a5e8826 --- /dev/null +++ b/node_modules/miniflare/bootstrap.js @@ -0,0 +1,11 @@ +#!/usr/bin/env node +const { Log } = require("."); + +const log = new Log(); +log.error( + [ + "`miniflare@3` no longer includes a CLI. Please use `npx wrangler dev` instead.", + "As of `wrangler@3`, this will use Miniflare by default.", + "See https://miniflare.dev/get-started/migrating for more details.", + ].join("\n") +); diff --git a/node_modules/miniflare/dist/src/index.d.ts b/node_modules/miniflare/dist/src/index.d.ts new file mode 100644 index 0000000..238591c --- /dev/null +++ b/node_modules/miniflare/dist/src/index.d.ts @@ -0,0 +1,6609 @@ +import { Abortable } from 'events'; +import type { AbortSignal as AbortSignal_2 } from '@cloudflare/workers-types/experimental'; +import { Awaitable as Awaitable_2 } from '..'; +import type { Blob as Blob_2 } from '@cloudflare/workers-types/experimental'; +import { Blob as Blob_3 } from 'buffer'; +import { BodyInit } from 'undici'; +import type { CacheStorage } from '@cloudflare/workers-types/experimental'; +import { cspotcodeSourceMapSupport } from '@cspotcode/source-map-support'; +import type { D1Database } from '@cloudflare/workers-types/experimental'; +import type { DurableObjectNamespace } from '@cloudflare/workers-types/experimental'; +import { ExternalServer as ExternalServer_2 } from '../..'; +import { ExternalServer as ExternalServer_3 } from '..'; +import type { Fetcher } from '@cloudflare/workers-types/experimental'; +import { File as File_2 } from 'undici'; +import type { File as File_3 } from '@cloudflare/workers-types/experimental'; +import { FormData as FormData_2 } from 'undici'; +import { Headers as Headers_2 } from 'undici'; +import type { Headers as Headers_3 } from '@cloudflare/workers-types/experimental'; +import { HeadersInit } from 'undici'; +import http from 'http'; +import { IncomingRequestCfProperties } from '@cloudflare/workers-types/experimental'; +import { Json as Json_2 } from '..'; +import { kCurrentWorker as kCurrentWorker_2 } from '..'; +import { kUnsafeEphemeralUniqueKey as kUnsafeEphemeralUniqueKey_2 } from './shared'; +import type { KVNamespace } from '@cloudflare/workers-types/experimental'; +import type { KVNamespaceListKey } from '@cloudflare/workers-types/experimental'; +import { Log as Log_2 } from '..'; +import { Miniflare as Miniflare_2 } from '../..'; +import { Miniflare as Miniflare_3 } from '..'; +import { MixedModeConnectionString as MixedModeConnectionString_2 } from '..'; +import { MixedModeConnectionString as MixedModeConnectionString_3 } from './shared'; +import { MockAgent } from 'undici'; +import NodeWebSocket from 'ws'; +import { ParseParams } from 'zod'; +import { PeriodType as PeriodType_2 } from './ratelimit'; +import { Plugin as Plugin_2 } from './shared'; +import type { Queue } from '@cloudflare/workers-types/experimental'; +import type { R2Bucket } from '@cloudflare/workers-types/experimental'; +import { Readable } from 'stream'; +import type { ReadableStream as ReadableStream_2 } from '@cloudflare/workers-types/experimental'; +import { ReadableStream as ReadableStream_3 } from 'stream/web'; +import { ReferrerPolicy } from 'undici'; +import { Request as Request_3 } from '../..'; +import { Request as Request_4 } from 'undici'; +import type { Request as Request_5 } from '@cloudflare/workers-types/experimental'; +import { Request as Request_6 } from '..'; +import { RequestCache } from 'undici'; +import { RequestCredentials } from 'undici'; +import { RequestDestination } from 'undici'; +import { RequestDuplex } from 'undici'; +import { RequestInfo as RequestInfo_2 } from 'undici'; +import { RequestInit as RequestInit_3 } from 'undici'; +import type { RequestInit as RequestInit_4 } from '@cloudflare/workers-types/experimental'; +import type { RequestInitCfProperties } from '@cloudflare/workers-types/experimental'; +import { RequestMode } from 'undici'; +import { RequestRedirect } from 'undici'; +import { Response as Response_3 } from '../..'; +import { Response as Response_4 } from 'undici'; +import type { Response as Response_5 } from '@cloudflare/workers-types/experimental'; +import { Response as Response_6 } from '..'; +import { ResponseInit as ResponseInit_3 } from 'undici'; +import { ResponseRedirectStatus } from 'undici'; +import { ResponseType } from 'undici'; +import type { ServiceWorkerGlobalScope } from '@cloudflare/workers-types/experimental'; +import { compatibilityDate as supportedCompatibilityDate } from 'workerd'; +import { Transform } from 'stream'; +import * as undici from 'undici'; +import { URL as URL_2 } from 'url'; +import { z } from 'zod'; + +export declare class __MiniflareFunctionWrapper { + constructor(fnWithProps: ((...args: unknown[]) => unknown) & { + [key: string | symbol]: unknown; + }); +} + +export declare const AI_PLUGIN: Plugin; + +export declare const AI_PLUGIN_NAME = "ai"; + +export declare const AIOptionsSchema: z.ZodObject<{ + ai: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + mixedModeConnectionString: URL & { + __brand: "MixedModeConnectionString"; + }; + binding: string; + }, { + mixedModeConnectionString: URL & { + __brand: "MixedModeConnectionString"; + }; + binding: string; + }>>; +}, "strip", z.ZodTypeAny, { + ai?: { + mixedModeConnectionString: URL & { + __brand: "MixedModeConnectionString"; + }; + binding: string; + } | undefined; +}, { + ai?: { + mixedModeConnectionString: URL & { + __brand: "MixedModeConnectionString"; + }; + binding: string; + } | undefined; +}>; + +export declare const ANALYTICS_ENGINE_PLUGIN: Plugin; + +export declare const ANALYTICS_ENGINE_PLUGIN_NAME = "analytics-engine"; + +export declare const AnalyticsEngineSchemaOptionsSchema: z.ZodObject<{ + analyticsEngineDatasets: z.ZodOptional>>; +}, "strip", z.ZodTypeAny, { + analyticsEngineDatasets?: Record | undefined; +}, { + analyticsEngineDatasets?: Record | undefined; +}>; + +export declare const AnalyticsEngineSchemaSharedOptionsSchema: z.ZodObject<{ + analyticsEngineDatasetsPersist: z.ZodOptional]>>; +}, "strip", z.ZodTypeAny, { + analyticsEngineDatasetsPersist?: string | boolean | undefined; +}, { + analyticsEngineDatasetsPersist?: string | boolean | undefined; +}>; + +export declare type AnyHeaders = http.IncomingHttpHeaders | string[]; + +export declare type AssetReverseMap = { + [pathHash: string]: { + filePath: string; + contentType: string | null; + }; +}; + +export declare const ASSETS_PLUGIN: Plugin; + +export declare const AssetsOptionsSchema: z.ZodObject<{ + assets: z.ZodOptional; + directory: z.ZodEffects; + binding: z.ZodOptional; + routerConfig: z.ZodOptional; + script_id: z.ZodOptional; + debug: z.ZodOptional; + invoke_user_worker_ahead_of_assets: z.ZodOptional; + has_user_worker: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + account_id?: number; + script_id?: number; + debug?: boolean; + invoke_user_worker_ahead_of_assets?: boolean; + has_user_worker?: boolean; + }, { + account_id?: number; + script_id?: number; + debug?: boolean; + invoke_user_worker_ahead_of_assets?: boolean; + has_user_worker?: boolean; + }>>; + assetConfig: z.ZodOptional; + script_id: z.ZodOptional; + debug: z.ZodOptional; + compatibility_date: z.ZodOptional; + compatibility_flags: z.ZodOptional>; + html_handling: z.ZodOptional>; + not_found_handling: z.ZodOptional>; + redirects: z.ZodOptional; + staticRules: z.ZodRecord>; + rules: z.ZodRecord>; + }, "strip", z.ZodTypeAny, { + version?: 1; + staticRules?: Record; + rules?: Record; + }, { + version?: 1; + staticRules?: Record; + rules?: Record; + }>>; + headers: z.ZodOptional; + rules: z.ZodRecord>; + unset: z.ZodOptional>; + }, "strip", z.ZodTypeAny, { + set?: Record; + unset?: string[]; + }, { + set?: Record; + unset?: string[]; + }>>; + }, "strip", z.ZodTypeAny, { + version?: 2; + rules?: Record; + unset?: string[]; + }>; + }, { + version?: 2; + rules?: Record; + unset?: string[]; + }>; + }>>; + }, "compatibility_date" | "compatibility_flags">, "strip", z.ZodTypeAny, { + headers?: { + version?: 2; + rules?: Record; + unset?: string[]; + }>; + } | undefined; + debug?: boolean | undefined; + account_id?: number | undefined; + script_id?: number | undefined; + html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash" | undefined; + not_found_handling?: "none" | "single-page-application" | "404-page" | undefined; + redirects?: { + version?: 1; + staticRules?: Record; + rules?: Record; + } | undefined; + }, { + headers?: { + version?: 2; + rules?: Record; + unset?: string[]; + }>; + } | undefined; + debug?: boolean | undefined; + account_id?: number | undefined; + script_id?: number | undefined; + html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash" | undefined; + not_found_handling?: "none" | "single-page-application" | "404-page" | undefined; + redirects?: { + version?: 1; + staticRules?: Record; + rules?: Record; + } | undefined; + }>>; + }, "strip", z.ZodTypeAny, { + directory: string; + workerName?: string | undefined; + binding?: string | undefined; + routerConfig?: { + account_id?: number; + script_id?: number; + debug?: boolean; + invoke_user_worker_ahead_of_assets?: boolean; + has_user_worker?: boolean; + } | undefined; + assetConfig?: { + headers?: { + version?: 2; + rules?: Record; + unset?: string[]; + }>; + } | undefined; + debug?: boolean | undefined; + account_id?: number | undefined; + script_id?: number | undefined; + html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash" | undefined; + not_found_handling?: "none" | "single-page-application" | "404-page" | undefined; + redirects?: { + version?: 1; + staticRules?: Record; + rules?: Record; + } | undefined; + } | undefined; + }, { + directory: string; + workerName?: string | undefined; + binding?: string | undefined; + routerConfig?: { + account_id?: number; + script_id?: number; + debug?: boolean; + invoke_user_worker_ahead_of_assets?: boolean; + has_user_worker?: boolean; + } | undefined; + assetConfig?: { + headers?: { + version?: 2; + rules?: Record; + unset?: string[]; + }>; + } | undefined; + debug?: boolean | undefined; + account_id?: number | undefined; + script_id?: number | undefined; + html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash" | undefined; + not_found_handling?: "none" | "single-page-application" | "404-page" | undefined; + redirects?: { + version?: 1; + staticRules?: Record; + rules?: Record; + } | undefined; + } | undefined; + }>>; + compatibilityDate: z.ZodOptional; + compatibilityFlags: z.ZodOptional>; +}, "strip", z.ZodTypeAny, { + assets?: { + directory: string; + workerName?: string | undefined; + binding?: string | undefined; + routerConfig?: { + account_id?: number; + script_id?: number; + debug?: boolean; + invoke_user_worker_ahead_of_assets?: boolean; + has_user_worker?: boolean; + } | undefined; + assetConfig?: { + headers?: { + version?: 2; + rules?: Record; + unset?: string[]; + }>; + } | undefined; + debug?: boolean | undefined; + account_id?: number | undefined; + script_id?: number | undefined; + html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash" | undefined; + not_found_handling?: "none" | "single-page-application" | "404-page" | undefined; + redirects?: { + version?: 1; + staticRules?: Record; + rules?: Record; + } | undefined; + } | undefined; + } | undefined; + compatibilityDate?: string | undefined; + compatibilityFlags?: string[] | undefined; +}, { + assets?: { + directory: string; + workerName?: string | undefined; + binding?: string | undefined; + routerConfig?: { + account_id?: number; + script_id?: number; + debug?: boolean; + invoke_user_worker_ahead_of_assets?: boolean; + has_user_worker?: boolean; + } | undefined; + assetConfig?: { + headers?: { + version?: 2; + rules?: Record; + unset?: string[]; + }>; + } | undefined; + debug?: boolean | undefined; + account_id?: number | undefined; + script_id?: number | undefined; + html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash" | undefined; + not_found_handling?: "none" | "single-page-application" | "404-page" | undefined; + redirects?: { + version?: 1; + staticRules?: Record; + rules?: Record; + } | undefined; + } | undefined; + } | undefined; + compatibilityDate?: string | undefined; + compatibilityFlags?: string[] | undefined; +}>; + +export declare type Awaitable = T | Promise; + +export declare function base64Decode(encoded: string): string; + +export declare function base64Encode(value: string): string; + +export { BodyInit } + +export declare const BROWSER_RENDERING_PLUGIN: Plugin; + +export declare const BROWSER_RENDERING_PLUGIN_NAME = "browser-rendering"; + +export declare const BrowserRenderingOptionsSchema: z.ZodObject<{ + browserRendering: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + mixedModeConnectionString: URL & { + __brand: "MixedModeConnectionString"; + }; + binding: string; + }, { + mixedModeConnectionString: URL & { + __brand: "MixedModeConnectionString"; + }; + binding: string; + }>>; +}, "strip", z.ZodTypeAny, { + browserRendering?: { + mixedModeConnectionString: URL & { + __brand: "MixedModeConnectionString"; + }; + binding: string; + } | undefined; +}, { + browserRendering?: { + mixedModeConnectionString: URL & { + __brand: "MixedModeConnectionString"; + }; + binding: string; + } | undefined; +}>; + +/** + * The Asset Manifest and Asset Reverse Map are used to map a request path to an asset. + * 1. Hash path of request + * 2. Use this path hash to find the manifest entry + * 3. Get content hash from manifest entry + * 4a. In prod, use content hash to get asset from KV + * 4b. In dev, we fake out the KV store and use the file system instead. + * Use content hash to get file path from asset reverse map. + */ +export declare const buildAssetManifest: (dir: string) => Promise<{ + encodedAssetManifest: Uint8Array; + assetsReverseMap: AssetReverseMap; +}>; + +export declare const CACHE_PLUGIN: Plugin; + +export declare const CACHE_PLUGIN_NAME = "cache"; + +export declare const CacheBindings: { + readonly MAYBE_JSON_CACHE_WARN_USAGE: "MINIFLARE_CACHE_WARN_USAGE"; +}; + +export declare const CacheHeaders: { + readonly NAMESPACE: "cf-cache-namespace"; + readonly STATUS: "cf-cache-status"; +}; + +export declare interface CacheObjectCf { + miniflare?: { + cacheWarnUsage?: boolean; + }; +} + +export declare const CacheOptionsSchema: z.ZodObject<{ + cache: z.ZodOptional; + cacheWarnUsage: z.ZodOptional; +}, "strip", z.ZodTypeAny, { + cache?: boolean | undefined; + cacheWarnUsage?: boolean | undefined; +}, { + cache?: boolean | undefined; + cacheWarnUsage?: boolean | undefined; +}>; + +export declare const CacheSharedOptionsSchema: z.ZodObject<{ + cachePersist: z.ZodOptional]>>; +}, "strip", z.ZodTypeAny, { + cachePersist?: string | boolean | undefined; +}, { + cachePersist?: string | boolean | undefined; +}>; + +export declare class CloseEvent extends Event { + readonly code: number; + readonly reason: string; + readonly wasClean: boolean; + constructor(type: "close", init?: { + code?: number; + reason?: string; + wasClean?: boolean; + }); +} + +export declare interface CompiledModuleRule { + type: ModuleRuleType; + include: MatcherRegExps; +} + +export declare function compileModuleRules(rules: ModuleRule[]): CompiledModuleRule[]; + +export declare interface Config { + services?: Service[]; + sockets?: Socket[]; + v8Flags?: string[]; + extensions?: Extension[]; + autogates?: string[]; +} + +export declare const CORE_PLUGIN: Plugin; + +export declare const CORE_PLUGIN_NAME = "core"; + +export declare const CoreBindings: { + readonly SERVICE_LOOPBACK: "MINIFLARE_LOOPBACK"; + readonly SERVICE_USER_ROUTE_PREFIX: "MINIFLARE_USER_ROUTE_"; + readonly SERVICE_USER_FALLBACK: "MINIFLARE_USER_FALLBACK"; + readonly TEXT_CUSTOM_SERVICE: "MINIFLARE_CUSTOM_SERVICE"; + readonly IMAGES_SERVICE: "MINIFLARE_IMAGES_SERVICE"; + readonly TEXT_UPSTREAM_URL: "MINIFLARE_UPSTREAM_URL"; + readonly JSON_CF_BLOB: "CF_BLOB"; + readonly JSON_ROUTES: "MINIFLARE_ROUTES"; + readonly JSON_LOG_LEVEL: "MINIFLARE_LOG_LEVEL"; + readonly DATA_LIVE_RELOAD_SCRIPT: "MINIFLARE_LIVE_RELOAD_SCRIPT"; + readonly DURABLE_OBJECT_NAMESPACE_PROXY: "MINIFLARE_PROXY"; + readonly DATA_PROXY_SECRET: "MINIFLARE_PROXY_SECRET"; + readonly DATA_PROXY_SHARED_SECRET: "MINIFLARE_PROXY_SHARED_SECRET"; + readonly TRIGGER_HANDLERS: "TRIGGER_HANDLERS"; + readonly LOG_REQUESTS: "LOG_REQUESTS"; +}; + +export declare const CoreHeaders: { + readonly CUSTOM_SERVICE: "MF-Custom-Service"; + readonly ORIGINAL_URL: "MF-Original-URL"; + readonly PROXY_SHARED_SECRET: "MF-Proxy-Shared-Secret"; + readonly DISABLE_PRETTY_ERROR: "MF-Disable-Pretty-Error"; + readonly ERROR_STACK: "MF-Experimental-Error-Stack"; + readonly ROUTE_OVERRIDE: "MF-Route-Override"; + readonly CF_BLOB: "MF-CF-Blob"; + readonly OP_SECRET: "MF-Op-Secret"; + readonly OP: "MF-Op"; + readonly OP_TARGET: "MF-Op-Target"; + readonly OP_KEY: "MF-Op-Key"; + readonly OP_SYNC: "MF-Op-Sync"; + readonly OP_STRINGIFIED_SIZE: "MF-Op-Stringified-Size"; + readonly OP_RESULT_TYPE: "MF-Op-Result-Type"; +}; + +export declare const CoreOptionsSchema: z.ZodEffects; + path: z.ZodEffects; + contents: z.ZodOptional, z.ZodTypeDef, Uint8Array>]>>; + }, "strip", z.ZodTypeAny, { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + path: string; + contents?: string | Uint8Array | undefined; + }, { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + path: string; + contents?: string | Uint8Array | undefined; + }>, "many">; + modulesRoot: z.ZodOptional>; +}, "strip", z.ZodTypeAny, { + modules: { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + path: string; + contents?: string | Uint8Array | undefined; + }[]; + modulesRoot?: string | undefined; +}, { + modules: { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + path: string; + contents?: string | Uint8Array | undefined; + }[]; + modulesRoot?: string | undefined; +}>, z.ZodObject<{ + script: z.ZodString; + scriptPath: z.ZodOptional>; + modules: z.ZodOptional; + modulesRules: z.ZodOptional; + include: z.ZodArray; + fallthrough: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }, { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }>, "many">>; + modulesRoot: z.ZodOptional>; +}, "strip", z.ZodTypeAny, { + script: string; + scriptPath?: string | undefined; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; +}, { + script: string; + scriptPath?: string | undefined; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; +}>, z.ZodObject<{ + scriptPath: z.ZodEffects; + modules: z.ZodOptional; + modulesRules: z.ZodOptional; + include: z.ZodArray; + fallthrough: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }, { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }>, "many">>; + modulesRoot: z.ZodOptional>; +}, "strip", z.ZodTypeAny, { + scriptPath: string; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; +}, { + scriptPath: string; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; +}>]>, z.ZodObject<{ + name: z.ZodOptional; + rootPath: z.ZodOptional>; + compatibilityDate: z.ZodOptional; + compatibilityFlags: z.ZodOptional>; + unsafeInspectorProxy: z.ZodOptional; + routes: z.ZodOptional>; + bindings: z.ZodOptional>>; + wasmBindings: z.ZodOptional, z.ZodType, z.ZodTypeDef, Uint8Array>]>>>; + textBlobBindings: z.ZodOptional>>; + dataBlobBindings: z.ZodOptional, z.ZodType, z.ZodTypeDef, Uint8Array>]>>>; + serviceBindings: z.ZodOptional, z.ZodObject<{ + name: z.ZodUnion<[z.ZodString, z.ZodLiteral]>; + entrypoint: z.ZodOptional; + props: z.ZodOptional>; + mixedModeConnectionString: z.ZodOptional>; + }, "strip", z.ZodTypeAny, { + name: string | typeof kCurrentWorker; + entrypoint?: string | undefined; + props?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_2 | undefined; + }, { + name: string | typeof kCurrentWorker; + entrypoint?: string | undefined; + props?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_2 | undefined; + }>, z.ZodObject<{ + network: z.ZodObject<{ + allow: z.ZodOptional>; + deny: z.ZodOptional>; + tlsOptions: z.ZodOptional; + certificateChain: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + privateKey?: string | undefined; + certificateChain?: string | undefined; + }, { + privateKey?: string | undefined; + certificateChain?: string | undefined; + }>>; + requireClientCerts: z.ZodOptional; + trustBrowserCas: z.ZodOptional; + trustedCertificates: z.ZodOptional>; + minVersion: z.ZodOptional>; + cipherList: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + }, { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + }>>; + }, "strip", z.ZodTypeAny, { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }, { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }>; + }, "strip", z.ZodTypeAny, { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + }, { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + }>, z.ZodObject<{ + external: z.ZodType; + }, "strip", z.ZodTypeAny, { + external: ExternalServer_2 & (ExternalServer_2 | undefined); + }, { + external: ExternalServer_2 & (ExternalServer_2 | undefined); + }>, z.ZodObject<{ + disk: z.ZodObject<{ + path: z.ZodString; + writable: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + path: string; + writable?: boolean | undefined; + }, { + path: string; + writable?: boolean | undefined; + }>; + }, "strip", z.ZodTypeAny, { + disk: { + path: string; + writable?: boolean | undefined; + }; + }, { + disk: { + path: string; + writable?: boolean | undefined; + }; + }>, z.ZodType<(request: Request_3, mf: Miniflare_2) => Awaitable, z.ZodTypeDef, (request: Request_3, mf: Miniflare_2) => Awaitable>]>>>; + wrappedBindings: z.ZodOptional; + bindings: z.ZodOptional>>; + }, "strip", z.ZodTypeAny, { + scriptName: string; + entrypoint?: string | undefined; + bindings?: Record | undefined; + }, { + scriptName: string; + entrypoint?: string | undefined; + bindings?: Record | undefined; + }>]>>>; + outboundService: z.ZodOptional, z.ZodObject<{ + name: z.ZodUnion<[z.ZodString, z.ZodLiteral]>; + entrypoint: z.ZodOptional; + props: z.ZodOptional>; + mixedModeConnectionString: z.ZodOptional>; + }, "strip", z.ZodTypeAny, { + name: string | typeof kCurrentWorker; + entrypoint?: string | undefined; + props?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_2 | undefined; + }, { + name: string | typeof kCurrentWorker; + entrypoint?: string | undefined; + props?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_2 | undefined; + }>, z.ZodObject<{ + network: z.ZodObject<{ + allow: z.ZodOptional>; + deny: z.ZodOptional>; + tlsOptions: z.ZodOptional; + certificateChain: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + privateKey?: string | undefined; + certificateChain?: string | undefined; + }, { + privateKey?: string | undefined; + certificateChain?: string | undefined; + }>>; + requireClientCerts: z.ZodOptional; + trustBrowserCas: z.ZodOptional; + trustedCertificates: z.ZodOptional>; + minVersion: z.ZodOptional>; + cipherList: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + }, { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + }>>; + }, "strip", z.ZodTypeAny, { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }, { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }>; + }, "strip", z.ZodTypeAny, { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + }, { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + }>, z.ZodObject<{ + external: z.ZodType; + }, "strip", z.ZodTypeAny, { + external: ExternalServer_2 & (ExternalServer_2 | undefined); + }, { + external: ExternalServer_2 & (ExternalServer_2 | undefined); + }>, z.ZodObject<{ + disk: z.ZodObject<{ + path: z.ZodString; + writable: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + path: string; + writable?: boolean | undefined; + }, { + path: string; + writable?: boolean | undefined; + }>; + }, "strip", z.ZodTypeAny, { + disk: { + path: string; + writable?: boolean | undefined; + }; + }, { + disk: { + path: string; + writable?: boolean | undefined; + }; + }>, z.ZodType<(request: Request_3, mf: Miniflare_2) => Awaitable, z.ZodTypeDef, (request: Request_3, mf: Miniflare_2) => Awaitable>]>>; + fetchMock: z.ZodOptional, z.ZodTypeDef, MockAgent>>; + unsafeEphemeralDurableObjects: z.ZodOptional; + unsafeDirectSockets: z.ZodOptional; + port: z.ZodOptional; + entrypoint: z.ZodOptional; + proxy: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + host?: string | undefined; + port?: number | undefined; + entrypoint?: string | undefined; + proxy?: boolean | undefined; + }, { + host?: string | undefined; + port?: number | undefined; + entrypoint?: string | undefined; + proxy?: boolean | undefined; + }>, "many">>; + unsafeEvalBinding: z.ZodOptional; + unsafeUseModuleFallbackService: z.ZodOptional; + /** Used to set the vitest pool worker SELF binding to point to the Router Worker if there are assets. + (If there are assets but we're not using vitest, the miniflare entry worker can point directly to + Router Worker) + */ + hasAssetsAndIsVitest: z.ZodOptional; + tails: z.ZodOptional, z.ZodObject<{ + name: z.ZodUnion<[z.ZodString, z.ZodLiteral]>; + entrypoint: z.ZodOptional; + props: z.ZodOptional>; + mixedModeConnectionString: z.ZodOptional>; + }, "strip", z.ZodTypeAny, { + name: string | typeof kCurrentWorker; + entrypoint?: string | undefined; + props?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_2 | undefined; + }, { + name: string | typeof kCurrentWorker; + entrypoint?: string | undefined; + props?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_2 | undefined; + }>, z.ZodObject<{ + network: z.ZodObject<{ + allow: z.ZodOptional>; + deny: z.ZodOptional>; + tlsOptions: z.ZodOptional; + certificateChain: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + privateKey?: string | undefined; + certificateChain?: string | undefined; + }, { + privateKey?: string | undefined; + certificateChain?: string | undefined; + }>>; + requireClientCerts: z.ZodOptional; + trustBrowserCas: z.ZodOptional; + trustedCertificates: z.ZodOptional>; + minVersion: z.ZodOptional>; + cipherList: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + }, { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + }>>; + }, "strip", z.ZodTypeAny, { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }, { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }>; + }, "strip", z.ZodTypeAny, { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + }, { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + }>, z.ZodObject<{ + external: z.ZodType; + }, "strip", z.ZodTypeAny, { + external: ExternalServer_2 & (ExternalServer_2 | undefined); + }, { + external: ExternalServer_2 & (ExternalServer_2 | undefined); + }>, z.ZodObject<{ + disk: z.ZodObject<{ + path: z.ZodString; + writable: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + path: string; + writable?: boolean | undefined; + }, { + path: string; + writable?: boolean | undefined; + }>; + }, "strip", z.ZodTypeAny, { + disk: { + path: string; + writable?: boolean | undefined; + }; + }, { + disk: { + path: string; + writable?: boolean | undefined; + }; + }>, z.ZodType<(request: Request_3, mf: Miniflare_2) => Awaitable, z.ZodTypeDef, (request: Request_3, mf: Miniflare_2) => Awaitable>]>, "many">>; + stripCfConnectingIp: z.ZodDefault; +}, "strip", z.ZodTypeAny, { + stripCfConnectingIp: boolean; + name?: string | undefined; + rootPath?: undefined; + compatibilityDate?: string | undefined; + compatibilityFlags?: string[] | undefined; + unsafeInspectorProxy?: boolean | undefined; + routes?: string[] | undefined; + bindings?: Record | undefined; + wasmBindings?: Record> | undefined; + textBlobBindings?: Record | undefined; + dataBlobBindings?: Record> | undefined; + serviceBindings?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_2 | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_2 & (ExternalServer_2 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_3, mf: Miniflare_2) => Awaitable)> | undefined; + wrappedBindings?: Record | undefined; + }> | undefined; + outboundService?: string | typeof kCurrentWorker | { + name: string | typeof kCurrentWorker; + entrypoint?: string | undefined; + props?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_2 | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_2 & (ExternalServer_2 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_3, mf: Miniflare_2) => Awaitable) | undefined; + fetchMock?: MockAgent | undefined; + unsafeEphemeralDurableObjects?: boolean | undefined; + unsafeDirectSockets?: { + host?: string | undefined; + port?: number | undefined; + entrypoint?: string | undefined; + proxy?: boolean | undefined; + }[] | undefined; + unsafeEvalBinding?: string | undefined; + unsafeUseModuleFallbackService?: boolean | undefined; + hasAssetsAndIsVitest?: boolean | undefined; + tails?: (string | typeof kCurrentWorker | { + name: string | typeof kCurrentWorker; + entrypoint?: string | undefined; + props?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_2 | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_2 & (ExternalServer_2 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_3, mf: Miniflare_2) => Awaitable))[] | undefined; +}, { + name?: string | undefined; + rootPath?: string | undefined; + compatibilityDate?: string | undefined; + compatibilityFlags?: string[] | undefined; + unsafeInspectorProxy?: boolean | undefined; + routes?: string[] | undefined; + bindings?: Record | undefined; + wasmBindings?: Record> | undefined; + textBlobBindings?: Record | undefined; + dataBlobBindings?: Record> | undefined; + serviceBindings?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_2 | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_2 & (ExternalServer_2 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_3, mf: Miniflare_2) => Awaitable)> | undefined; + wrappedBindings?: Record | undefined; + }> | undefined; + outboundService?: string | typeof kCurrentWorker | { + name: string | typeof kCurrentWorker; + entrypoint?: string | undefined; + props?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_2 | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_2 & (ExternalServer_2 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_3, mf: Miniflare_2) => Awaitable) | undefined; + fetchMock?: MockAgent | undefined; + unsafeEphemeralDurableObjects?: boolean | undefined; + unsafeDirectSockets?: { + host?: string | undefined; + port?: number | undefined; + entrypoint?: string | undefined; + proxy?: boolean | undefined; + }[] | undefined; + unsafeEvalBinding?: string | undefined; + unsafeUseModuleFallbackService?: boolean | undefined; + hasAssetsAndIsVitest?: boolean | undefined; + tails?: (string | typeof kCurrentWorker | { + name: string | typeof kCurrentWorker; + entrypoint?: string | undefined; + props?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_2 | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_2 & (ExternalServer_2 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_3, mf: Miniflare_2) => Awaitable))[] | undefined; + stripCfConnectingIp?: boolean | undefined; +}>>, ({ + modules: { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + path: string; + contents?: string | Uint8Array | undefined; + }[]; + modulesRoot?: string | undefined; +} & { + stripCfConnectingIp: boolean; + name?: string | undefined; + rootPath?: undefined; + compatibilityDate?: string | undefined; + compatibilityFlags?: string[] | undefined; + unsafeInspectorProxy?: boolean | undefined; + routes?: string[] | undefined; + bindings?: Record | undefined; + wasmBindings?: Record> | undefined; + textBlobBindings?: Record | undefined; + dataBlobBindings?: Record> | undefined; + serviceBindings?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_2 | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_2 & (ExternalServer_2 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_3, mf: Miniflare_2) => Awaitable)> | undefined; + wrappedBindings?: Record | undefined; + }> | undefined; + outboundService?: string | typeof kCurrentWorker | { + name: string | typeof kCurrentWorker; + entrypoint?: string | undefined; + props?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_2 | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_2 & (ExternalServer_2 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_3, mf: Miniflare_2) => Awaitable) | undefined; + fetchMock?: MockAgent | undefined; + unsafeEphemeralDurableObjects?: boolean | undefined; + unsafeDirectSockets?: { + host?: string | undefined; + port?: number | undefined; + entrypoint?: string | undefined; + proxy?: boolean | undefined; + }[] | undefined; + unsafeEvalBinding?: string | undefined; + unsafeUseModuleFallbackService?: boolean | undefined; + hasAssetsAndIsVitest?: boolean | undefined; + tails?: (string | typeof kCurrentWorker | { + name: string | typeof kCurrentWorker; + entrypoint?: string | undefined; + props?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_2 | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_2 & (ExternalServer_2 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_3, mf: Miniflare_2) => Awaitable))[] | undefined; +}) | ({ + script: string; + scriptPath?: string | undefined; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; +} & { + stripCfConnectingIp: boolean; + name?: string | undefined; + rootPath?: undefined; + compatibilityDate?: string | undefined; + compatibilityFlags?: string[] | undefined; + unsafeInspectorProxy?: boolean | undefined; + routes?: string[] | undefined; + bindings?: Record | undefined; + wasmBindings?: Record> | undefined; + textBlobBindings?: Record | undefined; + dataBlobBindings?: Record> | undefined; + serviceBindings?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_2 | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_2 & (ExternalServer_2 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_3, mf: Miniflare_2) => Awaitable)> | undefined; + wrappedBindings?: Record | undefined; + }> | undefined; + outboundService?: string | typeof kCurrentWorker | { + name: string | typeof kCurrentWorker; + entrypoint?: string | undefined; + props?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_2 | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_2 & (ExternalServer_2 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_3, mf: Miniflare_2) => Awaitable) | undefined; + fetchMock?: MockAgent | undefined; + unsafeEphemeralDurableObjects?: boolean | undefined; + unsafeDirectSockets?: { + host?: string | undefined; + port?: number | undefined; + entrypoint?: string | undefined; + proxy?: boolean | undefined; + }[] | undefined; + unsafeEvalBinding?: string | undefined; + unsafeUseModuleFallbackService?: boolean | undefined; + hasAssetsAndIsVitest?: boolean | undefined; + tails?: (string | typeof kCurrentWorker | { + name: string | typeof kCurrentWorker; + entrypoint?: string | undefined; + props?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_2 | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_2 & (ExternalServer_2 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_3, mf: Miniflare_2) => Awaitable))[] | undefined; +}) | ({ + scriptPath: string; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; +} & { + stripCfConnectingIp: boolean; + name?: string | undefined; + rootPath?: undefined; + compatibilityDate?: string | undefined; + compatibilityFlags?: string[] | undefined; + unsafeInspectorProxy?: boolean | undefined; + routes?: string[] | undefined; + bindings?: Record | undefined; + wasmBindings?: Record> | undefined; + textBlobBindings?: Record | undefined; + dataBlobBindings?: Record> | undefined; + serviceBindings?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_2 | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_2 & (ExternalServer_2 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_3, mf: Miniflare_2) => Awaitable)> | undefined; + wrappedBindings?: Record | undefined; + }> | undefined; + outboundService?: string | typeof kCurrentWorker | { + name: string | typeof kCurrentWorker; + entrypoint?: string | undefined; + props?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_2 | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_2 & (ExternalServer_2 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_3, mf: Miniflare_2) => Awaitable) | undefined; + fetchMock?: MockAgent | undefined; + unsafeEphemeralDurableObjects?: boolean | undefined; + unsafeDirectSockets?: { + host?: string | undefined; + port?: number | undefined; + entrypoint?: string | undefined; + proxy?: boolean | undefined; + }[] | undefined; + unsafeEvalBinding?: string | undefined; + unsafeUseModuleFallbackService?: boolean | undefined; + hasAssetsAndIsVitest?: boolean | undefined; + tails?: (string | typeof kCurrentWorker | { + name: string | typeof kCurrentWorker; + entrypoint?: string | undefined; + props?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_2 | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_2 & (ExternalServer_2 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_3, mf: Miniflare_2) => Awaitable))[] | undefined; +}), ({ + modules: { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + path: string; + contents?: string | Uint8Array | undefined; + }[]; + modulesRoot?: string | undefined; +} | { + script: string; + scriptPath?: string | undefined; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; +} | { + scriptPath: string; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; +}) & { + name?: string | undefined; + rootPath?: string | undefined; + compatibilityDate?: string | undefined; + compatibilityFlags?: string[] | undefined; + unsafeInspectorProxy?: boolean | undefined; + routes?: string[] | undefined; + bindings?: Record | undefined; + wasmBindings?: Record> | undefined; + textBlobBindings?: Record | undefined; + dataBlobBindings?: Record> | undefined; + serviceBindings?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_2 | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_2 & (ExternalServer_2 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_3, mf: Miniflare_2) => Awaitable)> | undefined; + wrappedBindings?: Record | undefined; + }> | undefined; + outboundService?: string | typeof kCurrentWorker | { + name: string | typeof kCurrentWorker; + entrypoint?: string | undefined; + props?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_2 | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_2 & (ExternalServer_2 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_3, mf: Miniflare_2) => Awaitable) | undefined; + fetchMock?: MockAgent | undefined; + unsafeEphemeralDurableObjects?: boolean | undefined; + unsafeDirectSockets?: { + host?: string | undefined; + port?: number | undefined; + entrypoint?: string | undefined; + proxy?: boolean | undefined; + }[] | undefined; + unsafeEvalBinding?: string | undefined; + unsafeUseModuleFallbackService?: boolean | undefined; + hasAssetsAndIsVitest?: boolean | undefined; + tails?: (string | typeof kCurrentWorker | { + name: string | typeof kCurrentWorker; + entrypoint?: string | undefined; + props?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_2 | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_2 & (ExternalServer_2 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_3, mf: Miniflare_2) => Awaitable))[] | undefined; + stripCfConnectingIp?: boolean | undefined; +}>; + +export declare const CoreSharedOptionsSchema: z.ZodObject<{ + rootPath: z.ZodOptional>; + host: z.ZodOptional; + port: z.ZodOptional; + https: z.ZodOptional; + httpsKey: z.ZodOptional; + httpsKeyPath: z.ZodOptional; + httpsCert: z.ZodOptional; + httpsCertPath: z.ZodOptional; + inspectorPort: z.ZodOptional; + verbose: z.ZodOptional; + log: z.ZodOptional>; + handleRuntimeStdio: z.ZodOptional, z.ZodType], null>, z.ZodUnknown>>; + upstream: z.ZodOptional; + cf: z.ZodOptional]>>; + liveReload: z.ZodOptional; + unsafeProxySharedSecret: z.ZodOptional; + unsafeModuleFallbackService: z.ZodOptional Awaitable, z.ZodTypeDef, (request: Request_3, mf: Miniflare_2) => Awaitable>>; + unsafeStickyBlobs: z.ZodOptional; + unsafeTriggerHandlers: z.ZodOptional; + logRequests: z.ZodDefault; +}, "strip", z.ZodTypeAny, { + logRequests: boolean; + rootPath?: undefined; + host?: string | undefined; + port?: number | undefined; + https?: boolean | undefined; + httpsKey?: string | undefined; + httpsKeyPath?: string | undefined; + httpsCert?: string | undefined; + httpsCertPath?: string | undefined; + inspectorPort?: number | undefined; + verbose?: boolean | undefined; + log?: Log | undefined; + handleRuntimeStdio?: ((args_0: Readable, args_1: Readable) => unknown) | undefined; + upstream?: string | undefined; + cf?: string | boolean | Record | undefined; + liveReload?: boolean | undefined; + unsafeProxySharedSecret?: string | undefined; + unsafeModuleFallbackService?: ((request: Request_3, mf: Miniflare_2) => Awaitable) | undefined; + unsafeStickyBlobs?: boolean | undefined; + unsafeTriggerHandlers?: boolean | undefined; +}, { + rootPath?: string | undefined; + host?: string | undefined; + port?: number | undefined; + https?: boolean | undefined; + httpsKey?: string | undefined; + httpsKeyPath?: string | undefined; + httpsCert?: string | undefined; + httpsCertPath?: string | undefined; + inspectorPort?: number | undefined; + verbose?: boolean | undefined; + log?: Log | undefined; + handleRuntimeStdio?: ((args_0: Readable, args_1: Readable) => unknown) | undefined; + upstream?: string | undefined; + cf?: string | boolean | Record | undefined; + liveReload?: boolean | undefined; + unsafeProxySharedSecret?: string | undefined; + unsafeModuleFallbackService?: ((request: Request_3, mf: Miniflare_2) => Awaitable) | undefined; + unsafeStickyBlobs?: boolean | undefined; + unsafeTriggerHandlers?: boolean | undefined; + logRequests?: boolean | undefined; +}>; + +export declare function coupleWebSocket(ws: NodeWebSocket, pair: WebSocket): Promise; + +export declare function createFetchMock(): MockAgent; + +export declare function createHTTPReducers(impl: PlatformImpl): ReducersRevivers; + +export declare function createHTTPRevivers(impl: PlatformImpl): ReducersRevivers; + +export declare const D1_PLUGIN: Plugin; + +export declare const D1_PLUGIN_NAME = "d1"; + +export declare const D1OptionsSchema: z.ZodObject<{ + d1Databases: z.ZodOptional, z.ZodRecord>; + }, "strip", z.ZodTypeAny, { + id: string; + mixedModeConnectionString?: MixedModeConnectionString | undefined; + }, { + id: string; + mixedModeConnectionString?: MixedModeConnectionString | undefined; + }>>, z.ZodArray]>>; +}, "strip", z.ZodTypeAny, { + d1Databases?: string[] | Record | Record | undefined; +}, { + d1Databases?: string[] | Record | Record | undefined; +}>; + +export declare const D1SharedOptionsSchema: z.ZodObject<{ + d1Persist: z.ZodOptional]>>; +}, "strip", z.ZodTypeAny, { + d1Persist?: string | boolean | undefined; +}, { + d1Persist?: string | boolean | undefined; +}>; + +export declare function decodeSitesKey(key: string): string; + +export declare const DEFAULT_PERSIST_ROOT = ".mf"; + +export declare class DeferredPromise extends Promise { + readonly resolve: DeferredPromiseResolve; + readonly reject: DeferredPromiseReject; + constructor(executor?: (resolve: (value: T | PromiseLike) => void, reject: (reason?: any) => void) => void); +} + +export declare type DeferredPromiseReject = (reason?: any) => void; + +export declare type DeferredPromiseResolve = (value: T | PromiseLike) => void; + +export declare function deserialiseRegExps(matcher: SerialisableMatcherRegExps): MatcherRegExps; + +export declare function deserialiseSiteRegExps(siteRegExps: SerialisableSiteMatcherRegExps): SiteMatcherRegExps; + +export declare interface DiskDirectory { + path?: string; + writable?: boolean; + allowDotfiles?: boolean; +} + +export declare const DISPATCH_NAMESPACE_PLUGIN: Plugin; + +export declare const DISPATCH_NAMESPACE_PLUGIN_NAME = "dispatch-namespace"; + +export declare type DispatchFetch = (input: RequestInfo, init?: RequestInit_2>) => Promise; + +/** + * Dispatcher created for each `dispatchFetch()` call. Ensures request origin + * in Worker matches that passed to `dispatchFetch()`, not the address the + * `workerd` server is listening on. Handles cases where `fetch()` redirects to + * same origin and different external origins. + */ +export declare class DispatchFetchDispatcher extends undici.Dispatcher { + private readonly globalDispatcher; + private readonly runtimeDispatcher; + private readonly actualRuntimeOrigin; + private readonly userRuntimeOrigin; + private readonly cfBlobJson?; + /** + * @param globalDispatcher Dispatcher to use for all non-runtime requests + * (rejects unauthorised certificates) + * @param runtimeDispatcher Dispatcher to use for runtime requests + * (permits unauthorised certificates) + * @param actualRuntimeOrigin Origin to send all runtime requests to + * @param userRuntimeOrigin Origin to treat as runtime request + * (initial URL passed by user to `dispatchFetch()`) + * @param cfBlob `request.cf` blob override for runtime requests + */ + constructor(globalDispatcher: undici.Dispatcher, runtimeDispatcher: undici.Dispatcher, actualRuntimeOrigin: string, userRuntimeOrigin: string, cfBlob?: IncomingRequestCfProperties); + addHeaders(headers: AnyHeaders, path: string): void; + dispatch(options: undici.Dispatcher.DispatchOptions, handler: undici.Dispatcher.DispatchHandlers): boolean; + close(): Promise; + close(callback: () => void): void; + destroy(): Promise; + destroy(err: Error | null): Promise; + destroy(callback: () => void): void; + destroy(err: Error | null, callback: () => void): void; + get isMockActive(): boolean; +} + +export declare const DispatchNamespaceOptionsSchema: z.ZodObject<{ + dispatchNamespaces: z.ZodOptional>; + }, "strip", z.ZodTypeAny, { + namespace: string; + mixedModeConnectionString?: MixedModeConnectionString | undefined; + }, { + namespace: string; + mixedModeConnectionString?: MixedModeConnectionString | undefined; + }>>>; +}, "strip", z.ZodTypeAny, { + dispatchNamespaces?: Record | undefined; +}, { + dispatchNamespaces?: Record | undefined; +}>; + +export declare const DURABLE_OBJECTS_PLUGIN: Plugin; + +export declare const DURABLE_OBJECTS_PLUGIN_NAME = "do"; + +export declare const DURABLE_OBJECTS_STORAGE_SERVICE_NAME = "do:storage"; + +export declare type DurableObjectClassNames = Map>; + +export declare const DurableObjectsOptionsSchema: z.ZodObject<{ + durableObjects: z.ZodOptional; + useSQLite: z.ZodOptional; + unsafeUniqueKey: z.ZodOptional]>>; + unsafePreventEviction: z.ZodOptional; + mixedModeConnectionString: z.ZodOptional>; + }, "strip", z.ZodTypeAny, { + className: string; + scriptName?: string | undefined; + useSQLite?: boolean | undefined; + unsafeUniqueKey?: string | typeof kUnsafeEphemeralUniqueKey | undefined; + unsafePreventEviction?: boolean | undefined; + mixedModeConnectionString?: MixedModeConnectionString | undefined; + }, { + className: string; + scriptName?: string | undefined; + useSQLite?: boolean | undefined; + unsafeUniqueKey?: string | typeof kUnsafeEphemeralUniqueKey | undefined; + unsafePreventEviction?: boolean | undefined; + mixedModeConnectionString?: MixedModeConnectionString | undefined; + }>]>>>; +}, "strip", z.ZodTypeAny, { + durableObjects?: Record | undefined; +}, { + durableObjects?: Record | undefined; +}>; + +export declare const DurableObjectsSharedOptionsSchema: z.ZodObject<{ + durableObjectsPersist: z.ZodOptional]>>; +}, "strip", z.ZodTypeAny, { + durableObjectsPersist?: string | boolean | undefined; +}, { + durableObjectsPersist?: string | boolean | undefined; +}>; + +export declare const EMAIL_PLUGIN: Plugin; + +export declare const EMAIL_PLUGIN_NAME = "email"; + +export declare const EmailOptionsSchema: z.ZodObject<{ + email: z.ZodOptional, z.ZodUnion<[z.ZodObject<{ + destination_address: z.ZodOptional; + allowed_destination_addresses: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + destination_address?: string | undefined; + allowed_destination_addresses?: undefined; + }, { + destination_address?: string | undefined; + allowed_destination_addresses?: undefined; + }>, z.ZodObject<{ + allowed_destination_addresses: z.ZodOptional>; + destination_address: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + allowed_destination_addresses?: string[] | undefined; + destination_address?: undefined; + }, { + allowed_destination_addresses?: string[] | undefined; + destination_address?: undefined; + }>]>>, "many">>; + }, "strip", z.ZodTypeAny, { + send_email?: ({ + name: string; + } & ({ + destination_address?: string | undefined; + allowed_destination_addresses?: undefined; + } | { + allowed_destination_addresses?: string[] | undefined; + destination_address?: undefined; + }))[] | undefined; + }, { + send_email?: ({ + name: string; + } & ({ + destination_address?: string | undefined; + allowed_destination_addresses?: undefined; + } | { + allowed_destination_addresses?: string[] | undefined; + destination_address?: undefined; + }))[] | undefined; + }>>; +}, "strip", z.ZodTypeAny, { + email?: { + send_email?: ({ + name: string; + } & ({ + destination_address?: string | undefined; + allowed_destination_addresses?: undefined; + } | { + allowed_destination_addresses?: string[] | undefined; + destination_address?: undefined; + }))[] | undefined; + } | undefined; +}, { + email?: { + send_email?: ({ + name: string; + } & ({ + destination_address?: string | undefined; + allowed_destination_addresses?: undefined; + } | { + allowed_destination_addresses?: string[] | undefined; + destination_address?: undefined; + }))[] | undefined; + } | undefined; +}>; + +/* Excluded from this release type: _enableControlEndpoints */ + +export declare function encodeSitesKey(key: string): string; + +export declare class ErrorEvent extends Event { + readonly error: Error | null; + constructor(type: "error", init?: { + error?: Error; + }); +} + +export declare interface Extension { + modules?: Extension_Module[]; +} + +export declare interface Extension_Module { + name?: string; + internal?: boolean; + esModule?: string; +} + +export declare type ExternalServer = { + address?: string; +} & ({ + http: HttpOptions; +} | { + https: ExternalServer_Https; +} | { + tcp: ExternalServer_Tcp; +}); + +export declare interface ExternalServer_Https { + options?: HttpOptions; + tlsOptions?: TlsOptions; + certificateHost?: string; +} + +export declare interface ExternalServer_Tcp { + tlsOptions?: TlsOptions; + certificateHost?: string; +} + +declare function fetch_2(input: RequestInfo, init?: RequestInit_2 | Request_2): Promise; +export { fetch_2 as fetch } + +export { File_2 as File } + +export declare function _forceColour(enabled?: boolean): void; + +export declare function formatZodError(error: z.ZodError, input: unknown): string; + +export { FormData_2 as FormData } + +export declare function getAccessibleHosts(ipv4Only?: boolean): string[]; + +export declare function getAssetsBindingsNames(assetsKVBindingName?: string, assetsManifestBindingName?: string): { + readonly ASSETS_KV_NAMESPACE: string; + readonly ASSETS_MANIFEST: string; +}; + +export declare function getCacheServiceName(workerIndex: number): string; + +export declare function getDirectSocketName(workerIndex: number, entrypoint: string): string; + +export declare function getEntrySocketHttpOptions(coreOpts: z.infer): Promise<{ + http: HttpOptions; +} | { + https: Socket_Https; +}>; + +export declare function getFreshSourceMapSupport(): cspotcodeSourceMapSupport; + +export declare function getGlobalServices({ sharedOptions, allWorkerRoutes, fallbackWorkerName, loopbackPort, log, proxyBindings, }: GlobalServicesOptions): Service[]; + +export declare function getMiniflareObjectBindings(unsafeStickyBlobs: boolean): Worker_Binding[]; + +/** + * Computes the Node.js compatibility mode we are running. + * + * NOTES: + * - The v2 mode is configured via `nodejs_compat_v2` compat flag or via `nodejs_compat` plus a compatibility date of Sept 23rd. 2024 or later. + * - See `EnvironmentInheritable` for `nodeCompat` and `noBundle`. + * + * @param compatibilityDateStr The compatibility date + * @param compatibilityFlags The compatibility flags + * @returns the mode and flags to indicate specific configuration for validating. + */ +export declare function getNodeCompat(compatibilityDate: string | undefined, // Default to some arbitrary old date +compatibilityFlags: string[]): { + mode: NodeJSCompatMode; + hasNodejsAlsFlag: boolean; + hasNodejsCompatFlag: boolean; + hasNodejsCompatV2Flag: boolean; + hasNoNodejsCompatV2Flag: boolean; + hasExperimentalNodejsCompatV2Flag: boolean; +}; + +export declare function getPersistPath(pluginName: string, tmpPath: string, persist: Persistence): string; + +export declare function getRootPath(opts: unknown): string; + +export declare interface GlobalServicesOptions { + sharedOptions: z.infer; + allWorkerRoutes: Map; + fallbackWorkerName: string | undefined; + loopbackPort: number; + log: Log; + proxyBindings: Worker_Binding[]; +} + +export declare function globsToRegExps(globs?: string[]): MatcherRegExps; + +export { Headers_2 as Headers } + +export { HeadersInit } + +export declare const HOST_CAPNP_CONNECT = "miniflare-unsafe-internal-capnp-connect"; + +export declare interface HttpOptions { + style?: HttpOptions_Style; + forwardedProtoHeader?: string; + cfBlobHeader?: string; + injectRequestHeaders?: HttpOptions_Header[]; + injectResponseHeaders?: HttpOptions_Header[]; + capnpConnectHost?: string; +} + +export declare interface HttpOptions_Header { + name?: string; + value?: string; +} + +export declare const HttpOptions_Style: { + readonly HOST: 0; + readonly PROXY: 1; +}; + +export declare type HttpOptions_Style = (typeof HttpOptions_Style)[keyof typeof HttpOptions_Style]; + +export declare const HYPERDRIVE_PLUGIN: Plugin; + +export declare const HYPERDRIVE_PLUGIN_NAME = "hyperdrive"; + +export declare const HyperdriveInputOptionsSchema: z.ZodObject<{ + hyperdrives: z.ZodOptional]>, URL_2, string | URL_2>>>; +}, "strip", z.ZodTypeAny, { + hyperdrives?: Record | undefined; +}, { + hyperdrives?: Record | undefined; +}>; + +export declare const HyperdriveSchema: z.ZodEffects]>, URL_2, string | URL_2>; + +export declare const IMAGES_PLUGIN: Plugin; + +export declare const IMAGES_PLUGIN_NAME = "images"; + +export declare const ImagesOptionsSchema: z.ZodObject<{ + images: z.ZodOptional>; + }, "strip", z.ZodTypeAny, { + binding: string; + mixedModeConnectionString?: MixedModeConnectionString | undefined; + }, { + binding: string; + mixedModeConnectionString?: MixedModeConnectionString | undefined; + }>>; +}, "strip", z.ZodTypeAny, { + images?: { + binding: string; + mixedModeConnectionString?: MixedModeConnectionString | undefined; + } | undefined; +}, { + images?: { + binding: string; + mixedModeConnectionString?: MixedModeConnectionString | undefined; + } | undefined; +}>; + +export declare interface InclusiveRange { + start: number; + end: number; +} + +/* Excluded from this release type: _initialiseInstanceRegistry */ + +/* Excluded from this release type: _isCyclic */ + +export declare function isFetcherFetch(targetName: string, key: string): boolean; + +export declare function isR2ObjectWriteHttpMetadata(targetName: string, key: string): boolean; + +export declare function isSitesRequest(request: { + url: string; +}): boolean; + +export declare type Json = Literal | { + [key: string]: Json; +} | Json[]; + +export declare interface JsonError { + message?: string; + name?: string; + stack?: string; + cause?: JsonError; +} + +export declare const JsonSchema: z.ZodType; + +declare const kAccepted: unique symbol; + +declare const kCf: unique symbol; + +declare const kClose: unique symbol; + +declare const kClosedIncoming: unique symbol; + +declare const kClosedOutgoing: unique symbol; + +declare const kCoupled: unique symbol; + +export declare const kCurrentWorker: unique symbol; + +declare const kError: unique symbol; + +export declare const kInspectorSocket: unique symbol; + +declare const kPair: unique symbol; + +declare const kSend: unique symbol; + +export declare const kUnsafeEphemeralUniqueKey: unique symbol; + +export declare const KV_PLUGIN: Plugin; + +export declare const KV_PLUGIN_NAME = "kv"; + +export declare const KVHeaders: { + readonly EXPIRATION: "CF-Expiration"; + readonly METADATA: "CF-KV-Metadata"; +}; + +export declare const KVLimits: { + readonly MIN_CACHE_TTL: 60; + readonly MAX_LIST_KEYS: 1000; + readonly MAX_KEY_SIZE: 512; + readonly MAX_VALUE_SIZE: number; + readonly MAX_VALUE_SIZE_TEST: 1024; + readonly MAX_METADATA_SIZE: 1024; + readonly MAX_BULK_SIZE: number; +}; + +export declare const kVoid: unique symbol; + +export declare const KVOptionsSchema: z.ZodObject<{ + kvNamespaces: z.ZodOptional, z.ZodRecord>; + }, "strip", z.ZodTypeAny, { + id: string; + mixedModeConnectionString?: MixedModeConnectionString | undefined; + }, { + id: string; + mixedModeConnectionString?: MixedModeConnectionString | undefined; + }>>, z.ZodArray]>>; + sitePath: z.ZodOptional>; + siteInclude: z.ZodOptional>; + siteExclude: z.ZodOptional>; +}, "strip", z.ZodTypeAny, { + kvNamespaces?: string[] | Record | Record | undefined; + sitePath?: string | undefined; + siteInclude?: string[] | undefined; + siteExclude?: string[] | undefined; +}, { + kvNamespaces?: string[] | Record | Record | undefined; + sitePath?: string | undefined; + siteInclude?: string[] | undefined; + siteExclude?: string[] | undefined; +}>; + +export declare const KVParams: { + readonly URL_ENCODED: "urlencoded"; + readonly CACHE_TTL: "cache_ttl"; + readonly EXPIRATION: "expiration"; + readonly EXPIRATION_TTL: "expiration_ttl"; + readonly LIST_LIMIT: "key_count_limit"; + readonly LIST_PREFIX: "prefix"; + readonly LIST_CURSOR: "cursor"; +}; + +export declare const KVSharedOptionsSchema: z.ZodObject<{ + kvPersist: z.ZodOptional]>>; +}, "strip", z.ZodTypeAny, { + kvPersist?: string | boolean | undefined; +}, { + kvPersist?: string | boolean | undefined; +}>; + +declare const kWebSocket: unique symbol; + +export declare type Literal = z.infer; + +export declare const LiteralSchema: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>; + +export declare class Log { + #private; + readonly level: LogLevel; + constructor(level?: LogLevel, opts?: LogOptions); + protected log(message: string): void; + static unstable_registerBeforeLogHook(callback: (() => void) | undefined): void; + static unstable_registerAfterLogHook(callback: (() => void) | undefined): void; + logWithLevel(level: LogLevel, message: string): void; + error(message: Error): void; + warn(message: string): void; + info(message: string): void; + debug(message: string): void; + verbose(message: string): void; +} + +export declare enum LogLevel { + NONE = 0, + ERROR = 1, + WARN = 2, + INFO = 3, + DEBUG = 4, + VERBOSE = 5 +} + +export declare interface LogOptions { + prefix?: string; + suffix?: string; +} + +export declare type ManifestEntry = { + pathHash: Uint8Array; + contentHash: Uint8Array; +}; + +export declare interface MatcherRegExps { + include: RegExp[]; + exclude: RegExp[]; +} + +export declare function matchRoutes(routes: WorkerRoute[], url: URL): string | null; + +export declare const MAX_BULK_GET_KEYS = 100; + +export declare function maybeApply(f: (value: From) => To, maybeValue: From | undefined): To | undefined; + +export declare function maybeParseURL(url: Persistence): URL | undefined; + +/** + * Merges all of `b`'s properties into `a`. Only merges 1 level deep, i.e. + * `kvNamespaces` will be fully-merged, but `durableObject` object-designators + * will be overwritten. + */ +export declare function mergeWorkerOptions(a: Partial, b: Partial): Partial; + +declare class MessageEvent_2 extends Event { + readonly data: string | ArrayBuffer | Uint8Array; + constructor(type: "message", init: { + data: string | ArrayBuffer | Uint8Array; + }); +} +export { MessageEvent_2 as MessageEvent } + +export declare function migrateDatabase(log: Log, uniqueKey: string, persistPath: string, namespace: string): Promise; + +export declare class Miniflare { + #private; + constructor(opts: MiniflareOptions); + get ready(): Promise; + getCf(): Promise>; + getInspectorURL(): Promise; + unsafeGetDirectURL(workerName?: string, entrypoint?: string): Promise; + setOptions(opts: MiniflareOptions): Promise; + dispatchFetch: DispatchFetch; + /* Excluded from this release type: _getProxyClient */ + getBindings>(workerName?: string): Promise; + getWorker(workerName?: string): Promise>; + getCaches(): Promise>; + getD1Database(bindingName: string, workerName?: string): Promise; + getDurableObjectNamespace(bindingName: string, workerName?: string): Promise>; + getKVNamespace(bindingName: string, workerName?: string): Promise>; + getSecretsStoreSecretAPI(bindingName: string, workerName?: string): Promise<() => { + create: (value: string) => Promise; + update: (value: string, id: string) => Promise; + duplicate: (id: string, newName: string) => Promise; + delete: (id: string) => Promise; + list: () => Promise[]>; + get: (id: string) => Promise; + }>; + getSecretsStoreSecret(bindingName: string, workerName?: string): Promise>; + getQueueProducer(bindingName: string, workerName?: string): Promise>; + getR2Bucket(bindingName: string, workerName?: string): Promise>; + /* Excluded from this release type: _getInternalDurableObjectNamespace */ + unsafeGetPersistPaths(): Map; + dispose(): Promise; +} + +export declare class MiniflareCoreError extends MiniflareError { +} + +export declare type MiniflareCoreErrorCode = "ERR_RUNTIME_FAILURE" | "ERR_DISPOSED" | "ERR_MODULE_PARSE" | "ERR_MODULE_STRING_SCRIPT" | "ERR_MODULE_DYNAMIC_SPEC" | "ERR_MODULE_RULE" | "ERR_PERSIST_UNSUPPORTED" | "ERR_PERSIST_REMOTE_UNAUTHENTICATED" | "ERR_PERSIST_REMOTE_UNSUPPORTED" | "ERR_FUTURE_COMPATIBILITY_DATE" | "ERR_NO_WORKERS" | "ERR_VALIDATION" | "ERR_DUPLICATE_NAME" | "ERR_DIFFERENT_STORAGE_BACKEND" | "ERR_DIFFERENT_UNIQUE_KEYS" | "ERR_DIFFERENT_PREVENT_EVICTION" | "ERR_MULTIPLE_OUTBOUNDS" | "ERR_INVALID_WRAPPED" | "ERR_CYCLIC" | "ERR_MISSING_INSPECTOR_PROXY_PORT"; + +export declare class MiniflareError extends Error { + readonly code: Code; + readonly cause?: Error | undefined; + constructor(code: Code, message?: string, cause?: Error | undefined); +} + +export declare type MiniflareOptions = SharedOptions & (WorkerOptions | { + workers: WorkerOptions[]; +}); + +export declare function mixedModeClientWorker(mixedModeConnectionString: MixedModeConnectionString, binding: string): { + compatibilityDate: string; + modules: { + name: string; + esModule: string; + }[]; + bindings: { + name: string; + text: string; + }[]; +}; + +export declare type MixedModeConnectionString = URL & { + __brand: "MixedModeConnectionString"; +}; + +export declare type ModuleDefinition = z.infer; + +export declare const ModuleDefinitionSchema: z.ZodObject<{ + type: z.ZodEnum<["ESModule", "CommonJS", "Text", "Data", "CompiledWasm", "PythonModule", "PythonRequirement"]>; + path: z.ZodEffects; + contents: z.ZodOptional, z.ZodTypeDef, Uint8Array>]>>; +}, "strip", z.ZodTypeAny, { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + path: string; + contents?: string | Uint8Array | undefined; +}, { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + path: string; + contents?: string | Uint8Array | undefined; +}>; + +export declare type ModuleRule = z.infer; + +export declare const ModuleRuleSchema: z.ZodObject<{ + type: z.ZodEnum<["ESModule", "CommonJS", "Text", "Data", "CompiledWasm", "PythonModule", "PythonRequirement"]>; + include: z.ZodArray; + fallthrough: z.ZodOptional; +}, "strip", z.ZodTypeAny, { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; +}, { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; +}>; + +export declare type ModuleRuleType = z.infer; + +export declare const ModuleRuleTypeSchema: z.ZodEnum<["ESModule", "CommonJS", "Text", "Data", "CompiledWasm", "PythonModule", "PythonRequirement"]>; + +export declare class Mutex { + private locked; + private resolveQueue; + private drainQueue; + private lock; + private unlock; + get hasWaiting(): boolean; + runWith(closure: () => Awaitable): Promise; + drained(): Promise; +} + +export declare function namespaceEntries(namespaces?: Record | string[]): [ +bindingName: string, + { + id: string; + mixedModeConnectionString?: MixedModeConnectionString; +} +][]; + +export declare function namespaceKeys(namespaces?: Record | string[]): string[]; + +export declare interface Network { + allow?: string[]; + deny?: string[]; + tlsOptions?: TlsOptions; +} + +export declare const NODE_PLATFORM_IMPL: PlatformImpl; + +/** + * We can provide Node.js compatibility in a number of different modes: + * - "als": this mode tells the workerd runtime to enable only the Async Local Storage builtin library (accessible via `node:async_hooks`). + * - "v1" - this mode tells the workerd runtime to enable some Node.js builtin libraries (accessible only via `node:...` imports) but no globals. + * - "v2" - this mode tells the workerd runtime to enable more Node.js builtin libraries (accessible both with and without the `node:` prefix) + * and also some Node.js globals such as `Buffer`; it also turns on additional compile-time polyfills for those that are not provided by the runtime. + * - null - no Node.js compatibility. + */ +export declare type NodeJSCompatMode = "als" | "v1" | "v2" | null; + +export declare class NoOpLog extends Log { + constructor(); + protected log(): void; + error(_message: Error): void; +} + +export declare function normaliseDurableObject(designator: NonNullable["durableObjects"]>[string]): { + className: string; + serviceName?: string; + enableSql?: boolean; + unsafeUniqueKey?: UnsafeUniqueKey; + unsafePreventEviction?: boolean; +}; + +export declare function objectEntryWorker(durableObjectNamespace: Worker_Binding_DurableObjectNamespaceDesignator, namespace: string): Worker; + +export declare type OptionalZodTypeOf = T extends z.ZodTypeAny ? z.TypeOf : undefined; + +export declare type OverloadReplaceWorkersTypes = T extends (...args: any[]) => any ? UnionToIntersection>> : ReplaceWorkersTypes; + +export declare type OverloadUnion any> = Parameters extends [] ? T : OverloadUnion14; + +export declare type OverloadUnion10 = T extends { + (...args: infer P1): infer R1; + (...args: infer P2): infer R2; + (...args: infer P3): infer R3; + (...args: infer P4): infer R4; + (...args: infer P5): infer R5; + (...args: infer P6): infer R6; + (...args: infer P7): infer R7; + (...args: infer P8): infer R8; + (...args: infer P9): infer R9; + (...args: infer P10): infer R10; +} ? ((...args: P1) => R1) | ((...args: P2) => R2) | ((...args: P3) => R3) | ((...args: P4) => R4) | ((...args: P5) => R5) | ((...args: P6) => R6) | ((...args: P7) => R7) | ((...args: P8) => R8) | ((...args: P9) => R9) | ((...args: P10) => R10) : OverloadUnion9; + +export declare type OverloadUnion11 = T extends { + (...args: infer P1): infer R1; + (...args: infer P2): infer R2; + (...args: infer P3): infer R3; + (...args: infer P4): infer R4; + (...args: infer P5): infer R5; + (...args: infer P6): infer R6; + (...args: infer P7): infer R7; + (...args: infer P8): infer R8; + (...args: infer P9): infer R9; + (...args: infer P10): infer R10; + (...args: infer P11): infer R11; +} ? ((...args: P1) => R1) | ((...args: P2) => R2) | ((...args: P3) => R3) | ((...args: P4) => R4) | ((...args: P5) => R5) | ((...args: P6) => R6) | ((...args: P7) => R7) | ((...args: P8) => R8) | ((...args: P9) => R9) | ((...args: P10) => R10) | ((...args: P11) => R11) : OverloadUnion10; + +export declare type OverloadUnion12 = T extends { + (...args: infer P1): infer R1; + (...args: infer P2): infer R2; + (...args: infer P3): infer R3; + (...args: infer P4): infer R4; + (...args: infer P5): infer R5; + (...args: infer P6): infer R6; + (...args: infer P7): infer R7; + (...args: infer P8): infer R8; + (...args: infer P9): infer R9; + (...args: infer P10): infer R10; + (...args: infer P11): infer R11; + (...args: infer P12): infer R12; +} ? ((...args: P1) => R1) | ((...args: P2) => R2) | ((...args: P3) => R3) | ((...args: P4) => R4) | ((...args: P5) => R5) | ((...args: P6) => R6) | ((...args: P7) => R7) | ((...args: P8) => R8) | ((...args: P9) => R9) | ((...args: P10) => R10) | ((...args: P11) => R11) | ((...args: P12) => R12) : OverloadUnion11; + +export declare type OverloadUnion13 = T extends { + (...args: infer P1): infer R1; + (...args: infer P2): infer R2; + (...args: infer P3): infer R3; + (...args: infer P4): infer R4; + (...args: infer P5): infer R5; + (...args: infer P6): infer R6; + (...args: infer P7): infer R7; + (...args: infer P8): infer R8; + (...args: infer P9): infer R9; + (...args: infer P10): infer R10; + (...args: infer P11): infer R11; + (...args: infer P12): infer R12; + (...args: infer P13): infer R13; +} ? ((...args: P1) => R1) | ((...args: P2) => R2) | ((...args: P3) => R3) | ((...args: P4) => R4) | ((...args: P5) => R5) | ((...args: P6) => R6) | ((...args: P7) => R7) | ((...args: P8) => R8) | ((...args: P9) => R9) | ((...args: P10) => R10) | ((...args: P11) => R11) | ((...args: P12) => R12) | ((...args: P13) => R13) : OverloadUnion12; + +export declare type OverloadUnion14 = T extends { + (...args: infer P1): infer R1; + (...args: infer P2): infer R2; + (...args: infer P3): infer R3; + (...args: infer P4): infer R4; + (...args: infer P5): infer R5; + (...args: infer P6): infer R6; + (...args: infer P7): infer R7; + (...args: infer P8): infer R8; + (...args: infer P9): infer R9; + (...args: infer P10): infer R10; + (...args: infer P11): infer R11; + (...args: infer P12): infer R12; + (...args: infer P13): infer R13; + (...args: infer P14): infer R14; +} ? ((...args: P1) => R1) | ((...args: P2) => R2) | ((...args: P3) => R3) | ((...args: P4) => R4) | ((...args: P5) => R5) | ((...args: P6) => R6) | ((...args: P7) => R7) | ((...args: P8) => R8) | ((...args: P9) => R9) | ((...args: P10) => R10) | ((...args: P11) => R11) | ((...args: P12) => R12) | ((...args: P13) => R13) | ((...args: P14) => R14) : OverloadUnion13; + +export declare type OverloadUnion2 = T extends { + (...args: infer P1): infer R1; + (...args: infer P2): infer R2; +} ? ((...args: P1) => R1) | ((...args: P2) => R2) : T; + +export declare type OverloadUnion3 = T extends { + (...args: infer P1): infer R1; + (...args: infer P2): infer R2; + (...args: infer P3): infer R3; +} ? ((...args: P1) => R1) | ((...args: P2) => R2) | ((...args: P3) => R3) : OverloadUnion2; + +export declare type OverloadUnion4 = T extends { + (...args: infer P1): infer R1; + (...args: infer P2): infer R2; + (...args: infer P3): infer R3; + (...args: infer P4): infer R4; +} ? ((...args: P1) => R1) | ((...args: P2) => R2) | ((...args: P3) => R3) | ((...args: P4) => R4) : OverloadUnion3; + +export declare type OverloadUnion5 = T extends { + (...args: infer P1): infer R1; + (...args: infer P2): infer R2; + (...args: infer P3): infer R3; + (...args: infer P4): infer R4; + (...args: infer P5): infer R5; +} ? ((...args: P1) => R1) | ((...args: P2) => R2) | ((...args: P3) => R3) | ((...args: P4) => R4) | ((...args: P5) => R5) : OverloadUnion4; + +export declare type OverloadUnion6 = T extends { + (...args: infer P1): infer R1; + (...args: infer P2): infer R2; + (...args: infer P3): infer R3; + (...args: infer P4): infer R4; + (...args: infer P5): infer R5; + (...args: infer P6): infer R6; +} ? ((...args: P1) => R1) | ((...args: P2) => R2) | ((...args: P3) => R3) | ((...args: P4) => R4) | ((...args: P5) => R5) | ((...args: P6) => R6) : OverloadUnion5; + +export declare type OverloadUnion7 = T extends { + (...args: infer P1): infer R1; + (...args: infer P2): infer R2; + (...args: infer P3): infer R3; + (...args: infer P4): infer R4; + (...args: infer P5): infer R5; + (...args: infer P6): infer R6; + (...args: infer P7): infer R7; +} ? ((...args: P1) => R1) | ((...args: P2) => R2) | ((...args: P3) => R3) | ((...args: P4) => R4) | ((...args: P5) => R5) | ((...args: P6) => R6) | ((...args: P7) => R7) : OverloadUnion6; + +export declare type OverloadUnion8 = T extends { + (...args: infer P1): infer R1; + (...args: infer P2): infer R2; + (...args: infer P3): infer R3; + (...args: infer P4): infer R4; + (...args: infer P5): infer R5; + (...args: infer P6): infer R6; + (...args: infer P7): infer R7; + (...args: infer P8): infer R8; +} ? ((...args: P1) => R1) | ((...args: P2) => R2) | ((...args: P3) => R3) | ((...args: P4) => R4) | ((...args: P5) => R5) | ((...args: P6) => R6) | ((...args: P7) => R7) | ((...args: P8) => R8) : OverloadUnion7; + +export declare type OverloadUnion9 = T extends { + (...args: infer P1): infer R1; + (...args: infer P2): infer R2; + (...args: infer P3): infer R3; + (...args: infer P4): infer R4; + (...args: infer P5): infer R5; + (...args: infer P6): infer R6; + (...args: infer P7): infer R7; + (...args: infer P8): infer R8; + (...args: infer P9): infer R9; +} ? ((...args: P1) => R1) | ((...args: P2) => R2) | ((...args: P3) => R3) | ((...args: P4) => R4) | ((...args: P5) => R5) | ((...args: P6) => R6) | ((...args: P7) => R7) | ((...args: P8) => R8) | ((...args: P9) => R9) : OverloadUnion8; + +/** + * Parses an HTTP `Range` header (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range), + * returning either: + * - `undefined` indicating the range is unsatisfiable + * - An empty array indicating the entire response should be returned + * - A non-empty array of inclusive ranges of the response to return + */ +export declare function parseRanges(rangeHeader: string, length: number): InclusiveRange[] | undefined; + +export declare function parseRoutes(allRoutes: Map): WorkerRoute[]; + +export declare function parseWithReadableStreams(impl: PlatformImpl, stringified: StringifiedWithStream, revivers: ReducersRevivers): unknown; + +export declare function parseWithRootPath(newRootPath: string, schema: Z, data: unknown, params?: Partial): z.infer; + +export declare const PathSchema: z.ZodEffects; + +export declare enum PeriodType { + TENSECONDS = 10, + MINUTE = 60 +} + +export declare type Persistence = z.infer; + +export declare const PersistenceSchema: z.ZodOptional]>>; + +export declare const PIPELINE_PLUGIN: Plugin; + +export declare const PipelineOptionsSchema: z.ZodObject<{ + pipelines: z.ZodOptional, z.ZodArray]>>; +}, "strip", z.ZodTypeAny, { + pipelines?: string[] | Record | undefined; +}, { + pipelines?: string[] | Record | undefined; +}>; + +export declare const PIPELINES_PLUGIN_NAME = "pipelines"; + +export declare interface PlatformImpl { + Blob: typeof Blob_2; + File: typeof File_3; + Headers: typeof Headers_3; + Request: typeof Request_5; + Response: typeof Response_5; + isReadableStream(value: unknown): value is RS; + bufferReadableStream(stream: RS): Promise; + unbufferReadableStream(buffer: ArrayBuffer): RS; +} + +export declare type Plugin = PluginBase & (SharedOptions extends undefined ? { + sharedOptions?: undefined; +} : { + sharedOptions: SharedOptions; +}); + +export declare const PLUGIN_ENTRIES: [keyof Plugins, ValueOf][]; + +export declare interface PluginBase { + options: Options; + getBindings(options: z.infer, workerIndex: number): Awaitable; + getNodeBindings(options: z.infer): Awaitable>; + getServices(options: PluginServicesOptions): Awaitable; + getPersistPath?(sharedOptions: OptionalZodTypeOf, tmpPath: string): string; +} + +export declare const PLUGINS: { + core: Plugin_2; + path: z.ZodEffects; + contents: z.ZodOptional, z.ZodTypeDef, Uint8Array>]>>; + }, "strip", z.ZodTypeAny, { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + path: string; + contents?: string | Uint8Array | undefined; + }, { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + path: string; + contents?: string | Uint8Array | undefined; + }>, "many">; + modulesRoot: z.ZodOptional>; + }, "strip", z.ZodTypeAny, { + modules: { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + path: string; + contents?: string | Uint8Array | undefined; + }[]; + modulesRoot?: string | undefined; + }, { + modules: { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + path: string; + contents?: string | Uint8Array | undefined; + }[]; + modulesRoot?: string | undefined; + }>, z.ZodObject<{ + script: z.ZodString; + scriptPath: z.ZodOptional>; + modules: z.ZodOptional; + modulesRules: z.ZodOptional; + include: z.ZodArray; + fallthrough: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }, { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }>, "many">>; + modulesRoot: z.ZodOptional>; + }, "strip", z.ZodTypeAny, { + script: string; + scriptPath?: string | undefined; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; + }, { + script: string; + scriptPath?: string | undefined; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; + }>, z.ZodObject<{ + scriptPath: z.ZodEffects; + modules: z.ZodOptional; + modulesRules: z.ZodOptional; + include: z.ZodArray; + fallthrough: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }, { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }>, "many">>; + modulesRoot: z.ZodOptional>; + }, "strip", z.ZodTypeAny, { + scriptPath: string; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; + }, { + scriptPath: string; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; + }>]>, z.ZodObject<{ + name: z.ZodOptional; + rootPath: z.ZodOptional>; + compatibilityDate: z.ZodOptional; + compatibilityFlags: z.ZodOptional>; + unsafeInspectorProxy: z.ZodOptional; + routes: z.ZodOptional>; + bindings: z.ZodOptional>>; + wasmBindings: z.ZodOptional, z.ZodType, z.ZodTypeDef, Uint8Array>]>>>; + textBlobBindings: z.ZodOptional>>; + dataBlobBindings: z.ZodOptional, z.ZodType, z.ZodTypeDef, Uint8Array>]>>>; + serviceBindings: z.ZodOptional, z.ZodObject<{ + name: z.ZodUnion<[z.ZodString, z.ZodLiteral]>; + entrypoint: z.ZodOptional; + props: z.ZodOptional>; + mixedModeConnectionString: z.ZodOptional>; + }, "strip", z.ZodTypeAny, { + name: string | kCurrentWorker_2; + entrypoint?: string | undefined; + props?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + }, { + name: string | kCurrentWorker_2; + entrypoint?: string | undefined; + props?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + }>, z.ZodObject<{ + network: z.ZodObject<{ + allow: z.ZodOptional>; + deny: z.ZodOptional>; + tlsOptions: z.ZodOptional; + certificateChain: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + privateKey?: string | undefined; + certificateChain?: string | undefined; + }, { + privateKey?: string | undefined; + certificateChain?: string | undefined; + }>>; + requireClientCerts: z.ZodOptional; + trustBrowserCas: z.ZodOptional; + trustedCertificates: z.ZodOptional>; + minVersion: z.ZodOptional>; + cipherList: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + }, { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + }>>; + }, "strip", z.ZodTypeAny, { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }, { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }>; + }, "strip", z.ZodTypeAny, { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + }, { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + }>, z.ZodObject<{ + external: z.ZodType; + }, "strip", z.ZodTypeAny, { + external: ExternalServer_3 & (ExternalServer_3 | undefined); + }, { + external: ExternalServer_3 & (ExternalServer_3 | undefined); + }>, z.ZodObject<{ + disk: z.ZodObject<{ + path: z.ZodString; + writable: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + path: string; + writable?: boolean | undefined; + }, { + path: string; + writable?: boolean | undefined; + }>; + }, "strip", z.ZodTypeAny, { + disk: { + path: string; + writable?: boolean | undefined; + }; + }, { + disk: { + path: string; + writable?: boolean | undefined; + }; + }>, z.ZodType<(request: Request_6, mf: Miniflare_3) => Awaitable_2, z.ZodTypeDef, (request: Request_6, mf: Miniflare_3) => Awaitable_2>]>>>; + wrappedBindings: z.ZodOptional; + bindings: z.ZodOptional>>; + }, "strip", z.ZodTypeAny, { + scriptName: string; + entrypoint?: string | undefined; + bindings?: Record | undefined; + }, { + scriptName: string; + entrypoint?: string | undefined; + bindings?: Record | undefined; + }>]>>>; + outboundService: z.ZodOptional, z.ZodObject<{ + name: z.ZodUnion<[z.ZodString, z.ZodLiteral]>; + entrypoint: z.ZodOptional; + props: z.ZodOptional>; + mixedModeConnectionString: z.ZodOptional>; + }, "strip", z.ZodTypeAny, { + name: string | kCurrentWorker_2; + entrypoint?: string | undefined; + props?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + }, { + name: string | kCurrentWorker_2; + entrypoint?: string | undefined; + props?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + }>, z.ZodObject<{ + network: z.ZodObject<{ + allow: z.ZodOptional>; + deny: z.ZodOptional>; + tlsOptions: z.ZodOptional; + certificateChain: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + privateKey?: string | undefined; + certificateChain?: string | undefined; + }, { + privateKey?: string | undefined; + certificateChain?: string | undefined; + }>>; + requireClientCerts: z.ZodOptional; + trustBrowserCas: z.ZodOptional; + trustedCertificates: z.ZodOptional>; + minVersion: z.ZodOptional>; + cipherList: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + }, { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + }>>; + }, "strip", z.ZodTypeAny, { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }, { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }>; + }, "strip", z.ZodTypeAny, { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + }, { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + }>, z.ZodObject<{ + external: z.ZodType; + }, "strip", z.ZodTypeAny, { + external: ExternalServer_3 & (ExternalServer_3 | undefined); + }, { + external: ExternalServer_3 & (ExternalServer_3 | undefined); + }>, z.ZodObject<{ + disk: z.ZodObject<{ + path: z.ZodString; + writable: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + path: string; + writable?: boolean | undefined; + }, { + path: string; + writable?: boolean | undefined; + }>; + }, "strip", z.ZodTypeAny, { + disk: { + path: string; + writable?: boolean | undefined; + }; + }, { + disk: { + path: string; + writable?: boolean | undefined; + }; + }>, z.ZodType<(request: Request_6, mf: Miniflare_3) => Awaitable_2, z.ZodTypeDef, (request: Request_6, mf: Miniflare_3) => Awaitable_2>]>>; + fetchMock: z.ZodOptional, z.ZodTypeDef, MockAgent>>; + unsafeEphemeralDurableObjects: z.ZodOptional; + unsafeDirectSockets: z.ZodOptional; + port: z.ZodOptional; + entrypoint: z.ZodOptional; + proxy: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + host?: string | undefined; + port?: number | undefined; + entrypoint?: string | undefined; + proxy?: boolean | undefined; + }, { + host?: string | undefined; + port?: number | undefined; + entrypoint?: string | undefined; + proxy?: boolean | undefined; + }>, "many">>; + unsafeEvalBinding: z.ZodOptional; + unsafeUseModuleFallbackService: z.ZodOptional; + hasAssetsAndIsVitest: z.ZodOptional; + tails: z.ZodOptional, z.ZodObject<{ + name: z.ZodUnion<[z.ZodString, z.ZodLiteral]>; + entrypoint: z.ZodOptional; + props: z.ZodOptional>; + mixedModeConnectionString: z.ZodOptional>; + }, "strip", z.ZodTypeAny, { + name: string | kCurrentWorker_2; + entrypoint?: string | undefined; + props?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + }, { + name: string | kCurrentWorker_2; + entrypoint?: string | undefined; + props?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + }>, z.ZodObject<{ + network: z.ZodObject<{ + allow: z.ZodOptional>; + deny: z.ZodOptional>; + tlsOptions: z.ZodOptional; + certificateChain: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + privateKey?: string | undefined; + certificateChain?: string | undefined; + }, { + privateKey?: string | undefined; + certificateChain?: string | undefined; + }>>; + requireClientCerts: z.ZodOptional; + trustBrowserCas: z.ZodOptional; + trustedCertificates: z.ZodOptional>; + minVersion: z.ZodOptional>; + cipherList: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + }, { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + }>>; + }, "strip", z.ZodTypeAny, { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }, { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }>; + }, "strip", z.ZodTypeAny, { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + }, { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + }>, z.ZodObject<{ + external: z.ZodType; + }, "strip", z.ZodTypeAny, { + external: ExternalServer_3 & (ExternalServer_3 | undefined); + }, { + external: ExternalServer_3 & (ExternalServer_3 | undefined); + }>, z.ZodObject<{ + disk: z.ZodObject<{ + path: z.ZodString; + writable: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + path: string; + writable?: boolean | undefined; + }, { + path: string; + writable?: boolean | undefined; + }>; + }, "strip", z.ZodTypeAny, { + disk: { + path: string; + writable?: boolean | undefined; + }; + }, { + disk: { + path: string; + writable?: boolean | undefined; + }; + }>, z.ZodType<(request: Request_6, mf: Miniflare_3) => Awaitable_2, z.ZodTypeDef, (request: Request_6, mf: Miniflare_3) => Awaitable_2>]>, "many">>; + stripCfConnectingIp: z.ZodDefault; + }, "strip", z.ZodTypeAny, { + stripCfConnectingIp: boolean; + name?: string | undefined; + rootPath?: undefined; + compatibilityDate?: string | undefined; + compatibilityFlags?: string[] | undefined; + unsafeInspectorProxy?: boolean | undefined; + routes?: string[] | undefined; + bindings?: Record | undefined; + wasmBindings?: Record> | undefined; + textBlobBindings?: Record | undefined; + dataBlobBindings?: Record> | undefined; + serviceBindings?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_3 & (ExternalServer_3 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2)> | undefined; + wrappedBindings?: Record | undefined; + }> | undefined; + outboundService?: string | kCurrentWorker_2 | { + name: string | kCurrentWorker_2; + entrypoint?: string | undefined; + props?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_3 & (ExternalServer_3 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2) | undefined; + fetchMock?: MockAgent | undefined; + unsafeEphemeralDurableObjects?: boolean | undefined; + unsafeDirectSockets?: { + host?: string | undefined; + port?: number | undefined; + entrypoint?: string | undefined; + proxy?: boolean | undefined; + }[] | undefined; + unsafeEvalBinding?: string | undefined; + unsafeUseModuleFallbackService?: boolean | undefined; + hasAssetsAndIsVitest?: boolean | undefined; + tails?: (string | kCurrentWorker_2 | { + name: string | kCurrentWorker_2; + entrypoint?: string | undefined; + props?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_3 & (ExternalServer_3 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2))[] | undefined; + }, { + name?: string | undefined; + rootPath?: string | undefined; + compatibilityDate?: string | undefined; + compatibilityFlags?: string[] | undefined; + unsafeInspectorProxy?: boolean | undefined; + routes?: string[] | undefined; + bindings?: Record | undefined; + wasmBindings?: Record> | undefined; + textBlobBindings?: Record | undefined; + dataBlobBindings?: Record> | undefined; + serviceBindings?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_3 & (ExternalServer_3 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2)> | undefined; + wrappedBindings?: Record | undefined; + }> | undefined; + outboundService?: string | kCurrentWorker_2 | { + name: string | kCurrentWorker_2; + entrypoint?: string | undefined; + props?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_3 & (ExternalServer_3 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2) | undefined; + fetchMock?: MockAgent | undefined; + unsafeEphemeralDurableObjects?: boolean | undefined; + unsafeDirectSockets?: { + host?: string | undefined; + port?: number | undefined; + entrypoint?: string | undefined; + proxy?: boolean | undefined; + }[] | undefined; + unsafeEvalBinding?: string | undefined; + unsafeUseModuleFallbackService?: boolean | undefined; + hasAssetsAndIsVitest?: boolean | undefined; + tails?: (string | kCurrentWorker_2 | { + name: string | kCurrentWorker_2; + entrypoint?: string | undefined; + props?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_3 & (ExternalServer_3 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2))[] | undefined; + stripCfConnectingIp?: boolean | undefined; + }>>, ({ + modules: { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + path: string; + contents?: string | Uint8Array | undefined; + }[]; + modulesRoot?: string | undefined; + } & { + stripCfConnectingIp: boolean; + name?: string | undefined; + rootPath?: undefined; + compatibilityDate?: string | undefined; + compatibilityFlags?: string[] | undefined; + unsafeInspectorProxy?: boolean | undefined; + routes?: string[] | undefined; + bindings?: Record | undefined; + wasmBindings?: Record> | undefined; + textBlobBindings?: Record | undefined; + dataBlobBindings?: Record> | undefined; + serviceBindings?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_3 & (ExternalServer_3 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2)> | undefined; + wrappedBindings?: Record | undefined; + }> | undefined; + outboundService?: string | kCurrentWorker_2 | { + name: string | kCurrentWorker_2; + entrypoint?: string | undefined; + props?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_3 & (ExternalServer_3 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2) | undefined; + fetchMock?: MockAgent | undefined; + unsafeEphemeralDurableObjects?: boolean | undefined; + unsafeDirectSockets?: { + host?: string | undefined; + port?: number | undefined; + entrypoint?: string | undefined; + proxy?: boolean | undefined; + }[] | undefined; + unsafeEvalBinding?: string | undefined; + unsafeUseModuleFallbackService?: boolean | undefined; + hasAssetsAndIsVitest?: boolean | undefined; + tails?: (string | kCurrentWorker_2 | { + name: string | kCurrentWorker_2; + entrypoint?: string | undefined; + props?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_3 & (ExternalServer_3 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2))[] | undefined; + }) | ({ + script: string; + scriptPath?: string | undefined; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; + } & { + stripCfConnectingIp: boolean; + name?: string | undefined; + rootPath?: undefined; + compatibilityDate?: string | undefined; + compatibilityFlags?: string[] | undefined; + unsafeInspectorProxy?: boolean | undefined; + routes?: string[] | undefined; + bindings?: Record | undefined; + wasmBindings?: Record> | undefined; + textBlobBindings?: Record | undefined; + dataBlobBindings?: Record> | undefined; + serviceBindings?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_3 & (ExternalServer_3 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2)> | undefined; + wrappedBindings?: Record | undefined; + }> | undefined; + outboundService?: string | kCurrentWorker_2 | { + name: string | kCurrentWorker_2; + entrypoint?: string | undefined; + props?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_3 & (ExternalServer_3 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2) | undefined; + fetchMock?: MockAgent | undefined; + unsafeEphemeralDurableObjects?: boolean | undefined; + unsafeDirectSockets?: { + host?: string | undefined; + port?: number | undefined; + entrypoint?: string | undefined; + proxy?: boolean | undefined; + }[] | undefined; + unsafeEvalBinding?: string | undefined; + unsafeUseModuleFallbackService?: boolean | undefined; + hasAssetsAndIsVitest?: boolean | undefined; + tails?: (string | kCurrentWorker_2 | { + name: string | kCurrentWorker_2; + entrypoint?: string | undefined; + props?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_3 & (ExternalServer_3 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2))[] | undefined; + }) | ({ + scriptPath: string; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; + } & { + stripCfConnectingIp: boolean; + name?: string | undefined; + rootPath?: undefined; + compatibilityDate?: string | undefined; + compatibilityFlags?: string[] | undefined; + unsafeInspectorProxy?: boolean | undefined; + routes?: string[] | undefined; + bindings?: Record | undefined; + wasmBindings?: Record> | undefined; + textBlobBindings?: Record | undefined; + dataBlobBindings?: Record> | undefined; + serviceBindings?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_3 & (ExternalServer_3 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2)> | undefined; + wrappedBindings?: Record | undefined; + }> | undefined; + outboundService?: string | kCurrentWorker_2 | { + name: string | kCurrentWorker_2; + entrypoint?: string | undefined; + props?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_3 & (ExternalServer_3 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2) | undefined; + fetchMock?: MockAgent | undefined; + unsafeEphemeralDurableObjects?: boolean | undefined; + unsafeDirectSockets?: { + host?: string | undefined; + port?: number | undefined; + entrypoint?: string | undefined; + proxy?: boolean | undefined; + }[] | undefined; + unsafeEvalBinding?: string | undefined; + unsafeUseModuleFallbackService?: boolean | undefined; + hasAssetsAndIsVitest?: boolean | undefined; + tails?: (string | kCurrentWorker_2 | { + name: string | kCurrentWorker_2; + entrypoint?: string | undefined; + props?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_3 & (ExternalServer_3 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2))[] | undefined; + }), ({ + modules: { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + path: string; + contents?: string | Uint8Array | undefined; + }[]; + modulesRoot?: string | undefined; + } | { + script: string; + scriptPath?: string | undefined; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; + } | { + scriptPath: string; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; + }) & { + name?: string | undefined; + rootPath?: string | undefined; + compatibilityDate?: string | undefined; + compatibilityFlags?: string[] | undefined; + unsafeInspectorProxy?: boolean | undefined; + routes?: string[] | undefined; + bindings?: Record | undefined; + wasmBindings?: Record> | undefined; + textBlobBindings?: Record | undefined; + dataBlobBindings?: Record> | undefined; + serviceBindings?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_3 & (ExternalServer_3 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2)> | undefined; + wrappedBindings?: Record | undefined; + }> | undefined; + outboundService?: string | kCurrentWorker_2 | { + name: string | kCurrentWorker_2; + entrypoint?: string | undefined; + props?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_3 & (ExternalServer_3 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2) | undefined; + fetchMock?: MockAgent | undefined; + unsafeEphemeralDurableObjects?: boolean | undefined; + unsafeDirectSockets?: { + host?: string | undefined; + port?: number | undefined; + entrypoint?: string | undefined; + proxy?: boolean | undefined; + }[] | undefined; + unsafeEvalBinding?: string | undefined; + unsafeUseModuleFallbackService?: boolean | undefined; + hasAssetsAndIsVitest?: boolean | undefined; + tails?: (string | kCurrentWorker_2 | { + name: string | kCurrentWorker_2; + entrypoint?: string | undefined; + props?: Record | undefined; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + } | { + network: { + allow?: string[] | undefined; + deny?: string[] | undefined; + tlsOptions?: { + keypair?: { + privateKey?: string | undefined; + certificateChain?: string | undefined; + } | undefined; + requireClientCerts?: boolean | undefined; + trustBrowserCas?: boolean | undefined; + trustedCertificates?: string[] | undefined; + minVersion?: 0 | 2 | 1 | 3 | 4 | 5 | undefined; + cipherList?: string | undefined; + } | undefined; + }; + } | { + external: ExternalServer_3 & (ExternalServer_3 | undefined); + } | { + disk: { + path: string; + writable?: boolean | undefined; + }; + } | ((request: Request_6, mf: Miniflare_3) => Awaitable_2))[] | undefined; + stripCfConnectingIp?: boolean | undefined; + }>, z.ZodObject<{ + rootPath: z.ZodOptional>; + host: z.ZodOptional; + port: z.ZodOptional; + https: z.ZodOptional; + httpsKey: z.ZodOptional; + httpsKeyPath: z.ZodOptional; + httpsCert: z.ZodOptional; + httpsCertPath: z.ZodOptional; + inspectorPort: z.ZodOptional; + verbose: z.ZodOptional; + log: z.ZodOptional>; + handleRuntimeStdio: z.ZodOptional, z.ZodType], null>, z.ZodUnknown>>; + upstream: z.ZodOptional; + cf: z.ZodOptional]>>; + liveReload: z.ZodOptional; + unsafeProxySharedSecret: z.ZodOptional; + unsafeModuleFallbackService: z.ZodOptional Awaitable_2, z.ZodTypeDef, (request: Request_6, mf: Miniflare_3) => Awaitable_2>>; + unsafeStickyBlobs: z.ZodOptional; + unsafeTriggerHandlers: z.ZodOptional; + logRequests: z.ZodDefault; + }, "strip", z.ZodTypeAny, { + logRequests: boolean; + rootPath?: undefined; + host?: string | undefined; + port?: number | undefined; + https?: boolean | undefined; + httpsKey?: string | undefined; + httpsKeyPath?: string | undefined; + httpsCert?: string | undefined; + httpsCertPath?: string | undefined; + inspectorPort?: number | undefined; + verbose?: boolean | undefined; + log?: Log_2 | undefined; + handleRuntimeStdio?: ((args_0: Readable, args_1: Readable) => unknown) | undefined; + upstream?: string | undefined; + cf?: string | boolean | Record | undefined; + liveReload?: boolean | undefined; + unsafeProxySharedSecret?: string | undefined; + unsafeModuleFallbackService?: ((request: Request_6, mf: Miniflare_3) => Awaitable_2) | undefined; + unsafeStickyBlobs?: boolean | undefined; + unsafeTriggerHandlers?: boolean | undefined; + }, { + rootPath?: string | undefined; + host?: string | undefined; + port?: number | undefined; + https?: boolean | undefined; + httpsKey?: string | undefined; + httpsKeyPath?: string | undefined; + httpsCert?: string | undefined; + httpsCertPath?: string | undefined; + inspectorPort?: number | undefined; + verbose?: boolean | undefined; + log?: Log_2 | undefined; + handleRuntimeStdio?: ((args_0: Readable, args_1: Readable) => unknown) | undefined; + upstream?: string | undefined; + cf?: string | boolean | Record | undefined; + liveReload?: boolean | undefined; + unsafeProxySharedSecret?: string | undefined; + unsafeModuleFallbackService?: ((request: Request_6, mf: Miniflare_3) => Awaitable_2) | undefined; + unsafeStickyBlobs?: boolean | undefined; + unsafeTriggerHandlers?: boolean | undefined; + logRequests?: boolean | undefined; + }>>; + cache: Plugin_2; + cacheWarnUsage: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + cache?: boolean | undefined; + cacheWarnUsage?: boolean | undefined; + }, { + cache?: boolean | undefined; + cacheWarnUsage?: boolean | undefined; + }>, z.ZodObject<{ + cachePersist: z.ZodOptional]>>; + }, "strip", z.ZodTypeAny, { + cachePersist?: string | boolean | undefined; + }, { + cachePersist?: string | boolean | undefined; + }>>; + d1: Plugin_2, z.ZodRecord>; + }, "strip", z.ZodTypeAny, { + id: string; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + }, { + id: string; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + }>>, z.ZodArray]>>; + }, "strip", z.ZodTypeAny, { + d1Databases?: string[] | Record | Record | undefined; + }, { + d1Databases?: string[] | Record | Record | undefined; + }>, z.ZodObject<{ + d1Persist: z.ZodOptional]>>; + }, "strip", z.ZodTypeAny, { + d1Persist?: string | boolean | undefined; + }, { + d1Persist?: string | boolean | undefined; + }>>; + do: Plugin_2; + useSQLite: z.ZodOptional; + unsafeUniqueKey: z.ZodOptional]>>; + unsafePreventEviction: z.ZodOptional; + mixedModeConnectionString: z.ZodOptional>; + }, "strip", z.ZodTypeAny, { + className: string; + scriptName?: string | undefined; + useSQLite?: boolean | undefined; + unsafeUniqueKey?: string | kUnsafeEphemeralUniqueKey_2 | undefined; + unsafePreventEviction?: boolean | undefined; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + }, { + className: string; + scriptName?: string | undefined; + useSQLite?: boolean | undefined; + unsafeUniqueKey?: string | kUnsafeEphemeralUniqueKey_2 | undefined; + unsafePreventEviction?: boolean | undefined; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + }>]>>>; + }, "strip", z.ZodTypeAny, { + durableObjects?: Record | undefined; + }, { + durableObjects?: Record | undefined; + }>, z.ZodObject<{ + durableObjectsPersist: z.ZodOptional]>>; + }, "strip", z.ZodTypeAny, { + durableObjectsPersist?: string | boolean | undefined; + }, { + durableObjectsPersist?: string | boolean | undefined; + }>>; + kv: Plugin_2, z.ZodRecord>; + }, "strip", z.ZodTypeAny, { + id: string; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + }, { + id: string; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + }>>, z.ZodArray]>>; + sitePath: z.ZodOptional>; + siteInclude: z.ZodOptional>; + siteExclude: z.ZodOptional>; + }, "strip", z.ZodTypeAny, { + kvNamespaces?: string[] | Record | Record | undefined; + sitePath?: string | undefined; + siteInclude?: string[] | undefined; + siteExclude?: string[] | undefined; + }, { + kvNamespaces?: string[] | Record | Record | undefined; + sitePath?: string | undefined; + siteInclude?: string[] | undefined; + siteExclude?: string[] | undefined; + }>, z.ZodObject<{ + kvPersist: z.ZodOptional]>>; + }, "strip", z.ZodTypeAny, { + kvPersist?: string | boolean | undefined; + }, { + kvPersist?: string | boolean | undefined; + }>>; + queues: Plugin_2; + mixedModeConnectionString: z.ZodOptional>; + }, "strip", z.ZodTypeAny, { + queueName: string; + deliveryDelay?: number | undefined; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + }, { + queueName: string; + deliveryDelay?: number | undefined; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + }>>, z.ZodArray, z.ZodRecord]>>; + queueConsumers: z.ZodOptional; + maxBatchTimeout: z.ZodOptional; + maxRetires: z.ZodOptional; + maxRetries: z.ZodOptional; + deadLetterQueue: z.ZodOptional; + retryDelay: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; + }, { + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; + }>, Omit<{ + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; + }, "maxRetires">, { + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; + }>>, z.ZodArray]>>; + }, "strip", z.ZodTypeAny, { + queueProducers?: string[] | Record | Record | undefined; + queueConsumers?: string[] | Record> | undefined; + }, { + queueProducers?: string[] | Record | Record | undefined; + queueConsumers?: string[] | Record | undefined; + }>>; + r2: Plugin_2, z.ZodRecord>; + }, "strip", z.ZodTypeAny, { + id: string; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + }, { + id: string; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + }>>, z.ZodArray]>>; + }, "strip", z.ZodTypeAny, { + r2Buckets?: string[] | Record | Record | undefined; + }, { + r2Buckets?: string[] | Record | Record | undefined; + }>, z.ZodObject<{ + r2Persist: z.ZodOptional]>>; + }, "strip", z.ZodTypeAny, { + r2Persist?: string | boolean | undefined; + }, { + r2Persist?: string | boolean | undefined; + }>>; + hyperdrive: Plugin_2]>, URL_2, string | URL_2>>>; + }, "strip", z.ZodTypeAny, { + hyperdrives?: Record | undefined; + }, { + hyperdrives?: Record | undefined; + }>>; + ratelimit: Plugin_2>; + }, "strip", z.ZodTypeAny, { + limit: number; + period?: PeriodType_2 | undefined; + }, { + limit: number; + period?: PeriodType_2 | undefined; + }>; + }, "strip", z.ZodTypeAny, { + simple: { + limit: number; + period?: PeriodType_2 | undefined; + }; + }, { + simple: { + limit: number; + period?: PeriodType_2 | undefined; + }; + }>>>; + }, "strip", z.ZodTypeAny, { + ratelimits?: Record | undefined; + }, { + ratelimits?: Record | undefined; + }>>; + assets: Plugin_2; + directory: z.ZodEffects; + binding: z.ZodOptional; + routerConfig: z.ZodOptional; + script_id: z.ZodOptional; + debug: z.ZodOptional; + invoke_user_worker_ahead_of_assets: z.ZodOptional; + has_user_worker: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + account_id?: number; + script_id?: number; + debug?: boolean; + invoke_user_worker_ahead_of_assets?: boolean; + has_user_worker?: boolean; + }, { + account_id?: number; + script_id?: number; + debug?: boolean; + invoke_user_worker_ahead_of_assets?: boolean; + has_user_worker?: boolean; + }>>; + assetConfig: z.ZodOptional; + script_id: z.ZodOptional; + debug: z.ZodOptional; + compatibility_date: z.ZodOptional; + compatibility_flags: z.ZodOptional>; + html_handling: z.ZodOptional>; + not_found_handling: z.ZodOptional>; + redirects: z.ZodOptional; + staticRules: z.ZodRecord>; + rules: z.ZodRecord>; + }, "strip", z.ZodTypeAny, { + version?: 1; + staticRules?: Record; + rules?: Record; + }, { + version?: 1; + staticRules?: Record; + rules?: Record; + }>>; + headers: z.ZodOptional; + rules: z.ZodRecord>; + unset: z.ZodOptional>; + }, "strip", z.ZodTypeAny, { + set?: Record; + unset?: string[]; + }, { + set?: Record; + unset?: string[]; + }>>; + }, "strip", z.ZodTypeAny, { + version?: 2; + rules?: Record; + unset?: string[]; + }>; + }, { + version?: 2; + rules?: Record; + unset?: string[]; + }>; + }>>; + }, "compatibility_date" | "compatibility_flags">, "strip", z.ZodTypeAny, { + headers?: { + version?: 2; + rules?: Record; + unset?: string[]; + }>; + } | undefined; + debug?: boolean | undefined; + account_id?: number | undefined; + script_id?: number | undefined; + html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash" | undefined; + not_found_handling?: "none" | "single-page-application" | "404-page" | undefined; + redirects?: { + version?: 1; + staticRules?: Record; + rules?: Record; + } | undefined; + }, { + headers?: { + version?: 2; + rules?: Record; + unset?: string[]; + }>; + } | undefined; + debug?: boolean | undefined; + account_id?: number | undefined; + script_id?: number | undefined; + html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash" | undefined; + not_found_handling?: "none" | "single-page-application" | "404-page" | undefined; + redirects?: { + version?: 1; + staticRules?: Record; + rules?: Record; + } | undefined; + }>>; + }, "strip", z.ZodTypeAny, { + directory: string; + workerName?: string | undefined; + binding?: string | undefined; + routerConfig?: { + account_id?: number; + script_id?: number; + debug?: boolean; + invoke_user_worker_ahead_of_assets?: boolean; + has_user_worker?: boolean; + } | undefined; + assetConfig?: { + headers?: { + version?: 2; + rules?: Record; + unset?: string[]; + }>; + } | undefined; + debug?: boolean | undefined; + account_id?: number | undefined; + script_id?: number | undefined; + html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash" | undefined; + not_found_handling?: "none" | "single-page-application" | "404-page" | undefined; + redirects?: { + version?: 1; + staticRules?: Record; + rules?: Record; + } | undefined; + } | undefined; + }, { + directory: string; + workerName?: string | undefined; + binding?: string | undefined; + routerConfig?: { + account_id?: number; + script_id?: number; + debug?: boolean; + invoke_user_worker_ahead_of_assets?: boolean; + has_user_worker?: boolean; + } | undefined; + assetConfig?: { + headers?: { + version?: 2; + rules?: Record; + unset?: string[]; + }>; + } | undefined; + debug?: boolean | undefined; + account_id?: number | undefined; + script_id?: number | undefined; + html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash" | undefined; + not_found_handling?: "none" | "single-page-application" | "404-page" | undefined; + redirects?: { + version?: 1; + staticRules?: Record; + rules?: Record; + } | undefined; + } | undefined; + }>>; + compatibilityDate: z.ZodOptional; + compatibilityFlags: z.ZodOptional>; + }, "strip", z.ZodTypeAny, { + assets?: { + directory: string; + workerName?: string | undefined; + binding?: string | undefined; + routerConfig?: { + account_id?: number; + script_id?: number; + debug?: boolean; + invoke_user_worker_ahead_of_assets?: boolean; + has_user_worker?: boolean; + } | undefined; + assetConfig?: { + headers?: { + version?: 2; + rules?: Record; + unset?: string[]; + }>; + } | undefined; + debug?: boolean | undefined; + account_id?: number | undefined; + script_id?: number | undefined; + html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash" | undefined; + not_found_handling?: "none" | "single-page-application" | "404-page" | undefined; + redirects?: { + version?: 1; + staticRules?: Record; + rules?: Record; + } | undefined; + } | undefined; + } | undefined; + compatibilityDate?: string | undefined; + compatibilityFlags?: string[] | undefined; + }, { + assets?: { + directory: string; + workerName?: string | undefined; + binding?: string | undefined; + routerConfig?: { + account_id?: number; + script_id?: number; + debug?: boolean; + invoke_user_worker_ahead_of_assets?: boolean; + has_user_worker?: boolean; + } | undefined; + assetConfig?: { + headers?: { + version?: 2; + rules?: Record; + unset?: string[]; + }>; + } | undefined; + debug?: boolean | undefined; + account_id?: number | undefined; + script_id?: number | undefined; + html_handling?: "none" | "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash" | undefined; + not_found_handling?: "none" | "single-page-application" | "404-page" | undefined; + redirects?: { + version?: 1; + staticRules?: Record; + rules?: Record; + } | undefined; + } | undefined; + } | undefined; + compatibilityDate?: string | undefined; + compatibilityFlags?: string[] | undefined; + }>>; + workflows: Plugin_2; + mixedModeConnectionString: z.ZodOptional>; + }, "strip", z.ZodTypeAny, { + name: string; + className: string; + scriptName?: string | undefined; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + }, { + name: string; + className: string; + scriptName?: string | undefined; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + }>>>; + }, "strip", z.ZodTypeAny, { + workflows?: Record | undefined; + }, { + workflows?: Record | undefined; + }>, z.ZodObject<{ + workflowsPersist: z.ZodOptional]>>; + }, "strip", z.ZodTypeAny, { + workflowsPersist?: string | boolean | undefined; + }, { + workflowsPersist?: string | boolean | undefined; + }>>; + pipelines: Plugin_2, z.ZodArray]>>; + }, "strip", z.ZodTypeAny, { + pipelines?: string[] | Record | undefined; + }, { + pipelines?: string[] | Record | undefined; + }>>; + "secrets-store": Plugin_2>>; + }, "strip", z.ZodTypeAny, { + secretsStoreSecrets?: Record | undefined; + }, { + secretsStoreSecrets?: Record | undefined; + }>, z.ZodObject<{ + secretsStorePersist: z.ZodOptional]>>; + }, "strip", z.ZodTypeAny, { + secretsStorePersist?: string | boolean | undefined; + }, { + secretsStorePersist?: string | boolean | undefined; + }>>; + email: Plugin_2, z.ZodUnion<[z.ZodObject<{ + destination_address: z.ZodOptional; + allowed_destination_addresses: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + destination_address?: string | undefined; + allowed_destination_addresses?: undefined; + }, { + destination_address?: string | undefined; + allowed_destination_addresses?: undefined; + }>, z.ZodObject<{ + allowed_destination_addresses: z.ZodOptional>; + destination_address: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + allowed_destination_addresses?: string[] | undefined; + destination_address?: undefined; + }, { + allowed_destination_addresses?: string[] | undefined; + destination_address?: undefined; + }>]>>, "many">>; + }, "strip", z.ZodTypeAny, { + send_email?: ({ + name: string; + } & ({ + destination_address?: string | undefined; + allowed_destination_addresses?: undefined; + } | { + allowed_destination_addresses?: string[] | undefined; + destination_address?: undefined; + }))[] | undefined; + }, { + send_email?: ({ + name: string; + } & ({ + destination_address?: string | undefined; + allowed_destination_addresses?: undefined; + } | { + allowed_destination_addresses?: string[] | undefined; + destination_address?: undefined; + }))[] | undefined; + }>>; + }, "strip", z.ZodTypeAny, { + email?: { + send_email?: ({ + name: string; + } & ({ + destination_address?: string | undefined; + allowed_destination_addresses?: undefined; + } | { + allowed_destination_addresses?: string[] | undefined; + destination_address?: undefined; + }))[] | undefined; + } | undefined; + }, { + email?: { + send_email?: ({ + name: string; + } & ({ + destination_address?: string | undefined; + allowed_destination_addresses?: undefined; + } | { + allowed_destination_addresses?: string[] | undefined; + destination_address?: undefined; + }))[] | undefined; + } | undefined; + }>>; + "analytics-engine": Plugin_2>>; + }, "strip", z.ZodTypeAny, { + analyticsEngineDatasets?: Record | undefined; + }, { + analyticsEngineDatasets?: Record | undefined; + }>, z.ZodObject<{ + analyticsEngineDatasetsPersist: z.ZodOptional]>>; + }, "strip", z.ZodTypeAny, { + analyticsEngineDatasetsPersist?: string | boolean | undefined; + }, { + analyticsEngineDatasetsPersist?: string | boolean | undefined; + }>>; + ai: Plugin_2; + }, "strip", z.ZodTypeAny, { + mixedModeConnectionString: URL & { + __brand: "MixedModeConnectionString"; + }; + binding: string; + }, { + mixedModeConnectionString: URL & { + __brand: "MixedModeConnectionString"; + }; + binding: string; + }>>; + }, "strip", z.ZodTypeAny, { + ai?: { + mixedModeConnectionString: URL & { + __brand: "MixedModeConnectionString"; + }; + binding: string; + } | undefined; + }, { + ai?: { + mixedModeConnectionString: URL & { + __brand: "MixedModeConnectionString"; + }; + binding: string; + } | undefined; + }>>; + "browser-rendering": Plugin_2; + }, "strip", z.ZodTypeAny, { + mixedModeConnectionString: URL & { + __brand: "MixedModeConnectionString"; + }; + binding: string; + }, { + mixedModeConnectionString: URL & { + __brand: "MixedModeConnectionString"; + }; + binding: string; + }>>; + }, "strip", z.ZodTypeAny, { + browserRendering?: { + mixedModeConnectionString: URL & { + __brand: "MixedModeConnectionString"; + }; + binding: string; + } | undefined; + }, { + browserRendering?: { + mixedModeConnectionString: URL & { + __brand: "MixedModeConnectionString"; + }; + binding: string; + } | undefined; + }>>; + "dispatch-namespace": Plugin_2>; + }, "strip", z.ZodTypeAny, { + namespace: string; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + }, { + namespace: string; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + }>>>; + }, "strip", z.ZodTypeAny, { + dispatchNamespaces?: Record | undefined; + }, { + dispatchNamespaces?: Record | undefined; + }>>; + images: Plugin_2>; + }, "strip", z.ZodTypeAny, { + binding: string; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + }, { + binding: string; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + }>>; + }, "strip", z.ZodTypeAny, { + images?: { + binding: string; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + } | undefined; + }, { + images?: { + binding: string; + mixedModeConnectionString?: MixedModeConnectionString_3 | undefined; + } | undefined; + }>>; + vectorize: Plugin_2; + }, "strip", z.ZodTypeAny, { + mixedModeConnectionString: URL & { + __brand: "MixedModeConnectionString"; + }; + index_name: string; + }, { + mixedModeConnectionString: URL & { + __brand: "MixedModeConnectionString"; + }; + index_name: string; + }>>>; + }, "strip", z.ZodTypeAny, { + vectorize?: Record | undefined; + }, { + vectorize?: Record | undefined; + }>>; +}; + +export declare type Plugins = typeof PLUGINS; + +export declare interface PluginServicesOptions { + log: Log; + options: z.infer; + sharedOptions: OptionalZodTypeOf; + workerBindings: Worker_Binding[]; + workerIndex: number; + additionalModules: Worker_Module[]; + tmpPath: string; + workerNames: string[]; + loopbackPort: number; + unsafeStickyBlobs: boolean; + wrappedBindingNames: WrappedBindingNames; + durableObjectClassNames: DurableObjectClassNames; + unsafeEphemeralDurableObjects: boolean; + queueProducers: QueueProducers; + queueConsumers: QueueConsumers; +} + +export declare function prefixError(prefix: string, e: any): Error; + +export declare function prefixStream(prefix: Uint8Array, stream: ReadableStream_3): ReadableStream_3; + +export declare const ProxyAddresses: { + readonly GLOBAL: 0; + readonly ENV: 1; + readonly USER_START: 2; +}; + +export declare class ProxyClient { + #private; + constructor(runtimeEntryURL: URL, dispatchFetch: DispatchFetch); + get global(): ServiceWorkerGlobalScope; + get env(): Record; + poisonProxies(): void; + setRuntimeEntryURL(runtimeEntryURL: URL): void; + dispose(): Promise; +} + +export declare class ProxyNodeBinding { + proxyOverrideHandler?: ProxyHandler | undefined; + constructor(proxyOverrideHandler?: ProxyHandler | undefined); +} + +export declare const ProxyOps: { + readonly GET: "GET"; + readonly GET_OWN_DESCRIPTOR: "GET_OWN_DESCRIPTOR"; + readonly GET_OWN_KEYS: "GET_OWN_KEYS"; + readonly CALL: "CALL"; + readonly FREE: "FREE"; +}; + +export declare const QueueBindings: { + readonly SERVICE_WORKER_PREFIX: "MINIFLARE_WORKER_"; + readonly MAYBE_JSON_QUEUE_PRODUCERS: "MINIFLARE_QUEUE_PRODUCERS"; + readonly MAYBE_JSON_QUEUE_CONSUMERS: "MINIFLARE_QUEUE_CONSUMERS"; +}; + +export declare type QueueConsumer = z.infer; + +export declare const QueueConsumerOptionsSchema: z.ZodEffects; + maxBatchTimeout: z.ZodOptional; + maxRetires: z.ZodOptional; + maxRetries: z.ZodOptional; + deadLetterQueue: z.ZodOptional; + retryDelay: z.ZodOptional; +}, "strip", z.ZodTypeAny, { + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; +}, { + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; +}>, Omit<{ + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; +}, "maxRetires">, { + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; +}>; + +export declare type QueueConsumers = Map>; + +export declare const QueueConsumerSchema: z.ZodIntersection; + maxBatchTimeout: z.ZodOptional; + maxRetires: z.ZodOptional; + maxRetries: z.ZodOptional; + deadLetterQueue: z.ZodOptional; + retryDelay: z.ZodOptional; +}, "strip", z.ZodTypeAny, { + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; +}, { + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; +}>, Omit<{ + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; +}, "maxRetires">, { + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; +}>, z.ZodObject<{ + workerName: z.ZodString; +}, "strip", z.ZodTypeAny, { + workerName: string; +}, { + workerName: string; +}>>; + +export declare const QueueConsumersSchema: z.ZodRecord; + maxBatchTimeout: z.ZodOptional; + maxRetires: z.ZodOptional; + maxRetries: z.ZodOptional; + deadLetterQueue: z.ZodOptional; + retryDelay: z.ZodOptional; +}, "strip", z.ZodTypeAny, { + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; +}, { + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; +}>, Omit<{ + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; +}, "maxRetires">, { + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; +}>, z.ZodObject<{ + workerName: z.ZodString; +}, "strip", z.ZodTypeAny, { + workerName: string; +}, { + workerName: string; +}>>>; + +export declare type QueueContentType = z.infer; + +export declare const QueueContentTypeSchema: z.ZodDefault>; + +export declare type QueueIncomingMessage = z.infer; + +export declare const QueueIncomingMessageSchema: z.ZodObject<{ + contentType: z.ZodDefault>; + delaySecs: z.ZodOptional; + body: z.ZodEffects, string>; + id: z.ZodOptional; + timestamp: z.ZodOptional; +}, "strip", z.ZodTypeAny, { + body: Buffer; + contentType: "json" | "bytes" | "v8" | "text"; + delaySecs?: number | undefined; + id?: string | undefined; + timestamp?: number | undefined; +}, { + body: string; + contentType?: "json" | "bytes" | "v8" | "text" | undefined; + delaySecs?: number | undefined; + id?: string | undefined; + timestamp?: number | undefined; +}>; + +export declare type QueueMessageDelay = z.infer; + +export declare const QueueMessageDelaySchema: z.ZodOptional; + +export declare type QueueOutgoingMessage = z.input; + +export declare type QueueProducer = z.infer; + +export declare const QueueProducerOptionsSchema: z.ZodObject<{ + queueName: z.ZodString; + deliveryDelay: z.ZodOptional; +}, "strip", z.ZodTypeAny, { + queueName: string; + deliveryDelay?: number | undefined; +}, { + queueName: string; + deliveryDelay?: number | undefined; +}>; + +export declare type QueueProducers = Map>; + +export declare const QueueProducerSchema: z.ZodIntersection; +}, "strip", z.ZodTypeAny, { + queueName: string; + deliveryDelay?: number | undefined; +}, { + queueName: string; + deliveryDelay?: number | undefined; +}>, z.ZodObject<{ + workerName: z.ZodString; +}, "strip", z.ZodTypeAny, { + workerName: string; +}, { + workerName: string; +}>>; + +export declare const QueueProducersSchema: z.ZodRecord; +}, "strip", z.ZodTypeAny, { + queueName: string; + deliveryDelay?: number | undefined; +}, { + queueName: string; + deliveryDelay?: number | undefined; +}>, z.ZodObject<{ + workerName: z.ZodString; +}, "strip", z.ZodTypeAny, { + workerName: string; +}, { + workerName: string; +}>>>; + +export declare const QUEUES_PLUGIN: Plugin; + +export declare const QUEUES_PLUGIN_NAME = "queues"; + +export declare const QueuesBatchRequestSchema: z.ZodObject<{ + messages: z.ZodArray>; + delaySecs: z.ZodOptional; + body: z.ZodEffects, string>; + id: z.ZodOptional; + timestamp: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + body: Buffer; + contentType: "json" | "bytes" | "v8" | "text"; + delaySecs?: number | undefined; + id?: string | undefined; + timestamp?: number | undefined; + }, { + body: string; + contentType?: "json" | "bytes" | "v8" | "text" | undefined; + delaySecs?: number | undefined; + id?: string | undefined; + timestamp?: number | undefined; + }>, "many">; +}, "strip", z.ZodTypeAny, { + messages: { + body: Buffer; + contentType: "json" | "bytes" | "v8" | "text"; + delaySecs?: number | undefined; + id?: string | undefined; + timestamp?: number | undefined; + }[]; +}, { + messages: { + body: string; + contentType?: "json" | "bytes" | "v8" | "text" | undefined; + delaySecs?: number | undefined; + id?: string | undefined; + timestamp?: number | undefined; + }[]; +}>; + +export declare class QueuesError extends MiniflareError { +} + +export declare type QueuesErrorCode = "ERR_MULTIPLE_CONSUMERS" | "ERR_DEAD_LETTER_QUEUE_CYCLE"; + +export declare const QueuesOptionsSchema: z.ZodObject<{ + queueProducers: z.ZodOptional; + mixedModeConnectionString: z.ZodOptional>; + }, "strip", z.ZodTypeAny, { + queueName: string; + deliveryDelay?: number | undefined; + mixedModeConnectionString?: MixedModeConnectionString | undefined; + }, { + queueName: string; + deliveryDelay?: number | undefined; + mixedModeConnectionString?: MixedModeConnectionString | undefined; + }>>, z.ZodArray, z.ZodRecord]>>; + queueConsumers: z.ZodOptional; + maxBatchTimeout: z.ZodOptional; + maxRetires: z.ZodOptional; + maxRetries: z.ZodOptional; + deadLetterQueue: z.ZodOptional; + retryDelay: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; + }, { + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; + }>, Omit<{ + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; + }, "maxRetires">, { + maxBatchSize?: number | undefined; + maxBatchTimeout?: number | undefined; + maxRetires?: number | undefined; + maxRetries?: number | undefined; + deadLetterQueue?: string | undefined; + retryDelay?: number | undefined; + }>>, z.ZodArray]>>; +}, "strip", z.ZodTypeAny, { + queueProducers?: string[] | Record | Record | undefined; + queueConsumers?: string[] | Record> | undefined; +}, { + queueProducers?: string[] | Record | Record | undefined; + queueConsumers?: string[] | Record | undefined; +}>; + +export declare type QueuesOutgoingBatchRequest = z.input; + +export declare const R2_PLUGIN: Plugin; + +export declare const R2_PLUGIN_NAME = "r2"; + +export declare const R2OptionsSchema: z.ZodObject<{ + r2Buckets: z.ZodOptional, z.ZodRecord>; + }, "strip", z.ZodTypeAny, { + id: string; + mixedModeConnectionString?: MixedModeConnectionString | undefined; + }, { + id: string; + mixedModeConnectionString?: MixedModeConnectionString | undefined; + }>>, z.ZodArray]>>; +}, "strip", z.ZodTypeAny, { + r2Buckets?: string[] | Record | Record | undefined; +}, { + r2Buckets?: string[] | Record | Record | undefined; +}>; + +export declare const R2SharedOptionsSchema: z.ZodObject<{ + r2Persist: z.ZodOptional]>>; +}, "strip", z.ZodTypeAny, { + r2Persist?: string | boolean | undefined; +}, { + r2Persist?: string | boolean | undefined; +}>; + +export declare const RATELIMIT_PLUGIN: Plugin; + +export declare const RATELIMIT_PLUGIN_NAME = "ratelimit"; + +export declare const RatelimitConfigSchema: z.ZodObject<{ + simple: z.ZodObject<{ + limit: z.ZodNumber; + period: z.ZodOptional>; + }, "strip", z.ZodTypeAny, { + limit: number; + period?: PeriodType | undefined; + }, { + limit: number; + period?: PeriodType | undefined; + }>; +}, "strip", z.ZodTypeAny, { + simple: { + limit: number; + period?: PeriodType | undefined; + }; +}, { + simple: { + limit: number; + period?: PeriodType | undefined; + }; +}>; + +export declare const RatelimitOptionsSchema: z.ZodObject<{ + ratelimits: z.ZodOptional>; + }, "strip", z.ZodTypeAny, { + limit: number; + period?: PeriodType | undefined; + }, { + limit: number; + period?: PeriodType | undefined; + }>; + }, "strip", z.ZodTypeAny, { + simple: { + limit: number; + period?: PeriodType | undefined; + }; + }, { + simple: { + limit: number; + period?: PeriodType | undefined; + }; + }>>>; +}, "strip", z.ZodTypeAny, { + ratelimits?: Record | undefined; +}, { + ratelimits?: Record | undefined; +}>; + +export declare function readPrefix(stream: ReadableStream_3, prefixLength: number): Promise<[prefix: Buffer, rest: ReadableStream_3]>; + +export declare function reduceError(e: any): JsonError; + +export declare type ReducerReviver = (value: unknown) => unknown; + +export declare type ReducersRevivers = Record; + +export { ReferrerPolicy } + +export declare type ReplaceWorkersTypes = T extends Request_5 ? Request_2 : T extends Response_5 ? Response_2 : T extends ReadableStream_2 ? ReadableStream_3 : Required extends Required ? RequestInit_2 : T extends Headers_3 ? Headers_2 : T extends Blob_2 ? Blob_3 : T extends AbortSignal_2 ? AbortSignal : T extends Promise ? Promise> : T extends (...args: infer P) => infer R ? (...args: ReplaceWorkersTypes

) => ReplaceWorkersTypes : T extends object ? { + [K in keyof T]: OverloadReplaceWorkersTypes; +} : T; + +declare class Request_2 extends Request_4 { + [kCf]?: CfType; + constructor(input: RequestInfo, init?: RequestInit_2); + get cf(): CfType | undefined; + /** @ts-expect-error `clone` is actually defined as a method internally */ + clone(): Request_2; +} +export { Request_2 as Request } + +export { RequestCache } + +export { RequestCredentials } + +export { RequestDestination } + +export { RequestDuplex } + +export declare type RequestInfo = RequestInfo_2 | Request_2; + +declare interface RequestInit_2 extends RequestInit_3 { + cf?: CfType; +} +export { RequestInit_2 as RequestInit } + +export declare type RequestInitCfType = Partial | RequestInitCfProperties; + +export { RequestMode } + +export { RequestRedirect } + +declare class Response_2 extends Response_4 { + readonly [kWebSocket]: WebSocket | null; + static error(): Response_2; + static redirect(url: string | URL, status: ResponseRedirectStatus): Response_2; + static json(data: any, init?: ResponseInit_2): Response_2; + constructor(body?: BodyInit, init?: ResponseInit_2); + /** @ts-expect-error `status` is actually defined as a getter internally */ + get status(): number; + get webSocket(): WebSocket | null; + /** @ts-expect-error `clone` is actually defined as a method internally */ + clone(): Response_2; +} +export { Response_2 as Response } + +declare interface ResponseInit_2 extends ResponseInit_3 { + webSocket?: WebSocket | null; +} +export { ResponseInit_2 as ResponseInit } + +export { ResponseRedirectStatus } + +export { ResponseType } + +export declare class RouterError extends MiniflareError { +} + +export declare type RouterErrorCode = "ERR_QUERY_STRING" | "ERR_INFIX_WILDCARD"; + +export declare class Runtime { + #private; + updateConfig(configBuffer: Buffer, options: Abortable & RuntimeOptions): Promise; + dispose(): Awaitable; +} + +export declare interface RuntimeOptions { + entryAddress: string; + loopbackAddress: string; + requiredSockets: SocketIdentifier[]; + inspectorAddress?: string; + verbose?: boolean; + handleRuntimeStdio?: (stdout: Readable, stderr: Readable) => void; +} + +export declare function sanitisePath(unsafe: string): string; + +export declare const SECRET_STORE_PLUGIN: Plugin; + +export declare const SECRET_STORE_PLUGIN_NAME = "secrets-store"; + +export declare const SecretsStoreSecretsOptionsSchema: z.ZodObject<{ + secretsStoreSecrets: z.ZodOptional>>; +}, "strip", z.ZodTypeAny, { + secretsStoreSecrets?: Record | undefined; +}, { + secretsStoreSecrets?: Record | undefined; +}>; + +export declare const SecretsStoreSecretsSharedOptionsSchema: z.ZodObject<{ + secretsStorePersist: z.ZodOptional]>>; +}, "strip", z.ZodTypeAny, { + secretsStorePersist?: string | boolean | undefined; +}, { + secretsStorePersist?: string | boolean | undefined; +}>; + +export declare interface SerialisableMatcherRegExps { + include: string[]; + exclude: string[]; +} + +export declare interface SerialisableSiteMatcherRegExps { + include?: SerialisableMatcherRegExps; + exclude?: SerialisableMatcherRegExps; +} + +export declare function serialiseRegExps(matcher: MatcherRegExps): SerialisableMatcherRegExps; + +export declare function serialiseSiteRegExps(siteRegExps: SiteMatcherRegExps): SerialisableSiteMatcherRegExps; + +export declare function serializeConfig(config: Config): Buffer; + +export declare type Service = { + name?: string; +} & ({ + worker?: Worker; +} | { + network?: Network; +} | { + external?: ExternalServer; +} | { + disk?: DiskDirectory; +}); + +export declare const SERVICE_ENTRY = "core:entry"; + +export declare const SERVICE_LOOPBACK = "loopback"; + +export declare interface ServiceDesignator { + name?: string; + entrypoint?: string; + props?: { + json: string; + }; +} + +export declare interface ServicesExtensions { + services: Service[]; + extensions: Extension[]; +} + +export declare const SharedBindings: { + readonly TEXT_NAMESPACE: "MINIFLARE_NAMESPACE"; + readonly DURABLE_OBJECT_NAMESPACE_OBJECT: "MINIFLARE_OBJECT"; + readonly MAYBE_SERVICE_BLOBS: "MINIFLARE_BLOBS"; + readonly MAYBE_SERVICE_LOOPBACK: "MINIFLARE_LOOPBACK"; + readonly MAYBE_JSON_ENABLE_CONTROL_ENDPOINTS: "MINIFLARE_ENABLE_CONTROL_ENDPOINTS"; + readonly MAYBE_JSON_ENABLE_STICKY_BLOBS: "MINIFLARE_STICKY_BLOBS"; +}; + +export declare const SharedHeaders: { + readonly LOG_LEVEL: "MF-Log-Level"; +}; + +export declare type SharedOptions = z.input & z.input & z.input & z.input & z.input & z.input & z.input & z.input & z.input; + +export declare const SiteBindings: { + readonly KV_NAMESPACE_SITE: "__STATIC_CONTENT"; + readonly JSON_SITE_MANIFEST: "__STATIC_CONTENT_MANIFEST"; + readonly JSON_SITE_FILTER: "MINIFLARE_SITE_FILTER"; +}; + +export declare interface SiteMatcherRegExps { + include?: MatcherRegExps; + exclude?: MatcherRegExps; +} + +export declare const SITES_NO_CACHE_PREFIX = "$__MINIFLARE_SITES__$/"; + +export declare type Socket = { + name?: string; + address?: string; + service?: ServiceDesignator; +} & ({ + http?: HttpOptions; +} | { + https?: Socket_Https; +}); + +export declare const SOCKET_ENTRY = "entry"; + +export declare const SOCKET_ENTRY_LOCAL = "entry:local"; + +export declare interface Socket_Https { + options?: HttpOptions; + tlsOptions?: TlsOptions; +} + +export declare type SocketIdentifier = string | typeof kInspectorSocket; + +export declare type SocketPorts = Map; + +export declare type SourceOptions = z.infer; + +export declare const SourceOptionsSchema: z.ZodUnion<[z.ZodObject<{ + modules: z.ZodArray; + path: z.ZodEffects; + contents: z.ZodOptional, z.ZodTypeDef, Uint8Array>]>>; + }, "strip", z.ZodTypeAny, { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + path: string; + contents?: string | Uint8Array | undefined; + }, { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + path: string; + contents?: string | Uint8Array | undefined; + }>, "many">; + modulesRoot: z.ZodOptional>; +}, "strip", z.ZodTypeAny, { + modules: { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + path: string; + contents?: string | Uint8Array | undefined; + }[]; + modulesRoot?: string | undefined; +}, { + modules: { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + path: string; + contents?: string | Uint8Array | undefined; + }[]; + modulesRoot?: string | undefined; +}>, z.ZodObject<{ + script: z.ZodString; + scriptPath: z.ZodOptional>; + modules: z.ZodOptional; + modulesRules: z.ZodOptional; + include: z.ZodArray; + fallthrough: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }, { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }>, "many">>; + modulesRoot: z.ZodOptional>; +}, "strip", z.ZodTypeAny, { + script: string; + scriptPath?: string | undefined; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; +}, { + script: string; + scriptPath?: string | undefined; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; +}>, z.ZodObject<{ + scriptPath: z.ZodEffects; + modules: z.ZodOptional; + modulesRules: z.ZodOptional; + include: z.ZodArray; + fallthrough: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }, { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }>, "many">>; + modulesRoot: z.ZodOptional>; +}, "strip", z.ZodTypeAny, { + scriptPath: string; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; +}, { + scriptPath: string; + modules?: boolean | undefined; + modulesRules?: { + type: "ESModule" | "CommonJS" | "Text" | "Data" | "CompiledWasm" | "PythonModule" | "PythonRequirement"; + include: string[]; + fallthrough?: boolean | undefined; + }[] | undefined; + modulesRoot?: string | undefined; +}>]>; + +export declare interface StringifiedWithStream { + value: string; + unbufferedStream?: RS; +} + +export declare function stringifyWithStreams(impl: PlatformImpl, value: unknown, reducers: ReducersRevivers, allowUnbufferedStream: boolean): StringifiedWithStream | Promise>; + +export declare function stripAnsi(value: string): string; + +export declare const structuredSerializableReducers: ReducersRevivers; + +export declare const structuredSerializableRevivers: ReducersRevivers; + +export { supportedCompatibilityDate } + +export declare function testRegExps(matcher: MatcherRegExps, value: string): boolean; + +export declare function testSiteRegExps(regExps: SiteMatcherRegExps, key: string): boolean; + +export declare interface TlsOptions { + keypair?: TlsOptions_Keypair; + requireClientCerts?: boolean; + trustBrowserCas?: boolean; + trustedCertificates?: string[]; + minVersion?: TlsOptions_Version; + cipherList?: string; +} + +export declare interface TlsOptions_Keypair { + privateKey?: string; + certificateChain?: string; +} + +export declare const TlsOptions_Version: { + readonly GOOD_DEFAULT: 0; + readonly SSL3: 1; + readonly TLS1DOT0: 2; + readonly TLS1DOT1: 3; + readonly TLS1DOT2: 4; + readonly TLS1DOT3: 5; +}; + +export declare type TlsOptions_Version = (typeof TlsOptions_Version)[keyof typeof TlsOptions_Version]; + +export declare function _transformsForContentEncodingAndContentType(encoding: string | undefined, type: string | undefined | null): Transform[]; + +export declare type TypedEventListener = ((e: E) => void) | { + handleEvent(e: E): void; +}; + +export declare class TypedEventTarget> extends EventTarget { + addEventListener(type: Type, listener: TypedEventListener | null, options?: AddEventListenerOptions | boolean): void; + removeEventListener(type: Type, listener: TypedEventListener | null, options?: EventListenerOptions | boolean): void; + dispatchEvent(event: ValueOf): boolean; +} + +export declare type UnionToIntersection = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; + +export declare type UnsafeUniqueKey = string | typeof kUnsafeEphemeralUniqueKey; + +export declare type ValueOf = T[keyof T]; + +export declare const VECTORIZE_PLUGIN: Plugin; + +export declare const VECTORIZE_PLUGIN_NAME = "vectorize"; + +export declare const VectorizeOptionsSchema: z.ZodObject<{ + vectorize: z.ZodOptional; + }, "strip", z.ZodTypeAny, { + mixedModeConnectionString: URL & { + __brand: "MixedModeConnectionString"; + }; + index_name: string; + }, { + mixedModeConnectionString: URL & { + __brand: "MixedModeConnectionString"; + }; + index_name: string; + }>>>; +}, "strip", z.ZodTypeAny, { + vectorize?: Record | undefined; +}, { + vectorize?: Record | undefined; +}>; + +export declare function viewToBuffer(view: ArrayBufferView): ArrayBuffer; + +export declare type Void = typeof kVoid; + +export declare class WaitGroup { + private counter; + private resolveQueue; + add(): void; + done(): void; + wait(): Promise; +} + +export declare class WebSocket extends TypedEventTarget { + #private; + static readonly READY_STATE_CONNECTING = 0; + static readonly READY_STATE_OPEN = 1; + static readonly READY_STATE_CLOSING = 2; + static readonly READY_STATE_CLOSED = 3; + [kPair]?: WebSocket; + [kAccepted]: boolean; + [kCoupled]: boolean; + [kClosedOutgoing]: boolean; + [kClosedIncoming]: boolean; + get readyState(): number; + accept(): void; + send(message: string | ArrayBuffer | Uint8Array): void; + [kSend](message: string | ArrayBuffer | Uint8Array): void; + close(code?: number, reason?: string): void; + [kClose](code?: number, reason?: string): void; + [kError](error?: Error): void; +} + +export declare type WebSocketEventMap = { + message: MessageEvent_2; + close: CloseEvent; + error: ErrorEvent; +}; + +export declare type WebSocketPair = { + 0: WebSocket; + 1: WebSocket; +}; + +export declare const WebSocketPair: { + new (): WebSocketPair; +}; + +export declare type Worker = ({ + modules?: Worker_Module[]; +} | { + serviceWorkerScript?: string; +} | { + inherit?: string; +}) & { + compatibilityDate?: string; + compatibilityFlags?: string[]; + bindings?: Worker_Binding[]; + globalOutbound?: ServiceDesignator; + cacheApiOutbound?: ServiceDesignator; + durableObjectNamespaces?: Worker_DurableObjectNamespace[]; + durableObjectUniqueKeyModifier?: string; + durableObjectStorage?: Worker_DurableObjectStorage; + moduleFallback?: string; + tails?: ServiceDesignator[]; +}; + +export declare type Worker_Binding = { + name?: string; +} & ({ + parameter?: Worker_Binding_Parameter; +} | { + text?: string; +} | { + data?: Uint8Array; +} | { + json?: string; +} | { + wasmModule?: Uint8Array; +} | { + cryptoKey?: Worker_Binding_CryptoKey; +} | { + service?: ServiceDesignator; +} | { + durableObjectNamespace?: Worker_Binding_DurableObjectNamespaceDesignator; +} | { + kvNamespace?: ServiceDesignator; +} | { + r2Bucket?: ServiceDesignator; +} | { + r2Admin?: ServiceDesignator; +} | { + wrapped?: Worker_Binding_WrappedBinding; +} | { + queue?: ServiceDesignator; +} | { + fromEnvironment?: string; +} | { + analyticsEngine?: ServiceDesignator; +} | { + hyperdrive?: Worker_Binding_Hyperdrive; +} | { + unsafeEval?: Void; +}); + +export declare type Worker_Binding_CryptoKey = ({ + raw?: Uint8Array; +} | { + hex?: string; +} | { + base64?: string; +} | { + pkcs8?: string; +} | { + spki?: string; +} | { + jwk?: string; +}) & { + algorithm?: Worker_Binding_CryptoKey_Algorithm; + extractable?: boolean; + usages?: Worker_Binding_CryptoKey_Usage[]; +}; + +export declare type Worker_Binding_CryptoKey_Algorithm = { + name?: string; +} | { + json?: string; +}; + +export declare const Worker_Binding_CryptoKey_Usage: { + readonly ENCRYPT: 0; + readonly DECRYPT: 1; + readonly SIGN: 2; + readonly VERIFY: 3; + readonly DERIVE_KEY: 4; + readonly DERIVE_BITS: 5; + readonly WRAP_KEY: 6; + readonly UNWRAP_KEY: 7; +}; + +export declare type Worker_Binding_CryptoKey_Usage = (typeof Worker_Binding_CryptoKey_Usage)[keyof typeof Worker_Binding_CryptoKey_Usage]; + +export declare type Worker_Binding_DurableObjectNamespaceDesignator = { + className?: string; + serviceName?: string; +}; + +export declare interface Worker_Binding_Hyperdrive { + designator?: ServiceDesignator; + database?: string; + user?: string; + password?: string; + scheme?: string; +} + +export declare interface Worker_Binding_MemoryCache { + id?: string; + limits?: Worker_Binding_MemoryCacheLimits; +} + +export declare interface Worker_Binding_MemoryCacheLimits { + maxKeys?: number; + maxValueSize?: number; + maxTotalValueSize?: number; +} + +export declare interface Worker_Binding_Parameter { + type?: Worker_Binding_Type; + optional?: boolean; +} + +export declare const WORKER_BINDING_SERVICE_LOOPBACK: Worker_Binding; + +export declare type Worker_Binding_Type = { + text?: Void; +} | { + data?: Void; +} | { + json?: Void; +} | { + wasm?: Void; +} | { + cryptoKey?: Worker_Binding_CryptoKey_Usage[]; +} | { + service?: Void; +} | { + durableObjectNamespace: Void; +} | { + kvNamespace?: Void; +} | { + r2Bucket?: Void; +} | { + r2Admin?: Void; +} | { + queue?: Void; +} | { + analyticsEngine?: Void; +} | { + hyperdrive?: Void; +}; + +export declare interface Worker_Binding_WrappedBinding { + moduleName?: string; + entrypoint?: string; + innerBindings?: Worker_Binding[]; +} + +export declare type Worker_DurableObjectNamespace = { + className?: string; + preventEviction?: boolean; + enableSql?: boolean; +} & ({ + uniqueKey?: string; +} | { + ephemeralLocal?: Void; +}); + +export declare type Worker_DurableObjectStorage = { + none?: Void; +} | { + inMemory?: Void; +} | { + localDisk?: string; +}; + +export declare type Worker_Module = { + name: string; +} & ({ + esModule?: string; +} | { + commonJsModule?: string; +} | { + text?: string; +} | { + data?: Uint8Array; +} | { + wasm?: Uint8Array; +} | { + json?: string; +} | { + pythonModule?: string; +} | { + pythonRequirement?: string; +}); + +export declare type WorkerOptions = z.input & z.input & z.input & z.input & z.input & z.input & z.input & z.input & z.input & z.input & z.input & z.input & z.input & z.input & z.input & z.input & z.input & z.input & z.input & z.input; + +export declare interface WorkerRoute { + target: string; + route: string; + specificity: number; + protocol?: string; + allowHostnamePrefix: boolean; + hostname: string; + path: string; + allowPathSuffix: boolean; +} + +export declare const WORKFLOWS_PLUGIN: Plugin; + +export declare const WORKFLOWS_PLUGIN_NAME = "workflows"; + +export declare const WORKFLOWS_STORAGE_SERVICE_NAME = "workflows:storage"; + +export declare const WorkflowsOptionsSchema: z.ZodObject<{ + workflows: z.ZodOptional; + mixedModeConnectionString: z.ZodOptional>; + }, "strip", z.ZodTypeAny, { + name: string; + className: string; + scriptName?: string | undefined; + mixedModeConnectionString?: MixedModeConnectionString | undefined; + }, { + name: string; + className: string; + scriptName?: string | undefined; + mixedModeConnectionString?: MixedModeConnectionString | undefined; + }>>>; +}, "strip", z.ZodTypeAny, { + workflows?: Record | undefined; +}, { + workflows?: Record | undefined; +}>; + +export declare const WorkflowsSharedOptionsSchema: z.ZodObject<{ + workflowsPersist: z.ZodOptional]>>; +}, "strip", z.ZodTypeAny, { + workflowsPersist?: string | boolean | undefined; +}, { + workflowsPersist?: string | boolean | undefined; +}>; + +export declare type WrappedBindingNames = Set; + +export declare function zAwaitable(type: T): z.ZodUnion<[T, z.ZodPromise]>; + +export { } diff --git a/node_modules/miniflare/dist/src/index.js b/node_modules/miniflare/dist/src/index.js new file mode 100644 index 0000000..3f83189 --- /dev/null +++ b/node_modules/miniflare/dist/src/index.js @@ -0,0 +1,17298 @@ +"use strict"; +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 __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// ../../node_modules/.pnpm/ignore@5.3.1/node_modules/ignore/index.js +var require_ignore = __commonJS({ + "../../node_modules/.pnpm/ignore@5.3.1/node_modules/ignore/index.js"(exports2, module2) { + "use strict"; + function makeArray(subject) { + return Array.isArray(subject) ? subject : [subject]; + } + var EMPTY = ""; + var SPACE = " "; + var ESCAPE = "\\"; + var REGEX_TEST_BLANK_LINE = /^\s+$/; + var REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/; + var REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/; + var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/; + var REGEX_SPLITALL_CRLF = /\r?\n/g; + var REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/; + var SLASH = "/"; + var TMP_KEY_IGNORE = "node-ignore"; + if (typeof Symbol !== "undefined") { + TMP_KEY_IGNORE = Symbol.for("node-ignore"); + } + var KEY_IGNORE = TMP_KEY_IGNORE; + var define = (object, key, value) => Object.defineProperty(object, key, { value }); + var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g; + var RETURN_FALSE = () => false; + var sanitizeRange = (range) => range.replace( + REGEX_REGEXP_RANGE, + (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0) ? match : EMPTY + ); + var cleanRangeBackSlash = (slashes) => { + const { length } = slashes; + return slashes.slice(0, length - length % 2); + }; + var REPLACERS = [ + [ + // remove BOM + // TODO: + // Other similar zero-width characters? + /^\uFEFF/, + () => EMPTY + ], + // > Trailing spaces are ignored unless they are quoted with backslash ("\") + [ + // (a\ ) -> (a ) + // (a ) -> (a) + // (a \ ) -> (a ) + /\\?\s+$/, + (match) => match.indexOf("\\") === 0 ? SPACE : EMPTY + ], + // replace (\ ) with ' ' + [ + /\\\s/g, + () => SPACE + ], + // Escape metacharacters + // which is written down by users but means special for regular expressions. + // > There are 12 characters with special meanings: + // > - the backslash \, + // > - the caret ^, + // > - the dollar sign $, + // > - the period or dot ., + // > - the vertical bar or pipe symbol |, + // > - the question mark ?, + // > - the asterisk or star *, + // > - the plus sign +, + // > - the opening parenthesis (, + // > - the closing parenthesis ), + // > - and the opening square bracket [, + // > - the opening curly brace {, + // > These special characters are often called "metacharacters". + [ + /[\\$.|*+(){^]/g, + (match) => `\\${match}` + ], + [ + // > a question mark (?) matches a single character + /(?!\\)\?/g, + () => "[^/]" + ], + // leading slash + [ + // > A leading slash matches the beginning of the pathname. + // > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c". + // A leading slash matches the beginning of the pathname + /^\//, + () => "^" + ], + // replace special metacharacter slash after the leading slash + [ + /\//g, + () => "\\/" + ], + [ + // > A leading "**" followed by a slash means match in all directories. + // > For example, "**/foo" matches file or directory "foo" anywhere, + // > the same as pattern "foo". + // > "**/foo/bar" matches file or directory "bar" anywhere that is directly + // > under directory "foo". + // Notice that the '*'s have been replaced as '\\*' + /^\^*\\\*\\\*\\\//, + // '**/foo' <-> 'foo' + () => "^(?:.*\\/)?" + ], + // starting + [ + // there will be no leading '/' + // (which has been replaced by section "leading slash") + // If starts with '**', adding a '^' to the regular expression also works + /^(?=[^^])/, + function startingReplacer() { + return !/\/(?!$)/.test(this) ? "(?:^|\\/)" : "^"; + } + ], + // two globstars + [ + // Use lookahead assertions so that we could match more than one `'/**'` + /\\\/\\\*\\\*(?=\\\/|$)/g, + // Zero, one or several directories + // should not use '*', or it will be replaced by the next replacer + // Check if it is not the last `'/**'` + (_, index, str) => index + 6 < str.length ? "(?:\\/[^\\/]+)*" : "\\/.+" + ], + // normal intermediate wildcards + [ + // Never replace escaped '*' + // ignore rule '\*' will match the path '*' + // 'abc.*/' -> go + // 'abc.*' -> skip this rule, + // coz trailing single wildcard will be handed by [trailing wildcard] + /(^|[^\\]+)(\\\*)+(?=.+)/g, + // '*.js' matches '.js' + // '*.js' doesn't match 'abc' + (_, p1, p2) => { + const unescaped = p2.replace(/\\\*/g, "[^\\/]*"); + return p1 + unescaped; + } + ], + [ + // unescape, revert step 3 except for back slash + // For example, if a user escape a '\\*', + // after step 3, the result will be '\\\\\\*' + /\\\\\\(?=[$.|*+(){^])/g, + () => ESCAPE + ], + [ + // '\\\\' -> '\\' + /\\\\/g, + () => ESCAPE + ], + [ + // > The range notation, e.g. [a-zA-Z], + // > can be used to match one of the characters in a range. + // `\` is escaped by step 3 + /(\\)?\[([^\]/]*?)(\\*)($|\])/g, + (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE ? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}` : close === "]" ? endEscape.length % 2 === 0 ? `[${sanitizeRange(range)}${endEscape}]` : "[]" : "[]" + ], + // ending + [ + // 'js' will not match 'js.' + // 'ab' will not match 'abc' + /(?:[^*])$/, + // WTF! + // https://git-scm.com/docs/gitignore + // changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1) + // which re-fixes #24, #38 + // > If there is a separator at the end of the pattern then the pattern + // > will only match directories, otherwise the pattern can match both + // > files and directories. + // 'js*' will not match 'a.js' + // 'js/' will not match 'a.js' + // 'js' will match 'a.js' and 'a.js/' + (match) => /\/$/.test(match) ? `${match}$` : `${match}(?=$|\\/$)` + ], + // trailing wildcard + [ + /(\^|\\\/)?\\\*$/, + (_, p1) => { + const prefix = p1 ? `${p1}[^/]+` : "[^/]*"; + return `${prefix}(?=$|\\/$)`; + } + ] + ]; + var regexCache = /* @__PURE__ */ Object.create(null); + var makeRegex = (pattern, ignoreCase) => { + let source = regexCache[pattern]; + if (!source) { + source = REPLACERS.reduce( + (prev, current) => prev.replace(current[0], current[1].bind(pattern)), + pattern + ); + regexCache[pattern] = source; + } + return ignoreCase ? new RegExp(source, "i") : new RegExp(source); + }; + var isString = (subject) => typeof subject === "string"; + var checkPattern = (pattern) => pattern && isString(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern) && pattern.indexOf("#") !== 0; + var splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF); + var IgnoreRule = class { + constructor(origin, pattern, negative, regex) { + this.origin = origin; + this.pattern = pattern; + this.negative = negative; + this.regex = regex; + } + }; + var createRule = (pattern, ignoreCase) => { + const origin = pattern; + let negative = false; + if (pattern.indexOf("!") === 0) { + negative = true; + pattern = pattern.substr(1); + } + pattern = pattern.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#"); + const regex = makeRegex(pattern, ignoreCase); + return new IgnoreRule( + origin, + pattern, + negative, + regex + ); + }; + var throwError = (message, Ctor) => { + throw new Ctor(message); + }; + var checkPath = (path37, originalPath, doThrow) => { + if (!isString(path37)) { + return doThrow( + `path must be a string, but got \`${originalPath}\``, + TypeError + ); + } + if (!path37) { + return doThrow(`path must not be empty`, TypeError); + } + if (checkPath.isNotRelative(path37)) { + const r = "`path.relative()`d"; + return doThrow( + `path should be a ${r} string, but got "${originalPath}"`, + RangeError + ); + } + return true; + }; + var isNotRelative = (path37) => REGEX_TEST_INVALID_PATH.test(path37); + checkPath.isNotRelative = isNotRelative; + checkPath.convert = (p) => p; + var Ignore = class { + constructor({ + ignorecase = true, + ignoreCase = ignorecase, + allowRelativePaths = false + } = {}) { + define(this, KEY_IGNORE, true); + this._rules = []; + this._ignoreCase = ignoreCase; + this._allowRelativePaths = allowRelativePaths; + this._initCache(); + } + _initCache() { + this._ignoreCache = /* @__PURE__ */ Object.create(null); + this._testCache = /* @__PURE__ */ Object.create(null); + } + _addPattern(pattern) { + if (pattern && pattern[KEY_IGNORE]) { + this._rules = this._rules.concat(pattern._rules); + this._added = true; + return; + } + if (checkPattern(pattern)) { + const rule = createRule(pattern, this._ignoreCase); + this._added = true; + this._rules.push(rule); + } + } + // @param {Array | string | Ignore} pattern + add(pattern) { + this._added = false; + makeArray( + isString(pattern) ? splitPattern(pattern) : pattern + ).forEach(this._addPattern, this); + if (this._added) { + this._initCache(); + } + return this; + } + // legacy + addPattern(pattern) { + return this.add(pattern); + } + // | ignored : unignored + // negative | 0:0 | 0:1 | 1:0 | 1:1 + // -------- | ------- | ------- | ------- | -------- + // 0 | TEST | TEST | SKIP | X + // 1 | TESTIF | SKIP | TEST | X + // - SKIP: always skip + // - TEST: always test + // - TESTIF: only test if checkUnignored + // - X: that never happen + // @param {boolean} whether should check if the path is unignored, + // setting `checkUnignored` to `false` could reduce additional + // path matching. + // @returns {TestResult} true if a file is ignored + _testOne(path37, checkUnignored) { + let ignored2 = false; + let unignored = false; + this._rules.forEach((rule) => { + const { negative } = rule; + if (unignored === negative && ignored2 !== unignored || negative && !ignored2 && !unignored && !checkUnignored) { + return; + } + const matched = rule.regex.test(path37); + if (matched) { + ignored2 = !negative; + unignored = negative; + } + }); + return { + ignored: ignored2, + unignored + }; + } + // @returns {TestResult} + _test(originalPath, cache, checkUnignored, slices) { + const path37 = originalPath && checkPath.convert(originalPath); + checkPath( + path37, + originalPath, + this._allowRelativePaths ? RETURN_FALSE : throwError + ); + return this._t(path37, cache, checkUnignored, slices); + } + _t(path37, cache, checkUnignored, slices) { + if (path37 in cache) { + return cache[path37]; + } + if (!slices) { + slices = path37.split(SLASH); + } + slices.pop(); + if (!slices.length) { + return cache[path37] = this._testOne(path37, checkUnignored); + } + const parent = this._t( + slices.join(SLASH) + SLASH, + cache, + checkUnignored, + slices + ); + return cache[path37] = parent.ignored ? parent : this._testOne(path37, checkUnignored); + } + ignores(path37) { + return this._test(path37, this._ignoreCache, false).ignored; + } + createFilter() { + return (path37) => !this.ignores(path37); + } + filter(paths) { + return makeArray(paths).filter(this.createFilter()); + } + // @returns {TestResult} + test(path37) { + return this._test(path37, this._testCache, true); + } + }; + var factory = (options) => new Ignore(options); + var isPathValid = (path37) => checkPath(path37 && checkPath.convert(path37), path37, RETURN_FALSE); + factory.isPathValid = isPathValid; + factory.default = factory; + module2.exports = factory; + if ( + // Detect `process` so that it can run in browsers. + typeof process !== "undefined" && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === "win32") + ) { + const makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/"); + checkPath.convert = makePosix; + const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i; + checkPath.isNotRelative = (path37) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path37) || isNotRelative(path37); + } + } +}); + +// ../../node_modules/.pnpm/mime@3.0.0/node_modules/mime/Mime.js +var require_Mime = __commonJS({ + "../../node_modules/.pnpm/mime@3.0.0/node_modules/mime/Mime.js"(exports2, module2) { + "use strict"; + function Mime() { + this._types = /* @__PURE__ */ Object.create(null); + this._extensions = /* @__PURE__ */ Object.create(null); + for (let i = 0; i < arguments.length; i++) { + this.define(arguments[i]); + } + this.define = this.define.bind(this); + this.getType = this.getType.bind(this); + this.getExtension = this.getExtension.bind(this); + } + Mime.prototype.define = function(typeMap, force) { + for (let type in typeMap) { + let extensions = typeMap[type].map(function(t) { + return t.toLowerCase(); + }); + type = type.toLowerCase(); + for (let i = 0; i < extensions.length; i++) { + const ext = extensions[i]; + if (ext[0] === "*") { + continue; + } + if (!force && ext in this._types) { + throw new Error( + 'Attempt to change mapping for "' + ext + '" extension from "' + this._types[ext] + '" to "' + type + '". Pass `force=true` to allow this, otherwise remove "' + ext + '" from the list of extensions for "' + type + '".' + ); + } + this._types[ext] = type; + } + if (force || !this._extensions[type]) { + const ext = extensions[0]; + this._extensions[type] = ext[0] !== "*" ? ext : ext.substr(1); + } + } + }; + Mime.prototype.getType = function(path37) { + path37 = String(path37); + let last = path37.replace(/^.*[/\\]/, "").toLowerCase(); + let ext = last.replace(/^.*\./, "").toLowerCase(); + let hasPath = last.length < path37.length; + let hasDot = ext.length < last.length - 1; + return (hasDot || !hasPath) && this._types[ext] || null; + }; + Mime.prototype.getExtension = function(type) { + type = /^\s*([^;\s]*)/.test(type) && RegExp.$1; + return type && this._extensions[type.toLowerCase()] || null; + }; + module2.exports = Mime; + } +}); + +// ../../node_modules/.pnpm/mime@3.0.0/node_modules/mime/types/standard.js +var require_standard = __commonJS({ + "../../node_modules/.pnpm/mime@3.0.0/node_modules/mime/types/standard.js"(exports2, module2) { + "use strict"; + module2.exports = { "application/andrew-inset": ["ez"], "application/applixware": ["aw"], "application/atom+xml": ["atom"], "application/atomcat+xml": ["atomcat"], "application/atomdeleted+xml": ["atomdeleted"], "application/atomsvc+xml": ["atomsvc"], "application/atsc-dwd+xml": ["dwd"], "application/atsc-held+xml": ["held"], "application/atsc-rsat+xml": ["rsat"], "application/bdoc": ["bdoc"], "application/calendar+xml": ["xcs"], "application/ccxml+xml": ["ccxml"], "application/cdfx+xml": ["cdfx"], "application/cdmi-capability": ["cdmia"], "application/cdmi-container": ["cdmic"], "application/cdmi-domain": ["cdmid"], "application/cdmi-object": ["cdmio"], "application/cdmi-queue": ["cdmiq"], "application/cu-seeme": ["cu"], "application/dash+xml": ["mpd"], "application/davmount+xml": ["davmount"], "application/docbook+xml": ["dbk"], "application/dssc+der": ["dssc"], "application/dssc+xml": ["xdssc"], "application/ecmascript": ["es", "ecma"], "application/emma+xml": ["emma"], "application/emotionml+xml": ["emotionml"], "application/epub+zip": ["epub"], "application/exi": ["exi"], "application/express": ["exp"], "application/fdt+xml": ["fdt"], "application/font-tdpfr": ["pfr"], "application/geo+json": ["geojson"], "application/gml+xml": ["gml"], "application/gpx+xml": ["gpx"], "application/gxf": ["gxf"], "application/gzip": ["gz"], "application/hjson": ["hjson"], "application/hyperstudio": ["stk"], "application/inkml+xml": ["ink", "inkml"], "application/ipfix": ["ipfix"], "application/its+xml": ["its"], "application/java-archive": ["jar", "war", "ear"], "application/java-serialized-object": ["ser"], "application/java-vm": ["class"], "application/javascript": ["js", "mjs"], "application/json": ["json", "map"], "application/json5": ["json5"], "application/jsonml+json": ["jsonml"], "application/ld+json": ["jsonld"], "application/lgr+xml": ["lgr"], "application/lost+xml": ["lostxml"], "application/mac-binhex40": ["hqx"], "application/mac-compactpro": ["cpt"], "application/mads+xml": ["mads"], "application/manifest+json": ["webmanifest"], "application/marc": ["mrc"], "application/marcxml+xml": ["mrcx"], "application/mathematica": ["ma", "nb", "mb"], "application/mathml+xml": ["mathml"], "application/mbox": ["mbox"], "application/mediaservercontrol+xml": ["mscml"], "application/metalink+xml": ["metalink"], "application/metalink4+xml": ["meta4"], "application/mets+xml": ["mets"], "application/mmt-aei+xml": ["maei"], "application/mmt-usd+xml": ["musd"], "application/mods+xml": ["mods"], "application/mp21": ["m21", "mp21"], "application/mp4": ["mp4s", "m4p"], "application/msword": ["doc", "dot"], "application/mxf": ["mxf"], "application/n-quads": ["nq"], "application/n-triples": ["nt"], "application/node": ["cjs"], "application/octet-stream": ["bin", "dms", "lrf", "mar", "so", "dist", "distz", "pkg", "bpk", "dump", "elc", "deploy", "exe", "dll", "deb", "dmg", "iso", "img", "msi", "msp", "msm", "buffer"], "application/oda": ["oda"], "application/oebps-package+xml": ["opf"], "application/ogg": ["ogx"], "application/omdoc+xml": ["omdoc"], "application/onenote": ["onetoc", "onetoc2", "onetmp", "onepkg"], "application/oxps": ["oxps"], "application/p2p-overlay+xml": ["relo"], "application/patch-ops-error+xml": ["xer"], "application/pdf": ["pdf"], "application/pgp-encrypted": ["pgp"], "application/pgp-signature": ["asc", "sig"], "application/pics-rules": ["prf"], "application/pkcs10": ["p10"], "application/pkcs7-mime": ["p7m", "p7c"], "application/pkcs7-signature": ["p7s"], "application/pkcs8": ["p8"], "application/pkix-attr-cert": ["ac"], "application/pkix-cert": ["cer"], "application/pkix-crl": ["crl"], "application/pkix-pkipath": ["pkipath"], "application/pkixcmp": ["pki"], "application/pls+xml": ["pls"], "application/postscript": ["ai", "eps", "ps"], "application/provenance+xml": ["provx"], "application/pskc+xml": ["pskcxml"], "application/raml+yaml": ["raml"], "application/rdf+xml": ["rdf", "owl"], "application/reginfo+xml": ["rif"], "application/relax-ng-compact-syntax": ["rnc"], "application/resource-lists+xml": ["rl"], "application/resource-lists-diff+xml": ["rld"], "application/rls-services+xml": ["rs"], "application/route-apd+xml": ["rapd"], "application/route-s-tsid+xml": ["sls"], "application/route-usd+xml": ["rusd"], "application/rpki-ghostbusters": ["gbr"], "application/rpki-manifest": ["mft"], "application/rpki-roa": ["roa"], "application/rsd+xml": ["rsd"], "application/rss+xml": ["rss"], "application/rtf": ["rtf"], "application/sbml+xml": ["sbml"], "application/scvp-cv-request": ["scq"], "application/scvp-cv-response": ["scs"], "application/scvp-vp-request": ["spq"], "application/scvp-vp-response": ["spp"], "application/sdp": ["sdp"], "application/senml+xml": ["senmlx"], "application/sensml+xml": ["sensmlx"], "application/set-payment-initiation": ["setpay"], "application/set-registration-initiation": ["setreg"], "application/shf+xml": ["shf"], "application/sieve": ["siv", "sieve"], "application/smil+xml": ["smi", "smil"], "application/sparql-query": ["rq"], "application/sparql-results+xml": ["srx"], "application/srgs": ["gram"], "application/srgs+xml": ["grxml"], "application/sru+xml": ["sru"], "application/ssdl+xml": ["ssdl"], "application/ssml+xml": ["ssml"], "application/swid+xml": ["swidtag"], "application/tei+xml": ["tei", "teicorpus"], "application/thraud+xml": ["tfi"], "application/timestamped-data": ["tsd"], "application/toml": ["toml"], "application/trig": ["trig"], "application/ttml+xml": ["ttml"], "application/ubjson": ["ubj"], "application/urc-ressheet+xml": ["rsheet"], "application/urc-targetdesc+xml": ["td"], "application/voicexml+xml": ["vxml"], "application/wasm": ["wasm"], "application/widget": ["wgt"], "application/winhlp": ["hlp"], "application/wsdl+xml": ["wsdl"], "application/wspolicy+xml": ["wspolicy"], "application/xaml+xml": ["xaml"], "application/xcap-att+xml": ["xav"], "application/xcap-caps+xml": ["xca"], "application/xcap-diff+xml": ["xdf"], "application/xcap-el+xml": ["xel"], "application/xcap-ns+xml": ["xns"], "application/xenc+xml": ["xenc"], "application/xhtml+xml": ["xhtml", "xht"], "application/xliff+xml": ["xlf"], "application/xml": ["xml", "xsl", "xsd", "rng"], "application/xml-dtd": ["dtd"], "application/xop+xml": ["xop"], "application/xproc+xml": ["xpl"], "application/xslt+xml": ["*xsl", "xslt"], "application/xspf+xml": ["xspf"], "application/xv+xml": ["mxml", "xhvml", "xvml", "xvm"], "application/yang": ["yang"], "application/yin+xml": ["yin"], "application/zip": ["zip"], "audio/3gpp": ["*3gpp"], "audio/adpcm": ["adp"], "audio/amr": ["amr"], "audio/basic": ["au", "snd"], "audio/midi": ["mid", "midi", "kar", "rmi"], "audio/mobile-xmf": ["mxmf"], "audio/mp3": ["*mp3"], "audio/mp4": ["m4a", "mp4a"], "audio/mpeg": ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"], "audio/ogg": ["oga", "ogg", "spx", "opus"], "audio/s3m": ["s3m"], "audio/silk": ["sil"], "audio/wav": ["wav"], "audio/wave": ["*wav"], "audio/webm": ["weba"], "audio/xm": ["xm"], "font/collection": ["ttc"], "font/otf": ["otf"], "font/ttf": ["ttf"], "font/woff": ["woff"], "font/woff2": ["woff2"], "image/aces": ["exr"], "image/apng": ["apng"], "image/avif": ["avif"], "image/bmp": ["bmp"], "image/cgm": ["cgm"], "image/dicom-rle": ["drle"], "image/emf": ["emf"], "image/fits": ["fits"], "image/g3fax": ["g3"], "image/gif": ["gif"], "image/heic": ["heic"], "image/heic-sequence": ["heics"], "image/heif": ["heif"], "image/heif-sequence": ["heifs"], "image/hej2k": ["hej2"], "image/hsj2": ["hsj2"], "image/ief": ["ief"], "image/jls": ["jls"], "image/jp2": ["jp2", "jpg2"], "image/jpeg": ["jpeg", "jpg", "jpe"], "image/jph": ["jph"], "image/jphc": ["jhc"], "image/jpm": ["jpm"], "image/jpx": ["jpx", "jpf"], "image/jxr": ["jxr"], "image/jxra": ["jxra"], "image/jxrs": ["jxrs"], "image/jxs": ["jxs"], "image/jxsc": ["jxsc"], "image/jxsi": ["jxsi"], "image/jxss": ["jxss"], "image/ktx": ["ktx"], "image/ktx2": ["ktx2"], "image/png": ["png"], "image/sgi": ["sgi"], "image/svg+xml": ["svg", "svgz"], "image/t38": ["t38"], "image/tiff": ["tif", "tiff"], "image/tiff-fx": ["tfx"], "image/webp": ["webp"], "image/wmf": ["wmf"], "message/disposition-notification": ["disposition-notification"], "message/global": ["u8msg"], "message/global-delivery-status": ["u8dsn"], "message/global-disposition-notification": ["u8mdn"], "message/global-headers": ["u8hdr"], "message/rfc822": ["eml", "mime"], "model/3mf": ["3mf"], "model/gltf+json": ["gltf"], "model/gltf-binary": ["glb"], "model/iges": ["igs", "iges"], "model/mesh": ["msh", "mesh", "silo"], "model/mtl": ["mtl"], "model/obj": ["obj"], "model/step+xml": ["stpx"], "model/step+zip": ["stpz"], "model/step-xml+zip": ["stpxz"], "model/stl": ["stl"], "model/vrml": ["wrl", "vrml"], "model/x3d+binary": ["*x3db", "x3dbz"], "model/x3d+fastinfoset": ["x3db"], "model/x3d+vrml": ["*x3dv", "x3dvz"], "model/x3d+xml": ["x3d", "x3dz"], "model/x3d-vrml": ["x3dv"], "text/cache-manifest": ["appcache", "manifest"], "text/calendar": ["ics", "ifb"], "text/coffeescript": ["coffee", "litcoffee"], "text/css": ["css"], "text/csv": ["csv"], "text/html": ["html", "htm", "shtml"], "text/jade": ["jade"], "text/jsx": ["jsx"], "text/less": ["less"], "text/markdown": ["markdown", "md"], "text/mathml": ["mml"], "text/mdx": ["mdx"], "text/n3": ["n3"], "text/plain": ["txt", "text", "conf", "def", "list", "log", "in", "ini"], "text/richtext": ["rtx"], "text/rtf": ["*rtf"], "text/sgml": ["sgml", "sgm"], "text/shex": ["shex"], "text/slim": ["slim", "slm"], "text/spdx": ["spdx"], "text/stylus": ["stylus", "styl"], "text/tab-separated-values": ["tsv"], "text/troff": ["t", "tr", "roff", "man", "me", "ms"], "text/turtle": ["ttl"], "text/uri-list": ["uri", "uris", "urls"], "text/vcard": ["vcard"], "text/vtt": ["vtt"], "text/xml": ["*xml"], "text/yaml": ["yaml", "yml"], "video/3gpp": ["3gp", "3gpp"], "video/3gpp2": ["3g2"], "video/h261": ["h261"], "video/h263": ["h263"], "video/h264": ["h264"], "video/iso.segment": ["m4s"], "video/jpeg": ["jpgv"], "video/jpm": ["*jpm", "jpgm"], "video/mj2": ["mj2", "mjp2"], "video/mp2t": ["ts"], "video/mp4": ["mp4", "mp4v", "mpg4"], "video/mpeg": ["mpeg", "mpg", "mpe", "m1v", "m2v"], "video/ogg": ["ogv"], "video/quicktime": ["qt", "mov"], "video/webm": ["webm"] }; + } +}); + +// ../../node_modules/.pnpm/mime@3.0.0/node_modules/mime/types/other.js +var require_other = __commonJS({ + "../../node_modules/.pnpm/mime@3.0.0/node_modules/mime/types/other.js"(exports2, module2) { + "use strict"; + module2.exports = { "application/prs.cww": ["cww"], "application/vnd.1000minds.decision-model+xml": ["1km"], "application/vnd.3gpp.pic-bw-large": ["plb"], "application/vnd.3gpp.pic-bw-small": ["psb"], "application/vnd.3gpp.pic-bw-var": ["pvb"], "application/vnd.3gpp2.tcap": ["tcap"], "application/vnd.3m.post-it-notes": ["pwn"], "application/vnd.accpac.simply.aso": ["aso"], "application/vnd.accpac.simply.imp": ["imp"], "application/vnd.acucobol": ["acu"], "application/vnd.acucorp": ["atc", "acutc"], "application/vnd.adobe.air-application-installer-package+zip": ["air"], "application/vnd.adobe.formscentral.fcdt": ["fcdt"], "application/vnd.adobe.fxp": ["fxp", "fxpl"], "application/vnd.adobe.xdp+xml": ["xdp"], "application/vnd.adobe.xfdf": ["xfdf"], "application/vnd.ahead.space": ["ahead"], "application/vnd.airzip.filesecure.azf": ["azf"], "application/vnd.airzip.filesecure.azs": ["azs"], "application/vnd.amazon.ebook": ["azw"], "application/vnd.americandynamics.acc": ["acc"], "application/vnd.amiga.ami": ["ami"], "application/vnd.android.package-archive": ["apk"], "application/vnd.anser-web-certificate-issue-initiation": ["cii"], "application/vnd.anser-web-funds-transfer-initiation": ["fti"], "application/vnd.antix.game-component": ["atx"], "application/vnd.apple.installer+xml": ["mpkg"], "application/vnd.apple.keynote": ["key"], "application/vnd.apple.mpegurl": ["m3u8"], "application/vnd.apple.numbers": ["numbers"], "application/vnd.apple.pages": ["pages"], "application/vnd.apple.pkpass": ["pkpass"], "application/vnd.aristanetworks.swi": ["swi"], "application/vnd.astraea-software.iota": ["iota"], "application/vnd.audiograph": ["aep"], "application/vnd.balsamiq.bmml+xml": ["bmml"], "application/vnd.blueice.multipass": ["mpm"], "application/vnd.bmi": ["bmi"], "application/vnd.businessobjects": ["rep"], "application/vnd.chemdraw+xml": ["cdxml"], "application/vnd.chipnuts.karaoke-mmd": ["mmd"], "application/vnd.cinderella": ["cdy"], "application/vnd.citationstyles.style+xml": ["csl"], "application/vnd.claymore": ["cla"], "application/vnd.cloanto.rp9": ["rp9"], "application/vnd.clonk.c4group": ["c4g", "c4d", "c4f", "c4p", "c4u"], "application/vnd.cluetrust.cartomobile-config": ["c11amc"], "application/vnd.cluetrust.cartomobile-config-pkg": ["c11amz"], "application/vnd.commonspace": ["csp"], "application/vnd.contact.cmsg": ["cdbcmsg"], "application/vnd.cosmocaller": ["cmc"], "application/vnd.crick.clicker": ["clkx"], "application/vnd.crick.clicker.keyboard": ["clkk"], "application/vnd.crick.clicker.palette": ["clkp"], "application/vnd.crick.clicker.template": ["clkt"], "application/vnd.crick.clicker.wordbank": ["clkw"], "application/vnd.criticaltools.wbs+xml": ["wbs"], "application/vnd.ctc-posml": ["pml"], "application/vnd.cups-ppd": ["ppd"], "application/vnd.curl.car": ["car"], "application/vnd.curl.pcurl": ["pcurl"], "application/vnd.dart": ["dart"], "application/vnd.data-vision.rdz": ["rdz"], "application/vnd.dbf": ["dbf"], "application/vnd.dece.data": ["uvf", "uvvf", "uvd", "uvvd"], "application/vnd.dece.ttml+xml": ["uvt", "uvvt"], "application/vnd.dece.unspecified": ["uvx", "uvvx"], "application/vnd.dece.zip": ["uvz", "uvvz"], "application/vnd.denovo.fcselayout-link": ["fe_launch"], "application/vnd.dna": ["dna"], "application/vnd.dolby.mlp": ["mlp"], "application/vnd.dpgraph": ["dpg"], "application/vnd.dreamfactory": ["dfac"], "application/vnd.ds-keypoint": ["kpxx"], "application/vnd.dvb.ait": ["ait"], "application/vnd.dvb.service": ["svc"], "application/vnd.dynageo": ["geo"], "application/vnd.ecowin.chart": ["mag"], "application/vnd.enliven": ["nml"], "application/vnd.epson.esf": ["esf"], "application/vnd.epson.msf": ["msf"], "application/vnd.epson.quickanime": ["qam"], "application/vnd.epson.salt": ["slt"], "application/vnd.epson.ssf": ["ssf"], "application/vnd.eszigno3+xml": ["es3", "et3"], "application/vnd.ezpix-album": ["ez2"], "application/vnd.ezpix-package": ["ez3"], "application/vnd.fdf": ["fdf"], "application/vnd.fdsn.mseed": ["mseed"], "application/vnd.fdsn.seed": ["seed", "dataless"], "application/vnd.flographit": ["gph"], "application/vnd.fluxtime.clip": ["ftc"], "application/vnd.framemaker": ["fm", "frame", "maker", "book"], "application/vnd.frogans.fnc": ["fnc"], "application/vnd.frogans.ltf": ["ltf"], "application/vnd.fsc.weblaunch": ["fsc"], "application/vnd.fujitsu.oasys": ["oas"], "application/vnd.fujitsu.oasys2": ["oa2"], "application/vnd.fujitsu.oasys3": ["oa3"], "application/vnd.fujitsu.oasysgp": ["fg5"], "application/vnd.fujitsu.oasysprs": ["bh2"], "application/vnd.fujixerox.ddd": ["ddd"], "application/vnd.fujixerox.docuworks": ["xdw"], "application/vnd.fujixerox.docuworks.binder": ["xbd"], "application/vnd.fuzzysheet": ["fzs"], "application/vnd.genomatix.tuxedo": ["txd"], "application/vnd.geogebra.file": ["ggb"], "application/vnd.geogebra.tool": ["ggt"], "application/vnd.geometry-explorer": ["gex", "gre"], "application/vnd.geonext": ["gxt"], "application/vnd.geoplan": ["g2w"], "application/vnd.geospace": ["g3w"], "application/vnd.gmx": ["gmx"], "application/vnd.google-apps.document": ["gdoc"], "application/vnd.google-apps.presentation": ["gslides"], "application/vnd.google-apps.spreadsheet": ["gsheet"], "application/vnd.google-earth.kml+xml": ["kml"], "application/vnd.google-earth.kmz": ["kmz"], "application/vnd.grafeq": ["gqf", "gqs"], "application/vnd.groove-account": ["gac"], "application/vnd.groove-help": ["ghf"], "application/vnd.groove-identity-message": ["gim"], "application/vnd.groove-injector": ["grv"], "application/vnd.groove-tool-message": ["gtm"], "application/vnd.groove-tool-template": ["tpl"], "application/vnd.groove-vcard": ["vcg"], "application/vnd.hal+xml": ["hal"], "application/vnd.handheld-entertainment+xml": ["zmm"], "application/vnd.hbci": ["hbci"], "application/vnd.hhe.lesson-player": ["les"], "application/vnd.hp-hpgl": ["hpgl"], "application/vnd.hp-hpid": ["hpid"], "application/vnd.hp-hps": ["hps"], "application/vnd.hp-jlyt": ["jlt"], "application/vnd.hp-pcl": ["pcl"], "application/vnd.hp-pclxl": ["pclxl"], "application/vnd.hydrostatix.sof-data": ["sfd-hdstx"], "application/vnd.ibm.minipay": ["mpy"], "application/vnd.ibm.modcap": ["afp", "listafp", "list3820"], "application/vnd.ibm.rights-management": ["irm"], "application/vnd.ibm.secure-container": ["sc"], "application/vnd.iccprofile": ["icc", "icm"], "application/vnd.igloader": ["igl"], "application/vnd.immervision-ivp": ["ivp"], "application/vnd.immervision-ivu": ["ivu"], "application/vnd.insors.igm": ["igm"], "application/vnd.intercon.formnet": ["xpw", "xpx"], "application/vnd.intergeo": ["i2g"], "application/vnd.intu.qbo": ["qbo"], "application/vnd.intu.qfx": ["qfx"], "application/vnd.ipunplugged.rcprofile": ["rcprofile"], "application/vnd.irepository.package+xml": ["irp"], "application/vnd.is-xpr": ["xpr"], "application/vnd.isac.fcs": ["fcs"], "application/vnd.jam": ["jam"], "application/vnd.jcp.javame.midlet-rms": ["rms"], "application/vnd.jisp": ["jisp"], "application/vnd.joost.joda-archive": ["joda"], "application/vnd.kahootz": ["ktz", "ktr"], "application/vnd.kde.karbon": ["karbon"], "application/vnd.kde.kchart": ["chrt"], "application/vnd.kde.kformula": ["kfo"], "application/vnd.kde.kivio": ["flw"], "application/vnd.kde.kontour": ["kon"], "application/vnd.kde.kpresenter": ["kpr", "kpt"], "application/vnd.kde.kspread": ["ksp"], "application/vnd.kde.kword": ["kwd", "kwt"], "application/vnd.kenameaapp": ["htke"], "application/vnd.kidspiration": ["kia"], "application/vnd.kinar": ["kne", "knp"], "application/vnd.koan": ["skp", "skd", "skt", "skm"], "application/vnd.kodak-descriptor": ["sse"], "application/vnd.las.las+xml": ["lasxml"], "application/vnd.llamagraphics.life-balance.desktop": ["lbd"], "application/vnd.llamagraphics.life-balance.exchange+xml": ["lbe"], "application/vnd.lotus-1-2-3": ["123"], "application/vnd.lotus-approach": ["apr"], "application/vnd.lotus-freelance": ["pre"], "application/vnd.lotus-notes": ["nsf"], "application/vnd.lotus-organizer": ["org"], "application/vnd.lotus-screencam": ["scm"], "application/vnd.lotus-wordpro": ["lwp"], "application/vnd.macports.portpkg": ["portpkg"], "application/vnd.mapbox-vector-tile": ["mvt"], "application/vnd.mcd": ["mcd"], "application/vnd.medcalcdata": ["mc1"], "application/vnd.mediastation.cdkey": ["cdkey"], "application/vnd.mfer": ["mwf"], "application/vnd.mfmp": ["mfm"], "application/vnd.micrografx.flo": ["flo"], "application/vnd.micrografx.igx": ["igx"], "application/vnd.mif": ["mif"], "application/vnd.mobius.daf": ["daf"], "application/vnd.mobius.dis": ["dis"], "application/vnd.mobius.mbk": ["mbk"], "application/vnd.mobius.mqy": ["mqy"], "application/vnd.mobius.msl": ["msl"], "application/vnd.mobius.plc": ["plc"], "application/vnd.mobius.txf": ["txf"], "application/vnd.mophun.application": ["mpn"], "application/vnd.mophun.certificate": ["mpc"], "application/vnd.mozilla.xul+xml": ["xul"], "application/vnd.ms-artgalry": ["cil"], "application/vnd.ms-cab-compressed": ["cab"], "application/vnd.ms-excel": ["xls", "xlm", "xla", "xlc", "xlt", "xlw"], "application/vnd.ms-excel.addin.macroenabled.12": ["xlam"], "application/vnd.ms-excel.sheet.binary.macroenabled.12": ["xlsb"], "application/vnd.ms-excel.sheet.macroenabled.12": ["xlsm"], "application/vnd.ms-excel.template.macroenabled.12": ["xltm"], "application/vnd.ms-fontobject": ["eot"], "application/vnd.ms-htmlhelp": ["chm"], "application/vnd.ms-ims": ["ims"], "application/vnd.ms-lrm": ["lrm"], "application/vnd.ms-officetheme": ["thmx"], "application/vnd.ms-outlook": ["msg"], "application/vnd.ms-pki.seccat": ["cat"], "application/vnd.ms-pki.stl": ["*stl"], "application/vnd.ms-powerpoint": ["ppt", "pps", "pot"], "application/vnd.ms-powerpoint.addin.macroenabled.12": ["ppam"], "application/vnd.ms-powerpoint.presentation.macroenabled.12": ["pptm"], "application/vnd.ms-powerpoint.slide.macroenabled.12": ["sldm"], "application/vnd.ms-powerpoint.slideshow.macroenabled.12": ["ppsm"], "application/vnd.ms-powerpoint.template.macroenabled.12": ["potm"], "application/vnd.ms-project": ["mpp", "mpt"], "application/vnd.ms-word.document.macroenabled.12": ["docm"], "application/vnd.ms-word.template.macroenabled.12": ["dotm"], "application/vnd.ms-works": ["wps", "wks", "wcm", "wdb"], "application/vnd.ms-wpl": ["wpl"], "application/vnd.ms-xpsdocument": ["xps"], "application/vnd.mseq": ["mseq"], "application/vnd.musician": ["mus"], "application/vnd.muvee.style": ["msty"], "application/vnd.mynfc": ["taglet"], "application/vnd.neurolanguage.nlu": ["nlu"], "application/vnd.nitf": ["ntf", "nitf"], "application/vnd.noblenet-directory": ["nnd"], "application/vnd.noblenet-sealer": ["nns"], "application/vnd.noblenet-web": ["nnw"], "application/vnd.nokia.n-gage.ac+xml": ["*ac"], "application/vnd.nokia.n-gage.data": ["ngdat"], "application/vnd.nokia.n-gage.symbian.install": ["n-gage"], "application/vnd.nokia.radio-preset": ["rpst"], "application/vnd.nokia.radio-presets": ["rpss"], "application/vnd.novadigm.edm": ["edm"], "application/vnd.novadigm.edx": ["edx"], "application/vnd.novadigm.ext": ["ext"], "application/vnd.oasis.opendocument.chart": ["odc"], "application/vnd.oasis.opendocument.chart-template": ["otc"], "application/vnd.oasis.opendocument.database": ["odb"], "application/vnd.oasis.opendocument.formula": ["odf"], "application/vnd.oasis.opendocument.formula-template": ["odft"], "application/vnd.oasis.opendocument.graphics": ["odg"], "application/vnd.oasis.opendocument.graphics-template": ["otg"], "application/vnd.oasis.opendocument.image": ["odi"], "application/vnd.oasis.opendocument.image-template": ["oti"], "application/vnd.oasis.opendocument.presentation": ["odp"], "application/vnd.oasis.opendocument.presentation-template": ["otp"], "application/vnd.oasis.opendocument.spreadsheet": ["ods"], "application/vnd.oasis.opendocument.spreadsheet-template": ["ots"], "application/vnd.oasis.opendocument.text": ["odt"], "application/vnd.oasis.opendocument.text-master": ["odm"], "application/vnd.oasis.opendocument.text-template": ["ott"], "application/vnd.oasis.opendocument.text-web": ["oth"], "application/vnd.olpc-sugar": ["xo"], "application/vnd.oma.dd2+xml": ["dd2"], "application/vnd.openblox.game+xml": ["obgx"], "application/vnd.openofficeorg.extension": ["oxt"], "application/vnd.openstreetmap.data+xml": ["osm"], "application/vnd.openxmlformats-officedocument.presentationml.presentation": ["pptx"], "application/vnd.openxmlformats-officedocument.presentationml.slide": ["sldx"], "application/vnd.openxmlformats-officedocument.presentationml.slideshow": ["ppsx"], "application/vnd.openxmlformats-officedocument.presentationml.template": ["potx"], "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": ["xlsx"], "application/vnd.openxmlformats-officedocument.spreadsheetml.template": ["xltx"], "application/vnd.openxmlformats-officedocument.wordprocessingml.document": ["docx"], "application/vnd.openxmlformats-officedocument.wordprocessingml.template": ["dotx"], "application/vnd.osgeo.mapguide.package": ["mgp"], "application/vnd.osgi.dp": ["dp"], "application/vnd.osgi.subsystem": ["esa"], "application/vnd.palm": ["pdb", "pqa", "oprc"], "application/vnd.pawaafile": ["paw"], "application/vnd.pg.format": ["str"], "application/vnd.pg.osasli": ["ei6"], "application/vnd.picsel": ["efif"], "application/vnd.pmi.widget": ["wg"], "application/vnd.pocketlearn": ["plf"], "application/vnd.powerbuilder6": ["pbd"], "application/vnd.previewsystems.box": ["box"], "application/vnd.proteus.magazine": ["mgz"], "application/vnd.publishare-delta-tree": ["qps"], "application/vnd.pvi.ptid1": ["ptid"], "application/vnd.quark.quarkxpress": ["qxd", "qxt", "qwd", "qwt", "qxl", "qxb"], "application/vnd.rar": ["rar"], "application/vnd.realvnc.bed": ["bed"], "application/vnd.recordare.musicxml": ["mxl"], "application/vnd.recordare.musicxml+xml": ["musicxml"], "application/vnd.rig.cryptonote": ["cryptonote"], "application/vnd.rim.cod": ["cod"], "application/vnd.rn-realmedia": ["rm"], "application/vnd.rn-realmedia-vbr": ["rmvb"], "application/vnd.route66.link66+xml": ["link66"], "application/vnd.sailingtracker.track": ["st"], "application/vnd.seemail": ["see"], "application/vnd.sema": ["sema"], "application/vnd.semd": ["semd"], "application/vnd.semf": ["semf"], "application/vnd.shana.informed.formdata": ["ifm"], "application/vnd.shana.informed.formtemplate": ["itp"], "application/vnd.shana.informed.interchange": ["iif"], "application/vnd.shana.informed.package": ["ipk"], "application/vnd.simtech-mindmapper": ["twd", "twds"], "application/vnd.smaf": ["mmf"], "application/vnd.smart.teacher": ["teacher"], "application/vnd.software602.filler.form+xml": ["fo"], "application/vnd.solent.sdkm+xml": ["sdkm", "sdkd"], "application/vnd.spotfire.dxp": ["dxp"], "application/vnd.spotfire.sfs": ["sfs"], "application/vnd.stardivision.calc": ["sdc"], "application/vnd.stardivision.draw": ["sda"], "application/vnd.stardivision.impress": ["sdd"], "application/vnd.stardivision.math": ["smf"], "application/vnd.stardivision.writer": ["sdw", "vor"], "application/vnd.stardivision.writer-global": ["sgl"], "application/vnd.stepmania.package": ["smzip"], "application/vnd.stepmania.stepchart": ["sm"], "application/vnd.sun.wadl+xml": ["wadl"], "application/vnd.sun.xml.calc": ["sxc"], "application/vnd.sun.xml.calc.template": ["stc"], "application/vnd.sun.xml.draw": ["sxd"], "application/vnd.sun.xml.draw.template": ["std"], "application/vnd.sun.xml.impress": ["sxi"], "application/vnd.sun.xml.impress.template": ["sti"], "application/vnd.sun.xml.math": ["sxm"], "application/vnd.sun.xml.writer": ["sxw"], "application/vnd.sun.xml.writer.global": ["sxg"], "application/vnd.sun.xml.writer.template": ["stw"], "application/vnd.sus-calendar": ["sus", "susp"], "application/vnd.svd": ["svd"], "application/vnd.symbian.install": ["sis", "sisx"], "application/vnd.syncml+xml": ["xsm"], "application/vnd.syncml.dm+wbxml": ["bdm"], "application/vnd.syncml.dm+xml": ["xdm"], "application/vnd.syncml.dmddf+xml": ["ddf"], "application/vnd.tao.intent-module-archive": ["tao"], "application/vnd.tcpdump.pcap": ["pcap", "cap", "dmp"], "application/vnd.tmobile-livetv": ["tmo"], "application/vnd.trid.tpt": ["tpt"], "application/vnd.triscape.mxs": ["mxs"], "application/vnd.trueapp": ["tra"], "application/vnd.ufdl": ["ufd", "ufdl"], "application/vnd.uiq.theme": ["utz"], "application/vnd.umajin": ["umj"], "application/vnd.unity": ["unityweb"], "application/vnd.uoml+xml": ["uoml"], "application/vnd.vcx": ["vcx"], "application/vnd.visio": ["vsd", "vst", "vss", "vsw"], "application/vnd.visionary": ["vis"], "application/vnd.vsf": ["vsf"], "application/vnd.wap.wbxml": ["wbxml"], "application/vnd.wap.wmlc": ["wmlc"], "application/vnd.wap.wmlscriptc": ["wmlsc"], "application/vnd.webturbo": ["wtb"], "application/vnd.wolfram.player": ["nbp"], "application/vnd.wordperfect": ["wpd"], "application/vnd.wqd": ["wqd"], "application/vnd.wt.stf": ["stf"], "application/vnd.xara": ["xar"], "application/vnd.xfdl": ["xfdl"], "application/vnd.yamaha.hv-dic": ["hvd"], "application/vnd.yamaha.hv-script": ["hvs"], "application/vnd.yamaha.hv-voice": ["hvp"], "application/vnd.yamaha.openscoreformat": ["osf"], "application/vnd.yamaha.openscoreformat.osfpvg+xml": ["osfpvg"], "application/vnd.yamaha.smaf-audio": ["saf"], "application/vnd.yamaha.smaf-phrase": ["spf"], "application/vnd.yellowriver-custom-menu": ["cmp"], "application/vnd.zul": ["zir", "zirz"], "application/vnd.zzazz.deck+xml": ["zaz"], "application/x-7z-compressed": ["7z"], "application/x-abiword": ["abw"], "application/x-ace-compressed": ["ace"], "application/x-apple-diskimage": ["*dmg"], "application/x-arj": ["arj"], "application/x-authorware-bin": ["aab", "x32", "u32", "vox"], "application/x-authorware-map": ["aam"], "application/x-authorware-seg": ["aas"], "application/x-bcpio": ["bcpio"], "application/x-bdoc": ["*bdoc"], "application/x-bittorrent": ["torrent"], "application/x-blorb": ["blb", "blorb"], "application/x-bzip": ["bz"], "application/x-bzip2": ["bz2", "boz"], "application/x-cbr": ["cbr", "cba", "cbt", "cbz", "cb7"], "application/x-cdlink": ["vcd"], "application/x-cfs-compressed": ["cfs"], "application/x-chat": ["chat"], "application/x-chess-pgn": ["pgn"], "application/x-chrome-extension": ["crx"], "application/x-cocoa": ["cco"], "application/x-conference": ["nsc"], "application/x-cpio": ["cpio"], "application/x-csh": ["csh"], "application/x-debian-package": ["*deb", "udeb"], "application/x-dgc-compressed": ["dgc"], "application/x-director": ["dir", "dcr", "dxr", "cst", "cct", "cxt", "w3d", "fgd", "swa"], "application/x-doom": ["wad"], "application/x-dtbncx+xml": ["ncx"], "application/x-dtbook+xml": ["dtb"], "application/x-dtbresource+xml": ["res"], "application/x-dvi": ["dvi"], "application/x-envoy": ["evy"], "application/x-eva": ["eva"], "application/x-font-bdf": ["bdf"], "application/x-font-ghostscript": ["gsf"], "application/x-font-linux-psf": ["psf"], "application/x-font-pcf": ["pcf"], "application/x-font-snf": ["snf"], "application/x-font-type1": ["pfa", "pfb", "pfm", "afm"], "application/x-freearc": ["arc"], "application/x-futuresplash": ["spl"], "application/x-gca-compressed": ["gca"], "application/x-glulx": ["ulx"], "application/x-gnumeric": ["gnumeric"], "application/x-gramps-xml": ["gramps"], "application/x-gtar": ["gtar"], "application/x-hdf": ["hdf"], "application/x-httpd-php": ["php"], "application/x-install-instructions": ["install"], "application/x-iso9660-image": ["*iso"], "application/x-iwork-keynote-sffkey": ["*key"], "application/x-iwork-numbers-sffnumbers": ["*numbers"], "application/x-iwork-pages-sffpages": ["*pages"], "application/x-java-archive-diff": ["jardiff"], "application/x-java-jnlp-file": ["jnlp"], "application/x-keepass2": ["kdbx"], "application/x-latex": ["latex"], "application/x-lua-bytecode": ["luac"], "application/x-lzh-compressed": ["lzh", "lha"], "application/x-makeself": ["run"], "application/x-mie": ["mie"], "application/x-mobipocket-ebook": ["prc", "mobi"], "application/x-ms-application": ["application"], "application/x-ms-shortcut": ["lnk"], "application/x-ms-wmd": ["wmd"], "application/x-ms-wmz": ["wmz"], "application/x-ms-xbap": ["xbap"], "application/x-msaccess": ["mdb"], "application/x-msbinder": ["obd"], "application/x-mscardfile": ["crd"], "application/x-msclip": ["clp"], "application/x-msdos-program": ["*exe"], "application/x-msdownload": ["*exe", "*dll", "com", "bat", "*msi"], "application/x-msmediaview": ["mvb", "m13", "m14"], "application/x-msmetafile": ["*wmf", "*wmz", "*emf", "emz"], "application/x-msmoney": ["mny"], "application/x-mspublisher": ["pub"], "application/x-msschedule": ["scd"], "application/x-msterminal": ["trm"], "application/x-mswrite": ["wri"], "application/x-netcdf": ["nc", "cdf"], "application/x-ns-proxy-autoconfig": ["pac"], "application/x-nzb": ["nzb"], "application/x-perl": ["pl", "pm"], "application/x-pilot": ["*prc", "*pdb"], "application/x-pkcs12": ["p12", "pfx"], "application/x-pkcs7-certificates": ["p7b", "spc"], "application/x-pkcs7-certreqresp": ["p7r"], "application/x-rar-compressed": ["*rar"], "application/x-redhat-package-manager": ["rpm"], "application/x-research-info-systems": ["ris"], "application/x-sea": ["sea"], "application/x-sh": ["sh"], "application/x-shar": ["shar"], "application/x-shockwave-flash": ["swf"], "application/x-silverlight-app": ["xap"], "application/x-sql": ["sql"], "application/x-stuffit": ["sit"], "application/x-stuffitx": ["sitx"], "application/x-subrip": ["srt"], "application/x-sv4cpio": ["sv4cpio"], "application/x-sv4crc": ["sv4crc"], "application/x-t3vm-image": ["t3"], "application/x-tads": ["gam"], "application/x-tar": ["tar"], "application/x-tcl": ["tcl", "tk"], "application/x-tex": ["tex"], "application/x-tex-tfm": ["tfm"], "application/x-texinfo": ["texinfo", "texi"], "application/x-tgif": ["*obj"], "application/x-ustar": ["ustar"], "application/x-virtualbox-hdd": ["hdd"], "application/x-virtualbox-ova": ["ova"], "application/x-virtualbox-ovf": ["ovf"], "application/x-virtualbox-vbox": ["vbox"], "application/x-virtualbox-vbox-extpack": ["vbox-extpack"], "application/x-virtualbox-vdi": ["vdi"], "application/x-virtualbox-vhd": ["vhd"], "application/x-virtualbox-vmdk": ["vmdk"], "application/x-wais-source": ["src"], "application/x-web-app-manifest+json": ["webapp"], "application/x-x509-ca-cert": ["der", "crt", "pem"], "application/x-xfig": ["fig"], "application/x-xliff+xml": ["*xlf"], "application/x-xpinstall": ["xpi"], "application/x-xz": ["xz"], "application/x-zmachine": ["z1", "z2", "z3", "z4", "z5", "z6", "z7", "z8"], "audio/vnd.dece.audio": ["uva", "uvva"], "audio/vnd.digital-winds": ["eol"], "audio/vnd.dra": ["dra"], "audio/vnd.dts": ["dts"], "audio/vnd.dts.hd": ["dtshd"], "audio/vnd.lucent.voice": ["lvp"], "audio/vnd.ms-playready.media.pya": ["pya"], "audio/vnd.nuera.ecelp4800": ["ecelp4800"], "audio/vnd.nuera.ecelp7470": ["ecelp7470"], "audio/vnd.nuera.ecelp9600": ["ecelp9600"], "audio/vnd.rip": ["rip"], "audio/x-aac": ["aac"], "audio/x-aiff": ["aif", "aiff", "aifc"], "audio/x-caf": ["caf"], "audio/x-flac": ["flac"], "audio/x-m4a": ["*m4a"], "audio/x-matroska": ["mka"], "audio/x-mpegurl": ["m3u"], "audio/x-ms-wax": ["wax"], "audio/x-ms-wma": ["wma"], "audio/x-pn-realaudio": ["ram", "ra"], "audio/x-pn-realaudio-plugin": ["rmp"], "audio/x-realaudio": ["*ra"], "audio/x-wav": ["*wav"], "chemical/x-cdx": ["cdx"], "chemical/x-cif": ["cif"], "chemical/x-cmdf": ["cmdf"], "chemical/x-cml": ["cml"], "chemical/x-csml": ["csml"], "chemical/x-xyz": ["xyz"], "image/prs.btif": ["btif"], "image/prs.pti": ["pti"], "image/vnd.adobe.photoshop": ["psd"], "image/vnd.airzip.accelerator.azv": ["azv"], "image/vnd.dece.graphic": ["uvi", "uvvi", "uvg", "uvvg"], "image/vnd.djvu": ["djvu", "djv"], "image/vnd.dvb.subtitle": ["*sub"], "image/vnd.dwg": ["dwg"], "image/vnd.dxf": ["dxf"], "image/vnd.fastbidsheet": ["fbs"], "image/vnd.fpx": ["fpx"], "image/vnd.fst": ["fst"], "image/vnd.fujixerox.edmics-mmr": ["mmr"], "image/vnd.fujixerox.edmics-rlc": ["rlc"], "image/vnd.microsoft.icon": ["ico"], "image/vnd.ms-dds": ["dds"], "image/vnd.ms-modi": ["mdi"], "image/vnd.ms-photo": ["wdp"], "image/vnd.net-fpx": ["npx"], "image/vnd.pco.b16": ["b16"], "image/vnd.tencent.tap": ["tap"], "image/vnd.valve.source.texture": ["vtf"], "image/vnd.wap.wbmp": ["wbmp"], "image/vnd.xiff": ["xif"], "image/vnd.zbrush.pcx": ["pcx"], "image/x-3ds": ["3ds"], "image/x-cmu-raster": ["ras"], "image/x-cmx": ["cmx"], "image/x-freehand": ["fh", "fhc", "fh4", "fh5", "fh7"], "image/x-icon": ["*ico"], "image/x-jng": ["jng"], "image/x-mrsid-image": ["sid"], "image/x-ms-bmp": ["*bmp"], "image/x-pcx": ["*pcx"], "image/x-pict": ["pic", "pct"], "image/x-portable-anymap": ["pnm"], "image/x-portable-bitmap": ["pbm"], "image/x-portable-graymap": ["pgm"], "image/x-portable-pixmap": ["ppm"], "image/x-rgb": ["rgb"], "image/x-tga": ["tga"], "image/x-xbitmap": ["xbm"], "image/x-xpixmap": ["xpm"], "image/x-xwindowdump": ["xwd"], "message/vnd.wfa.wsc": ["wsc"], "model/vnd.collada+xml": ["dae"], "model/vnd.dwf": ["dwf"], "model/vnd.gdl": ["gdl"], "model/vnd.gtw": ["gtw"], "model/vnd.mts": ["mts"], "model/vnd.opengex": ["ogex"], "model/vnd.parasolid.transmit.binary": ["x_b"], "model/vnd.parasolid.transmit.text": ["x_t"], "model/vnd.sap.vds": ["vds"], "model/vnd.usdz+zip": ["usdz"], "model/vnd.valve.source.compiled-map": ["bsp"], "model/vnd.vtu": ["vtu"], "text/prs.lines.tag": ["dsc"], "text/vnd.curl": ["curl"], "text/vnd.curl.dcurl": ["dcurl"], "text/vnd.curl.mcurl": ["mcurl"], "text/vnd.curl.scurl": ["scurl"], "text/vnd.dvb.subtitle": ["sub"], "text/vnd.fly": ["fly"], "text/vnd.fmi.flexstor": ["flx"], "text/vnd.graphviz": ["gv"], "text/vnd.in3d.3dml": ["3dml"], "text/vnd.in3d.spot": ["spot"], "text/vnd.sun.j2me.app-descriptor": ["jad"], "text/vnd.wap.wml": ["wml"], "text/vnd.wap.wmlscript": ["wmls"], "text/x-asm": ["s", "asm"], "text/x-c": ["c", "cc", "cxx", "cpp", "h", "hh", "dic"], "text/x-component": ["htc"], "text/x-fortran": ["f", "for", "f77", "f90"], "text/x-handlebars-template": ["hbs"], "text/x-java-source": ["java"], "text/x-lua": ["lua"], "text/x-markdown": ["mkd"], "text/x-nfo": ["nfo"], "text/x-opml": ["opml"], "text/x-org": ["*org"], "text/x-pascal": ["p", "pas"], "text/x-processing": ["pde"], "text/x-sass": ["sass"], "text/x-scss": ["scss"], "text/x-setext": ["etx"], "text/x-sfv": ["sfv"], "text/x-suse-ymp": ["ymp"], "text/x-uuencode": ["uu"], "text/x-vcalendar": ["vcs"], "text/x-vcard": ["vcf"], "video/vnd.dece.hd": ["uvh", "uvvh"], "video/vnd.dece.mobile": ["uvm", "uvvm"], "video/vnd.dece.pd": ["uvp", "uvvp"], "video/vnd.dece.sd": ["uvs", "uvvs"], "video/vnd.dece.video": ["uvv", "uvvv"], "video/vnd.dvb.file": ["dvb"], "video/vnd.fvt": ["fvt"], "video/vnd.mpegurl": ["mxu", "m4u"], "video/vnd.ms-playready.media.pyv": ["pyv"], "video/vnd.uvvu.mp4": ["uvu", "uvvu"], "video/vnd.vivo": ["viv"], "video/x-f4v": ["f4v"], "video/x-fli": ["fli"], "video/x-flv": ["flv"], "video/x-m4v": ["m4v"], "video/x-matroska": ["mkv", "mk3d", "mks"], "video/x-mng": ["mng"], "video/x-ms-asf": ["asf", "asx"], "video/x-ms-vob": ["vob"], "video/x-ms-wm": ["wm"], "video/x-ms-wmv": ["wmv"], "video/x-ms-wmx": ["wmx"], "video/x-ms-wvx": ["wvx"], "video/x-msvideo": ["avi"], "video/x-sgi-movie": ["movie"], "video/x-smv": ["smv"], "x-conference/x-cooltalk": ["ice"] }; + } +}); + +// ../../node_modules/.pnpm/mime@3.0.0/node_modules/mime/index.js +var require_mime = __commonJS({ + "../../node_modules/.pnpm/mime@3.0.0/node_modules/mime/index.js"(exports2, module2) { + "use strict"; + var Mime = require_Mime(); + module2.exports = new Mime(require_standard(), require_other()); + } +}); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + AIOptionsSchema: () => AIOptionsSchema, + AI_PLUGIN: () => AI_PLUGIN, + AI_PLUGIN_NAME: () => AI_PLUGIN_NAME, + ANALYTICS_ENGINE_PLUGIN: () => ANALYTICS_ENGINE_PLUGIN, + ANALYTICS_ENGINE_PLUGIN_NAME: () => ANALYTICS_ENGINE_PLUGIN_NAME, + ASSETS_PLUGIN: () => ASSETS_PLUGIN, + AnalyticsEngineSchemaOptionsSchema: () => AnalyticsEngineSchemaOptionsSchema, + AnalyticsEngineSchemaSharedOptionsSchema: () => AnalyticsEngineSchemaSharedOptionsSchema, + AssetsOptionsSchema: () => AssetsOptionsSchema, + BROWSER_RENDERING_PLUGIN: () => BROWSER_RENDERING_PLUGIN, + BROWSER_RENDERING_PLUGIN_NAME: () => BROWSER_RENDERING_PLUGIN_NAME, + BrowserRenderingOptionsSchema: () => BrowserRenderingOptionsSchema, + CACHE_PLUGIN: () => CACHE_PLUGIN, + CACHE_PLUGIN_NAME: () => CACHE_PLUGIN_NAME, + CORE_PLUGIN: () => CORE_PLUGIN, + CORE_PLUGIN_NAME: () => CORE_PLUGIN_NAME2, + CacheBindings: () => CacheBindings, + CacheHeaders: () => CacheHeaders, + CacheOptionsSchema: () => CacheOptionsSchema, + CacheSharedOptionsSchema: () => CacheSharedOptionsSchema, + CloseEvent: () => CloseEvent, + CoreBindings: () => CoreBindings, + CoreHeaders: () => CoreHeaders, + CoreOptionsSchema: () => CoreOptionsSchema, + CoreSharedOptionsSchema: () => CoreSharedOptionsSchema, + D1OptionsSchema: () => D1OptionsSchema, + D1SharedOptionsSchema: () => D1SharedOptionsSchema, + D1_PLUGIN: () => D1_PLUGIN, + D1_PLUGIN_NAME: () => D1_PLUGIN_NAME, + DEFAULT_PERSIST_ROOT: () => DEFAULT_PERSIST_ROOT, + DISPATCH_NAMESPACE_PLUGIN: () => DISPATCH_NAMESPACE_PLUGIN, + DISPATCH_NAMESPACE_PLUGIN_NAME: () => DISPATCH_NAMESPACE_PLUGIN_NAME, + DURABLE_OBJECTS_PLUGIN: () => DURABLE_OBJECTS_PLUGIN, + DURABLE_OBJECTS_PLUGIN_NAME: () => DURABLE_OBJECTS_PLUGIN_NAME, + DURABLE_OBJECTS_STORAGE_SERVICE_NAME: () => DURABLE_OBJECTS_STORAGE_SERVICE_NAME, + DeferredPromise: () => DeferredPromise, + DispatchFetchDispatcher: () => DispatchFetchDispatcher, + DispatchNamespaceOptionsSchema: () => DispatchNamespaceOptionsSchema, + DurableObjectsOptionsSchema: () => DurableObjectsOptionsSchema, + DurableObjectsSharedOptionsSchema: () => DurableObjectsSharedOptionsSchema, + EMAIL_PLUGIN: () => EMAIL_PLUGIN, + EMAIL_PLUGIN_NAME: () => EMAIL_PLUGIN_NAME, + EmailOptionsSchema: () => EmailOptionsSchema, + ErrorEvent: () => ErrorEvent, + File: () => import_undici4.File, + FormData: () => import_undici4.FormData, + HOST_CAPNP_CONNECT: () => HOST_CAPNP_CONNECT, + HYPERDRIVE_PLUGIN: () => HYPERDRIVE_PLUGIN, + HYPERDRIVE_PLUGIN_NAME: () => HYPERDRIVE_PLUGIN_NAME, + Headers: () => import_undici4.Headers, + HttpOptions_Style: () => HttpOptions_Style, + HyperdriveInputOptionsSchema: () => HyperdriveInputOptionsSchema, + HyperdriveSchema: () => HyperdriveSchema, + IMAGES_PLUGIN: () => IMAGES_PLUGIN, + IMAGES_PLUGIN_NAME: () => IMAGES_PLUGIN_NAME, + ImagesOptionsSchema: () => ImagesOptionsSchema, + JsonSchema: () => JsonSchema, + KVHeaders: () => KVHeaders, + KVLimits: () => KVLimits, + KVOptionsSchema: () => KVOptionsSchema, + KVParams: () => KVParams, + KVSharedOptionsSchema: () => KVSharedOptionsSchema, + KV_PLUGIN: () => KV_PLUGIN, + KV_PLUGIN_NAME: () => KV_PLUGIN_NAME, + LiteralSchema: () => LiteralSchema, + Log: () => Log, + LogLevel: () => LogLevel, + MAX_BULK_GET_KEYS: () => MAX_BULK_GET_KEYS, + MessageEvent: () => MessageEvent, + Miniflare: () => Miniflare2, + MiniflareCoreError: () => MiniflareCoreError, + MiniflareError: () => MiniflareError, + ModuleDefinitionSchema: () => ModuleDefinitionSchema, + ModuleRuleSchema: () => ModuleRuleSchema, + ModuleRuleTypeSchema: () => ModuleRuleTypeSchema, + Mutex: () => Mutex, + NoOpLog: () => NoOpLog, + PIPELINES_PLUGIN_NAME: () => PIPELINES_PLUGIN_NAME, + PIPELINE_PLUGIN: () => PIPELINE_PLUGIN, + PLUGINS: () => PLUGINS, + PLUGIN_ENTRIES: () => PLUGIN_ENTRIES, + PathSchema: () => PathSchema, + PeriodType: () => PeriodType, + PersistenceSchema: () => PersistenceSchema, + PipelineOptionsSchema: () => PipelineOptionsSchema, + ProxyAddresses: () => ProxyAddresses, + ProxyClient: () => ProxyClient, + ProxyNodeBinding: () => ProxyNodeBinding, + ProxyOps: () => ProxyOps, + QUEUES_PLUGIN: () => QUEUES_PLUGIN, + QUEUES_PLUGIN_NAME: () => QUEUES_PLUGIN_NAME, + QueueBindings: () => QueueBindings, + QueueConsumerOptionsSchema: () => QueueConsumerOptionsSchema, + QueueConsumerSchema: () => QueueConsumerSchema, + QueueConsumersSchema: () => QueueConsumersSchema, + QueueContentTypeSchema: () => QueueContentTypeSchema, + QueueIncomingMessageSchema: () => QueueIncomingMessageSchema, + QueueMessageDelaySchema: () => QueueMessageDelaySchema, + QueueProducerOptionsSchema: () => QueueProducerOptionsSchema, + QueueProducerSchema: () => QueueProducerSchema, + QueueProducersSchema: () => QueueProducersSchema, + QueuesBatchRequestSchema: () => QueuesBatchRequestSchema, + QueuesError: () => QueuesError, + QueuesOptionsSchema: () => QueuesOptionsSchema, + R2OptionsSchema: () => R2OptionsSchema, + R2SharedOptionsSchema: () => R2SharedOptionsSchema, + R2_PLUGIN: () => R2_PLUGIN, + R2_PLUGIN_NAME: () => R2_PLUGIN_NAME, + RATELIMIT_PLUGIN: () => RATELIMIT_PLUGIN, + RATELIMIT_PLUGIN_NAME: () => RATELIMIT_PLUGIN_NAME, + RatelimitConfigSchema: () => RatelimitConfigSchema, + RatelimitOptionsSchema: () => RatelimitOptionsSchema, + Request: () => Request, + Response: () => Response2, + RouterError: () => RouterError, + Runtime: () => Runtime, + SECRET_STORE_PLUGIN: () => SECRET_STORE_PLUGIN, + SECRET_STORE_PLUGIN_NAME: () => SECRET_STORE_PLUGIN_NAME, + SERVICE_ENTRY: () => SERVICE_ENTRY, + SERVICE_LOOPBACK: () => SERVICE_LOOPBACK, + SITES_NO_CACHE_PREFIX: () => SITES_NO_CACHE_PREFIX, + SOCKET_ENTRY: () => SOCKET_ENTRY, + SOCKET_ENTRY_LOCAL: () => SOCKET_ENTRY_LOCAL, + SecretsStoreSecretsOptionsSchema: () => SecretsStoreSecretsOptionsSchema, + SecretsStoreSecretsSharedOptionsSchema: () => SecretsStoreSecretsSharedOptionsSchema, + SharedBindings: () => SharedBindings, + SharedHeaders: () => SharedHeaders, + SiteBindings: () => SiteBindings, + SourceOptionsSchema: () => SourceOptionsSchema, + TlsOptions_Version: () => TlsOptions_Version, + TypedEventTarget: () => TypedEventTarget, + VECTORIZE_PLUGIN: () => VECTORIZE_PLUGIN, + VECTORIZE_PLUGIN_NAME: () => VECTORIZE_PLUGIN_NAME, + VectorizeOptionsSchema: () => VectorizeOptionsSchema, + WORKER_BINDING_SERVICE_LOOPBACK: () => WORKER_BINDING_SERVICE_LOOPBACK, + WORKFLOWS_PLUGIN: () => WORKFLOWS_PLUGIN, + WORKFLOWS_PLUGIN_NAME: () => WORKFLOWS_PLUGIN_NAME, + WORKFLOWS_STORAGE_SERVICE_NAME: () => WORKFLOWS_STORAGE_SERVICE_NAME, + WaitGroup: () => WaitGroup, + WebSocket: () => WebSocket, + WebSocketPair: () => WebSocketPair, + Worker_Binding_CryptoKey_Usage: () => Worker_Binding_CryptoKey_Usage, + WorkflowsOptionsSchema: () => WorkflowsOptionsSchema, + WorkflowsSharedOptionsSchema: () => WorkflowsSharedOptionsSchema, + __MiniflareFunctionWrapper: () => __MiniflareFunctionWrapper, + _enableControlEndpoints: () => _enableControlEndpoints, + _forceColour: () => _forceColour, + _initialiseInstanceRegistry: () => _initialiseInstanceRegistry, + _isCyclic: () => _isCyclic, + _transformsForContentEncodingAndContentType: () => _transformsForContentEncodingAndContentType, + base64Decode: () => base64Decode, + base64Encode: () => base64Encode, + buildAssetManifest: () => buildAssetManifest, + compileModuleRules: () => compileModuleRules, + coupleWebSocket: () => coupleWebSocket, + createFetchMock: () => createFetchMock, + createHTTPReducers: () => createHTTPReducers, + createHTTPRevivers: () => createHTTPRevivers, + decodeSitesKey: () => decodeSitesKey, + deserialiseRegExps: () => deserialiseRegExps, + deserialiseSiteRegExps: () => deserialiseSiteRegExps, + encodeSitesKey: () => encodeSitesKey, + fetch: () => fetch4, + formatZodError: () => formatZodError, + getAccessibleHosts: () => getAccessibleHosts, + getAssetsBindingsNames: () => getAssetsBindingsNames, + getCacheServiceName: () => getCacheServiceName, + getDirectSocketName: () => getDirectSocketName, + getEntrySocketHttpOptions: () => getEntrySocketHttpOptions, + getFreshSourceMapSupport: () => getFreshSourceMapSupport, + getGlobalServices: () => getGlobalServices, + getMiniflareObjectBindings: () => getMiniflareObjectBindings, + getNodeCompat: () => getNodeCompat, + getPersistPath: () => getPersistPath, + getRootPath: () => getRootPath, + globsToRegExps: () => globsToRegExps, + isFetcherFetch: () => isFetcherFetch, + isR2ObjectWriteHttpMetadata: () => isR2ObjectWriteHttpMetadata, + isSitesRequest: () => isSitesRequest, + kCurrentWorker: () => kCurrentWorker, + kInspectorSocket: () => kInspectorSocket, + kUnsafeEphemeralUniqueKey: () => kUnsafeEphemeralUniqueKey, + kVoid: () => kVoid, + matchRoutes: () => matchRoutes, + maybeApply: () => maybeApply, + maybeParseURL: () => maybeParseURL, + mergeWorkerOptions: () => mergeWorkerOptions, + migrateDatabase: () => migrateDatabase, + mixedModeClientWorker: () => mixedModeClientWorker, + namespaceEntries: () => namespaceEntries, + namespaceKeys: () => namespaceKeys, + normaliseDurableObject: () => normaliseDurableObject, + objectEntryWorker: () => objectEntryWorker, + parseRanges: () => parseRanges, + parseRoutes: () => parseRoutes, + parseWithReadableStreams: () => parseWithReadableStreams, + parseWithRootPath: () => parseWithRootPath, + prefixError: () => prefixError, + prefixStream: () => prefixStream, + readPrefix: () => readPrefix, + reduceError: () => reduceError, + sanitisePath: () => sanitisePath, + serialiseRegExps: () => serialiseRegExps, + serialiseSiteRegExps: () => serialiseSiteRegExps, + serializeConfig: () => serializeConfig, + stringifyWithStreams: () => stringifyWithStreams, + stripAnsi: () => stripAnsi, + structuredSerializableReducers: () => structuredSerializableReducers, + structuredSerializableRevivers: () => structuredSerializableRevivers, + supportedCompatibilityDate: () => import_workerd2.compatibilityDate, + testRegExps: () => testRegExps, + testSiteRegExps: () => testSiteRegExps, + viewToBuffer: () => viewToBuffer, + zAwaitable: () => zAwaitable +}); +module.exports = __toCommonJS(src_exports); +var import_assert13 = __toESM(require("assert")); +var import_crypto3 = __toESM(require("crypto")); +var import_fs31 = __toESM(require("fs")); +var import_promises13 = require("fs/promises"); +var import_http6 = __toESM(require("http")); +var import_net = __toESM(require("net")); +var import_os2 = __toESM(require("os")); +var import_path35 = __toESM(require("path")); +var import_web5 = require("stream/web"); +var import_util5 = __toESM(require("util")); +var import_zlib = __toESM(require("zlib")); +var import_exit_hook = __toESM(require("exit-hook")); + +// ../../node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/colors.mjs +var FORCE_COLOR; +var NODE_DISABLE_COLORS; +var NO_COLOR; +var TERM; +var isTTY = true; +if (typeof process !== "undefined") { + ({ FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM } = process.env || {}); + isTTY = process.stdout && process.stdout.isTTY; +} +var $ = { + enabled: !NODE_DISABLE_COLORS && NO_COLOR == null && TERM !== "dumb" && (FORCE_COLOR != null && FORCE_COLOR !== "0" || isTTY) +}; +function init(x, y) { + let rgx = new RegExp(`\\x1b\\[${y}m`, "g"); + let open = `\x1B[${x}m`, close = `\x1B[${y}m`; + return function(txt) { + if (!$.enabled || txt == null) return txt; + return open + (!!~("" + txt).indexOf(close) ? txt.replace(rgx, close + open) : txt) + close; + }; +} +var reset = init(0, 0); +var bold = init(1, 22); +var dim = init(2, 22); +var italic = init(3, 23); +var underline = init(4, 24); +var inverse = init(7, 27); +var hidden = init(8, 28); +var strikethrough = init(9, 29); +var black = init(30, 39); +var red = init(31, 39); +var green = init(32, 39); +var yellow = init(33, 39); +var blue = init(34, 39); +var magenta = init(35, 39); +var cyan = init(36, 39); +var white = init(37, 39); +var gray = init(90, 39); +var grey = init(90, 39); +var bgBlack = init(40, 49); +var bgRed = init(41, 49); +var bgGreen = init(42, 49); +var bgYellow = init(43, 49); +var bgBlue = init(44, 49); +var bgMagenta = init(45, 49); +var bgCyan = init(46, 49); +var bgWhite = init(47, 49); + +// src/index.ts +var import_stoppable = __toESM(require("stoppable")); +var import_undici8 = require("undici"); + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/shared/index.worker.ts +var import_fs = __toESM(require("fs")); +var import_path = __toESM(require("path")); +var import_url = __toESM(require("url")); +var contents; +function index_worker_default() { + if (contents !== void 0) return contents; + const filePath = import_path.default.join(__dirname, "workers", "shared/index.worker.js"); + contents = import_fs.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url.default.pathToFileURL(filePath); + return contents; +} + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/shared/zod.worker.ts +var import_fs2 = __toESM(require("fs")); +var import_path2 = __toESM(require("path")); +var import_url2 = __toESM(require("url")); +var contents2; +function zod_worker_default() { + if (contents2 !== void 0) return contents2; + const filePath = import_path2.default.join(__dirname, "workers", "shared/zod.worker.js"); + contents2 = import_fs2.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url2.default.pathToFileURL(filePath); + return contents2; +} + +// src/index.ts +var import_ws5 = require("ws"); +var import_zod31 = require("zod"); + +// src/cf.ts +var import_assert = __toESM(require("assert")); +var import_promises = require("fs/promises"); +var import_path3 = __toESM(require("path")); +var import_undici = require("undici"); +var defaultCfPath = import_path3.default.resolve("node_modules", ".mf", "cf.json"); +var defaultCfFetchEndpoint = "https://workers.cloudflare.com/cf.json"; +var fallbackCf = { + asOrganization: "", + asn: 395747, + colo: "DFW", + city: "Austin", + region: "Texas", + regionCode: "TX", + metroCode: "635", + postalCode: "78701", + country: "US", + continent: "NA", + timezone: "America/Chicago", + latitude: "30.27130", + longitude: "-97.74260", + clientTcpRtt: 0, + httpProtocol: "HTTP/1.1", + requestPriority: "weight=192;exclusive=0", + tlsCipher: "AEAD-AES128-GCM-SHA256", + tlsVersion: "TLSv1.3", + tlsClientAuth: { + certPresented: "0", + certVerified: "NONE", + certRevoked: "0", + certIssuerDN: "", + certSubjectDN: "", + certIssuerDNRFC2253: "", + certSubjectDNRFC2253: "", + certIssuerDNLegacy: "", + certSubjectDNLegacy: "", + certSerial: "", + certIssuerSerial: "", + certSKI: "", + certIssuerSKI: "", + certFingerprintSHA1: "", + certFingerprintSHA256: "", + certNotBefore: "", + certNotAfter: "" + }, + edgeRequestKeepAliveStatus: 0, + hostMetadata: void 0, + clientTrustScore: 99, + botManagement: { + corporateProxy: false, + verifiedBot: false, + ja3Hash: "25b4882c2bcb50cd6b469ff28c596742", + staticResource: false, + detectionIds: [], + score: 99 + } +}; +var DAY = 864e5; +var CF_DAYS = 30; +async function setupCf(log, cf) { + if (!(cf ?? process.env.NODE_ENV !== "test")) { + return fallbackCf; + } + if (typeof cf === "object") { + return cf; + } + let cfPath = defaultCfPath; + if (typeof cf === "string") { + cfPath = cf; + } + try { + const storedCf = JSON.parse(await (0, import_promises.readFile)(cfPath, "utf8")); + const cfStat = await (0, import_promises.stat)(cfPath); + (0, import_assert.default)(Date.now() - cfStat.mtimeMs <= CF_DAYS * DAY); + return storedCf; + } catch { + } + try { + const res = await (0, import_undici.fetch)(defaultCfFetchEndpoint); + const cfText = await res.text(); + const storedCf = JSON.parse(cfText); + await (0, import_promises.mkdir)(import_path3.default.dirname(cfPath), { recursive: true }); + await (0, import_promises.writeFile)(cfPath, cfText, "utf8"); + log.debug("Updated `Request.cf` object cache!"); + return storedCf; + } catch (e) { + log.warn( + "Unable to fetch the `Request.cf` object! Falling back to a default placeholder...\n" + dim(e.cause ? e.cause.stack : e.stack) + ); + return fallbackCf; + } +} + +// src/http/fetch.ts +var undici = __toESM(require("undici")); +var import_ws2 = __toESM(require("ws")); + +// src/workers/cache/constants.ts +var CacheHeaders = { + NAMESPACE: "cf-cache-namespace", + STATUS: "cf-cache-status" +}; +var CacheBindings = { + MAYBE_JSON_CACHE_WARN_USAGE: "MINIFLARE_CACHE_WARN_USAGE" +}; + +// src/workers/core/constants.ts +var CoreHeaders = { + CUSTOM_SERVICE: "MF-Custom-Service", + ORIGINAL_URL: "MF-Original-URL", + PROXY_SHARED_SECRET: "MF-Proxy-Shared-Secret", + DISABLE_PRETTY_ERROR: "MF-Disable-Pretty-Error", + ERROR_STACK: "MF-Experimental-Error-Stack", + ROUTE_OVERRIDE: "MF-Route-Override", + CF_BLOB: "MF-CF-Blob", + // API Proxy + OP_SECRET: "MF-Op-Secret", + OP: "MF-Op", + OP_TARGET: "MF-Op-Target", + OP_KEY: "MF-Op-Key", + OP_SYNC: "MF-Op-Sync", + OP_STRINGIFIED_SIZE: "MF-Op-Stringified-Size", + OP_RESULT_TYPE: "MF-Op-Result-Type" +}; +var CoreBindings = { + SERVICE_LOOPBACK: "MINIFLARE_LOOPBACK", + SERVICE_USER_ROUTE_PREFIX: "MINIFLARE_USER_ROUTE_", + SERVICE_USER_FALLBACK: "MINIFLARE_USER_FALLBACK", + TEXT_CUSTOM_SERVICE: "MINIFLARE_CUSTOM_SERVICE", + IMAGES_SERVICE: "MINIFLARE_IMAGES_SERVICE", + TEXT_UPSTREAM_URL: "MINIFLARE_UPSTREAM_URL", + JSON_CF_BLOB: "CF_BLOB", + JSON_ROUTES: "MINIFLARE_ROUTES", + JSON_LOG_LEVEL: "MINIFLARE_LOG_LEVEL", + DATA_LIVE_RELOAD_SCRIPT: "MINIFLARE_LIVE_RELOAD_SCRIPT", + DURABLE_OBJECT_NAMESPACE_PROXY: "MINIFLARE_PROXY", + DATA_PROXY_SECRET: "MINIFLARE_PROXY_SECRET", + DATA_PROXY_SHARED_SECRET: "MINIFLARE_PROXY_SHARED_SECRET", + TRIGGER_HANDLERS: "TRIGGER_HANDLERS", + LOG_REQUESTS: "LOG_REQUESTS" +}; +var ProxyOps = { + // Get the target or a property of the target + GET: "GET", + // Get the descriptor for a property of the target + GET_OWN_DESCRIPTOR: "GET_OWN_DESCRIPTOR", + // Get the target's own property names + GET_OWN_KEYS: "GET_OWN_KEYS", + // Call a method on the target + CALL: "CALL", + // Remove the strong reference to the target on the "heap", allowing it to be + // garbage collected + FREE: "FREE" +}; +var ProxyAddresses = { + GLOBAL: 0, + // globalThis + ENV: 1, + // env + USER_START: 2 +}; +function isFetcherFetch(targetName, key) { + return (targetName === "Fetcher" || targetName === "DurableObject" || targetName === "WorkerRpc") && key === "fetch"; +} +function isR2ObjectWriteHttpMetadata(targetName, key) { + return (targetName === "HeadResult" || targetName === "GetResult") && key === "writeHttpMetadata"; +} + +// src/workers/core/devalue.ts +var import_node_assert = __toESM(require("node:assert")); +var import_node_buffer = require("node:buffer"); + +// ../../node_modules/.pnpm/devalue@4.3.2/node_modules/devalue/src/utils.js +var DevalueError = class extends Error { + /** + * @param {string} message + * @param {string[]} keys + */ + constructor(message, keys) { + super(message); + this.name = "DevalueError"; + this.path = keys.join(""); + } +}; +function is_primitive(thing) { + return Object(thing) !== thing; +} +var object_proto_names = /* @__PURE__ */ Object.getOwnPropertyNames( + Object.prototype +).sort().join("\0"); +function is_plain_object(thing) { + const proto = Object.getPrototypeOf(thing); + return proto === Object.prototype || proto === null || Object.getOwnPropertyNames(proto).sort().join("\0") === object_proto_names; +} +function get_type(thing) { + return Object.prototype.toString.call(thing).slice(8, -1); +} +function get_escaped_char(char) { + switch (char) { + case '"': + return '\\"'; + case "<": + return "\\u003C"; + case "\\": + return "\\\\"; + case "\n": + return "\\n"; + case "\r": + return "\\r"; + case " ": + return "\\t"; + case "\b": + return "\\b"; + case "\f": + return "\\f"; + case "\u2028": + return "\\u2028"; + case "\u2029": + return "\\u2029"; + default: + return char < " " ? `\\u${char.charCodeAt(0).toString(16).padStart(4, "0")}` : ""; + } +} +function stringify_string(str) { + let result = ""; + let last_pos = 0; + const len = str.length; + for (let i = 0; i < len; i += 1) { + const char = str[i]; + const replacement = get_escaped_char(char); + if (replacement) { + result += str.slice(last_pos, i) + replacement; + last_pos = i + 1; + } + } + return `"${last_pos === 0 ? str : result + str.slice(last_pos)}"`; +} + +// ../../node_modules/.pnpm/devalue@4.3.2/node_modules/devalue/src/constants.js +var UNDEFINED = -1; +var HOLE = -2; +var NAN = -3; +var POSITIVE_INFINITY = -4; +var NEGATIVE_INFINITY = -5; +var NEGATIVE_ZERO = -6; + +// ../../node_modules/.pnpm/devalue@4.3.2/node_modules/devalue/src/parse.js +function parse(serialized, revivers2) { + return unflatten(JSON.parse(serialized), revivers2); +} +function unflatten(parsed, revivers2) { + if (typeof parsed === "number") return hydrate(parsed, true); + if (!Array.isArray(parsed) || parsed.length === 0) { + throw new Error("Invalid input"); + } + const values = ( + /** @type {any[]} */ + parsed + ); + const hydrated = Array(values.length); + function hydrate(index, standalone = false) { + if (index === UNDEFINED) return void 0; + if (index === NAN) return NaN; + if (index === POSITIVE_INFINITY) return Infinity; + if (index === NEGATIVE_INFINITY) return -Infinity; + if (index === NEGATIVE_ZERO) return -0; + if (standalone) throw new Error(`Invalid input`); + if (index in hydrated) return hydrated[index]; + const value = values[index]; + if (!value || typeof value !== "object") { + hydrated[index] = value; + } else if (Array.isArray(value)) { + if (typeof value[0] === "string") { + const type = value[0]; + const reviver = revivers2?.[type]; + if (reviver) { + return hydrated[index] = reviver(hydrate(value[1])); + } + switch (type) { + case "Date": + hydrated[index] = new Date(value[1]); + break; + case "Set": + const set = /* @__PURE__ */ new Set(); + hydrated[index] = set; + for (let i = 1; i < value.length; i += 1) { + set.add(hydrate(value[i])); + } + break; + case "Map": + const map = /* @__PURE__ */ new Map(); + hydrated[index] = map; + for (let i = 1; i < value.length; i += 2) { + map.set(hydrate(value[i]), hydrate(value[i + 1])); + } + break; + case "RegExp": + hydrated[index] = new RegExp(value[1], value[2]); + break; + case "Object": + hydrated[index] = Object(value[1]); + break; + case "BigInt": + hydrated[index] = BigInt(value[1]); + break; + case "null": + const obj = /* @__PURE__ */ Object.create(null); + hydrated[index] = obj; + for (let i = 1; i < value.length; i += 2) { + obj[value[i]] = hydrate(value[i + 1]); + } + break; + default: + throw new Error(`Unknown type ${type}`); + } + } else { + const array = new Array(value.length); + hydrated[index] = array; + for (let i = 0; i < value.length; i += 1) { + const n = value[i]; + if (n === HOLE) continue; + array[i] = hydrate(n); + } + } + } else { + const object = {}; + hydrated[index] = object; + for (const key in value) { + const n = value[key]; + object[key] = hydrate(n); + } + } + return hydrated[index]; + } + return hydrate(0); +} + +// ../../node_modules/.pnpm/devalue@4.3.2/node_modules/devalue/src/stringify.js +function stringify(value, reducers2) { + const stringified = []; + const indexes = /* @__PURE__ */ new Map(); + const custom = []; + for (const key in reducers2) { + custom.push({ key, fn: reducers2[key] }); + } + const keys = []; + let p = 0; + function flatten(thing) { + if (typeof thing === "function") { + throw new DevalueError(`Cannot stringify a function`, keys); + } + if (indexes.has(thing)) return indexes.get(thing); + if (thing === void 0) return UNDEFINED; + if (Number.isNaN(thing)) return NAN; + if (thing === Infinity) return POSITIVE_INFINITY; + if (thing === -Infinity) return NEGATIVE_INFINITY; + if (thing === 0 && 1 / thing < 0) return NEGATIVE_ZERO; + const index2 = p++; + indexes.set(thing, index2); + for (const { key, fn } of custom) { + const value2 = fn(thing); + if (value2) { + stringified[index2] = `["${key}",${flatten(value2)}]`; + return index2; + } + } + let str = ""; + if (is_primitive(thing)) { + str = stringify_primitive(thing); + } else { + const type = get_type(thing); + switch (type) { + case "Number": + case "String": + case "Boolean": + str = `["Object",${stringify_primitive(thing)}]`; + break; + case "BigInt": + str = `["BigInt",${thing}]`; + break; + case "Date": + str = `["Date","${thing.toISOString()}"]`; + break; + case "RegExp": + const { source, flags } = thing; + str = flags ? `["RegExp",${stringify_string(source)},"${flags}"]` : `["RegExp",${stringify_string(source)}]`; + break; + case "Array": + str = "["; + for (let i = 0; i < thing.length; i += 1) { + if (i > 0) str += ","; + if (i in thing) { + keys.push(`[${i}]`); + str += flatten(thing[i]); + keys.pop(); + } else { + str += HOLE; + } + } + str += "]"; + break; + case "Set": + str = '["Set"'; + for (const value2 of thing) { + str += `,${flatten(value2)}`; + } + str += "]"; + break; + case "Map": + str = '["Map"'; + for (const [key, value2] of thing) { + keys.push( + `.get(${is_primitive(key) ? stringify_primitive(key) : "..."})` + ); + str += `,${flatten(key)},${flatten(value2)}`; + } + str += "]"; + break; + default: + if (!is_plain_object(thing)) { + throw new DevalueError( + `Cannot stringify arbitrary non-POJOs`, + keys + ); + } + if (Object.getOwnPropertySymbols(thing).length > 0) { + throw new DevalueError( + `Cannot stringify POJOs with symbolic keys`, + keys + ); + } + if (Object.getPrototypeOf(thing) === null) { + str = '["null"'; + for (const key in thing) { + keys.push(`.${key}`); + str += `,${stringify_string(key)},${flatten(thing[key])}`; + keys.pop(); + } + str += "]"; + } else { + str = "{"; + let started = false; + for (const key in thing) { + if (started) str += ","; + started = true; + keys.push(`.${key}`); + str += `${stringify_string(key)}:${flatten(thing[key])}`; + keys.pop(); + } + str += "}"; + } + } + } + stringified[index2] = str; + return index2; + } + const index = flatten(value); + if (index < 0) return `${index}`; + return `[${stringified.join(",")}]`; +} +function stringify_primitive(thing) { + const type = typeof thing; + if (type === "string") return stringify_string(thing); + if (thing instanceof String) return stringify_string(thing.toString()); + if (thing === void 0) return UNDEFINED.toString(); + if (thing === 0 && 1 / thing < 0) return NEGATIVE_ZERO.toString(); + if (type === "bigint") return `["BigInt","${thing}"]`; + return String(thing); +} + +// src/workers/core/devalue.ts +var ALLOWED_ARRAY_BUFFER_VIEW_CONSTRUCTORS = [ + DataView, + Int8Array, + Uint8Array, + Uint8ClampedArray, + Int16Array, + Uint16Array, + Int32Array, + Uint32Array, + Float32Array, + Float64Array, + BigInt64Array, + BigUint64Array +]; +var ALLOWED_ERROR_CONSTRUCTORS = [ + EvalError, + RangeError, + ReferenceError, + SyntaxError, + TypeError, + URIError, + Error + // `Error` last so more specific error subclasses preferred +]; +var structuredSerializableReducers = { + ArrayBuffer(value) { + if (value instanceof ArrayBuffer) { + return [import_node_buffer.Buffer.from(value).toString("base64")]; + } + }, + ArrayBufferView(value) { + if (ArrayBuffer.isView(value)) { + return [ + value.constructor.name, + value.buffer, + value.byteOffset, + value.byteLength + ]; + } + }, + Error(value) { + for (const ctor of ALLOWED_ERROR_CONSTRUCTORS) { + if (value instanceof ctor && value.name === ctor.name) { + return [value.name, value.message, value.stack, value.cause]; + } + } + if (value instanceof Error) { + return ["Error", value.message, value.stack, value.cause]; + } + } +}; +var structuredSerializableRevivers = { + ArrayBuffer(value) { + (0, import_node_assert.default)(Array.isArray(value)); + const [encoded] = value; + (0, import_node_assert.default)(typeof encoded === "string"); + const view = import_node_buffer.Buffer.from(encoded, "base64"); + return view.buffer.slice( + view.byteOffset, + view.byteOffset + view.byteLength + ); + }, + ArrayBufferView(value) { + (0, import_node_assert.default)(Array.isArray(value)); + const [name, buffer, byteOffset, byteLength] = value; + (0, import_node_assert.default)(typeof name === "string"); + (0, import_node_assert.default)(buffer instanceof ArrayBuffer); + (0, import_node_assert.default)(typeof byteOffset === "number"); + (0, import_node_assert.default)(typeof byteLength === "number"); + const ctor = globalThis[name]; + (0, import_node_assert.default)(ALLOWED_ARRAY_BUFFER_VIEW_CONSTRUCTORS.includes(ctor)); + let length = byteLength; + if ("BYTES_PER_ELEMENT" in ctor) length /= ctor.BYTES_PER_ELEMENT; + return new ctor(buffer, byteOffset, length); + }, + Error(value) { + (0, import_node_assert.default)(Array.isArray(value)); + const [name, message, stack, cause] = value; + (0, import_node_assert.default)(typeof name === "string"); + (0, import_node_assert.default)(typeof message === "string"); + (0, import_node_assert.default)(stack === void 0 || typeof stack === "string"); + const ctor = globalThis[name]; + (0, import_node_assert.default)(ALLOWED_ERROR_CONSTRUCTORS.includes(ctor)); + const error = new ctor(message, { cause }); + error.stack = stack; + return error; + } +}; +function createHTTPReducers(impl) { + return { + Headers(val) { + if (val instanceof impl.Headers) return Object.fromEntries(val); + }, + Request(val) { + if (val instanceof impl.Request) { + return [val.method, val.url, val.headers, val.cf, val.body]; + } + }, + Response(val) { + if (val instanceof impl.Response) { + return [val.status, val.statusText, val.headers, val.cf, val.body]; + } + } + }; +} +function createHTTPRevivers(impl) { + return { + Headers(value) { + (0, import_node_assert.default)(typeof value === "object" && value !== null); + return new impl.Headers(value); + }, + Request(value) { + (0, import_node_assert.default)(Array.isArray(value)); + const [method, url27, headers, cf, body] = value; + (0, import_node_assert.default)(typeof method === "string"); + (0, import_node_assert.default)(typeof url27 === "string"); + (0, import_node_assert.default)(headers instanceof impl.Headers); + (0, import_node_assert.default)(body === null || impl.isReadableStream(body)); + return new impl.Request(url27, { + method, + headers, + cf, + // @ts-expect-error `duplex` is not required by `workerd` yet + duplex: body === null ? void 0 : "half", + body + }); + }, + Response(value) { + (0, import_node_assert.default)(Array.isArray(value)); + const [status, statusText, headers, cf, body] = value; + (0, import_node_assert.default)(typeof status === "number"); + (0, import_node_assert.default)(typeof statusText === "string"); + (0, import_node_assert.default)(headers instanceof impl.Headers); + (0, import_node_assert.default)(body === null || impl.isReadableStream(body)); + return new impl.Response(body, { + status, + statusText, + headers, + cf + }); + } + }; +} +function stringifyWithStreams(impl, value, reducers2, allowUnbufferedStream) { + let unbufferedStream; + const bufferPromises = []; + const streamReducers = { + ReadableStream(value2) { + if (impl.isReadableStream(value2)) { + if (allowUnbufferedStream && unbufferedStream === void 0) { + unbufferedStream = value2; + } else { + bufferPromises.push(impl.bufferReadableStream(value2)); + } + return true; + } + }, + Blob(value2) { + if (value2 instanceof impl.Blob) { + bufferPromises.push(value2.arrayBuffer()); + return true; + } + }, + ...reducers2 + }; + if (typeof value === "function") { + value = new __MiniflareFunctionWrapper( + value + ); + } + const stringifiedValue = stringify(value, streamReducers); + if (bufferPromises.length === 0) { + return { value: stringifiedValue, unbufferedStream }; + } + return Promise.all(bufferPromises).then((streamBuffers) => { + streamReducers.ReadableStream = function(value2) { + if (impl.isReadableStream(value2)) { + if (value2 === unbufferedStream) { + return true; + } else { + return streamBuffers.shift(); + } + } + }; + streamReducers.Blob = function(value2) { + if (value2 instanceof impl.Blob) { + const array = [streamBuffers.shift(), value2.type]; + if (value2 instanceof impl.File) { + array.push(value2.name, value2.lastModified); + } + return array; + } + }; + const stringifiedValue2 = stringify(value, streamReducers); + return { value: stringifiedValue2, unbufferedStream }; + }); +} +var __MiniflareFunctionWrapper = class { + constructor(fnWithProps) { + return new Proxy(this, { + get: (_, key) => { + if (key === "__miniflareWrappedFunction") return fnWithProps; + return fnWithProps[key]; + } + }); + } +}; +function parseWithReadableStreams(impl, stringified, revivers2) { + const streamRevivers = { + ReadableStream(value) { + if (value === true) { + (0, import_node_assert.default)(stringified.unbufferedStream !== void 0); + return stringified.unbufferedStream; + } + (0, import_node_assert.default)(value instanceof ArrayBuffer); + return impl.unbufferReadableStream(value); + }, + Blob(value) { + (0, import_node_assert.default)(Array.isArray(value)); + if (value.length === 2) { + const [buffer, type] = value; + (0, import_node_assert.default)(buffer instanceof ArrayBuffer); + (0, import_node_assert.default)(typeof type === "string"); + const opts = {}; + if (type !== "") opts.type = type; + return new impl.Blob([buffer], opts); + } else { + (0, import_node_assert.default)(value.length === 4); + const [buffer, type, name, lastModified] = value; + (0, import_node_assert.default)(buffer instanceof ArrayBuffer); + (0, import_node_assert.default)(typeof type === "string"); + (0, import_node_assert.default)(typeof name === "string"); + (0, import_node_assert.default)(typeof lastModified === "number"); + const opts = { lastModified }; + if (type !== "") opts.type = type; + return new impl.File([buffer], name, opts); + } + }, + ...revivers2 + }; + return parse(stringified.value, streamRevivers); +} + +// src/workers/core/routing.ts +function matchRoutes(routes, url27) { + for (const route of routes) { + if (route.protocol && route.protocol !== url27.protocol) continue; + if (route.allowHostnamePrefix) { + if (!url27.hostname.endsWith(route.hostname)) continue; + } else { + if (url27.hostname !== route.hostname) continue; + } + const path37 = url27.pathname + url27.search; + if (route.allowPathSuffix) { + if (!path37.startsWith(route.path)) continue; + } else { + if (path37 !== route.path) continue; + } + return route.target; + } + return null; +} + +// src/workers/shared/constants.ts +var SharedHeaders = { + LOG_LEVEL: "MF-Log-Level" +}; +var SharedBindings = { + TEXT_NAMESPACE: "MINIFLARE_NAMESPACE", + DURABLE_OBJECT_NAMESPACE_OBJECT: "MINIFLARE_OBJECT", + MAYBE_SERVICE_BLOBS: "MINIFLARE_BLOBS", + MAYBE_SERVICE_LOOPBACK: "MINIFLARE_LOOPBACK", + MAYBE_JSON_ENABLE_CONTROL_ENDPOINTS: "MINIFLARE_ENABLE_CONTROL_ENDPOINTS", + MAYBE_JSON_ENABLE_STICKY_BLOBS: "MINIFLARE_STICKY_BLOBS" +}; +var LogLevel = /* @__PURE__ */ ((LogLevel2) => { + LogLevel2[LogLevel2["NONE"] = 0] = "NONE"; + LogLevel2[LogLevel2["ERROR"] = 1] = "ERROR"; + LogLevel2[LogLevel2["WARN"] = 2] = "WARN"; + LogLevel2[LogLevel2["INFO"] = 3] = "INFO"; + LogLevel2[LogLevel2["DEBUG"] = 4] = "DEBUG"; + LogLevel2[LogLevel2["VERBOSE"] = 5] = "VERBOSE"; + return LogLevel2; +})(LogLevel || {}); + +// src/workers/shared/data.ts +var import_node_buffer2 = require("node:buffer"); +function viewToBuffer(view) { + return view.buffer.slice( + view.byteOffset, + view.byteOffset + view.byteLength + ); +} +function base64Encode(value) { + return import_node_buffer2.Buffer.from(value, "utf8").toString("base64"); +} +function base64Decode(encoded) { + return import_node_buffer2.Buffer.from(encoded, "base64").toString("utf8"); +} +var dotRegexp = /(^|\/|\\)(\.+)(\/|\\|$)/g; +var illegalRegexp = /[?<>*"'^/\\:|\x00-\x1f\x80-\x9f]/g; +var windowsReservedRegexp = /^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i; +var leadingRegexp = /^[ /\\]+/; +var trailingRegexp = /[ /\\]+$/; +function dotReplacement(match, g1, g2, g3) { + return `${g1}${"".padStart(g2.length, "_")}${g3}`; +} +function underscoreReplacement(match) { + return "".padStart(match.length, "_"); +} +function sanitisePath(unsafe) { + return unsafe.replace(dotRegexp, dotReplacement).replace(dotRegexp, dotReplacement).replace(illegalRegexp, "_").replace(windowsReservedRegexp, "_").replace(leadingRegexp, underscoreReplacement).replace(trailingRegexp, underscoreReplacement).substring(0, 255); +} + +// src/workers/shared/matcher.ts +function testRegExps(matcher, value) { + for (const exclude of matcher.exclude) if (exclude.test(value)) return false; + for (const include of matcher.include) if (include.test(value)) return true; + return false; +} + +// src/workers/shared/range.ts +var rangePrefixRegexp = /^ *bytes *=/i; +var rangeRegexp = /^ *(?\d+)? *- *(?\d+)? *$/; +function parseRanges(rangeHeader, length) { + const prefixMatch = rangePrefixRegexp.exec(rangeHeader); + if (prefixMatch === null) return; + rangeHeader = rangeHeader.substring(prefixMatch[0].length); + if (rangeHeader.trimStart() === "") return []; + const ranges = rangeHeader.split(","); + const result = []; + for (const range of ranges) { + const match = rangeRegexp.exec(range); + if (match === null) return; + const { start, end } = match.groups; + if (start !== void 0 && end !== void 0) { + const rangeStart = parseInt(start); + let rangeEnd = parseInt(end); + if (rangeStart > rangeEnd) return; + if (rangeStart >= length) return; + if (rangeEnd >= length) rangeEnd = length - 1; + result.push({ start: rangeStart, end: rangeEnd }); + } else if (start !== void 0 && end === void 0) { + const rangeStart = parseInt(start); + if (rangeStart >= length) return; + result.push({ start: rangeStart, end: length - 1 }); + } else if (start === void 0 && end !== void 0) { + const suffix = parseInt(end); + if (suffix >= length) return []; + if (suffix === 0) continue; + result.push({ start: length - suffix, end: length - 1 }); + } else { + return; + } + } + return result; +} + +// src/workers/shared/sync.ts +var import_node_assert2 = __toESM(require("node:assert")); +var DeferredPromise = class extends Promise { + resolve; + reject; + constructor(executor = () => { + }) { + let promiseResolve; + let promiseReject; + super((resolve2, reject) => { + promiseResolve = resolve2; + promiseReject = reject; + return executor(resolve2, reject); + }); + this.resolve = promiseResolve; + this.reject = promiseReject; + } +}; +var Mutex = class { + locked = false; + resolveQueue = []; + drainQueue = []; + lock() { + if (!this.locked) { + this.locked = true; + return; + } + return new Promise((resolve2) => this.resolveQueue.push(resolve2)); + } + unlock() { + (0, import_node_assert2.default)(this.locked); + if (this.resolveQueue.length > 0) { + this.resolveQueue.shift()?.(); + } else { + this.locked = false; + let resolve2; + while ((resolve2 = this.drainQueue.shift()) !== void 0) resolve2(); + } + } + get hasWaiting() { + return this.resolveQueue.length > 0; + } + async runWith(closure) { + const acquireAwaitable = this.lock(); + if (acquireAwaitable instanceof Promise) await acquireAwaitable; + try { + const awaitable = closure(); + if (awaitable instanceof Promise) return await awaitable; + return awaitable; + } finally { + this.unlock(); + } + } + async drained() { + if (this.resolveQueue.length === 0 && !this.locked) return; + return new Promise((resolve2) => this.drainQueue.push(resolve2)); + } +}; +var WaitGroup = class { + counter = 0; + resolveQueue = []; + add() { + this.counter++; + } + done() { + (0, import_node_assert2.default)(this.counter > 0); + this.counter--; + if (this.counter === 0) { + let resolve2; + while ((resolve2 = this.resolveQueue.shift()) !== void 0) resolve2(); + } + } + wait() { + if (this.counter === 0) return Promise.resolve(); + return new Promise((resolve2) => this.resolveQueue.push(resolve2)); + } +}; + +// src/workers/shared/types.ts +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) + }; +} +function maybeApply(f, maybeValue) { + return maybeValue === void 0 ? void 0 : f(maybeValue); +} + +// src/workers/kv/constants.ts +var KVLimits = { + MIN_CACHE_TTL: 60, + MAX_LIST_KEYS: 1e3, + MAX_KEY_SIZE: 512, + MAX_VALUE_SIZE: 25 * 1024 * 1024, + MAX_VALUE_SIZE_TEST: 1024, + MAX_METADATA_SIZE: 1024, + MAX_BULK_SIZE: 25 * 1024 * 1024 +}; +var KVParams = { + URL_ENCODED: "urlencoded", + CACHE_TTL: "cache_ttl", + EXPIRATION: "expiration", + EXPIRATION_TTL: "expiration_ttl", + LIST_LIMIT: "key_count_limit", + LIST_PREFIX: "prefix", + LIST_CURSOR: "cursor" +}; +var KVHeaders = { + EXPIRATION: "CF-Expiration", + METADATA: "CF-KV-Metadata" +}; +var SiteBindings = { + KV_NAMESPACE_SITE: "__STATIC_CONTENT", + JSON_SITE_MANIFEST: "__STATIC_CONTENT_MANIFEST", + JSON_SITE_FILTER: "MINIFLARE_SITE_FILTER" +}; +var SITES_NO_CACHE_PREFIX = "$__MINIFLARE_SITES__$/"; +var MAX_BULK_GET_KEYS = 100; +function encodeSitesKey(key) { + return SITES_NO_CACHE_PREFIX + encodeURIComponent(key); +} +function decodeSitesKey(key) { + return key.startsWith(SITES_NO_CACHE_PREFIX) ? decodeURIComponent(key.substring(SITES_NO_CACHE_PREFIX.length)) : key; +} +function isSitesRequest(request) { + const url27 = new URL(request.url); + return url27.pathname.startsWith(`/${SITES_NO_CACHE_PREFIX}`); +} +function serialiseRegExp(regExp) { + const str = regExp.toString(); + return str.substring(str.indexOf("/") + 1, str.lastIndexOf("/")); +} +function serialiseRegExps(matcher) { + return { + include: matcher.include.map(serialiseRegExp), + exclude: matcher.exclude.map(serialiseRegExp) + }; +} +function deserialiseRegExps(matcher) { + return { + include: matcher.include.map((regExp) => new RegExp(regExp)), + exclude: matcher.exclude.map((regExp) => new RegExp(regExp)) + }; +} +function serialiseSiteRegExps(siteRegExps) { + return { + include: siteRegExps.include && serialiseRegExps(siteRegExps.include), + exclude: siteRegExps.exclude && serialiseRegExps(siteRegExps.exclude) + }; +} +function deserialiseSiteRegExps(siteRegExps) { + return { + include: siteRegExps.include && deserialiseRegExps(siteRegExps.include), + exclude: siteRegExps.exclude && deserialiseRegExps(siteRegExps.exclude) + }; +} +function testSiteRegExps(regExps, key) { + if (regExps.include !== void 0) return testRegExps(regExps.include, key); + if (regExps.exclude !== void 0) return !testRegExps(regExps.exclude, key); + return true; +} +function getAssetsBindingsNames(assetsKVBindingName = "__STATIC_ASSETS_CONTENT", assetsManifestBindingName = "__STATIC_ASSETS_CONTENT_MANIFEST") { + return { + ASSETS_KV_NAMESPACE: assetsKVBindingName, + ASSETS_MANIFEST: assetsManifestBindingName + }; +} + +// src/workers/queues/constants.ts +var QueueBindings = { + SERVICE_WORKER_PREFIX: "MINIFLARE_WORKER_", + MAYBE_JSON_QUEUE_PRODUCERS: "MINIFLARE_QUEUE_PRODUCERS", + MAYBE_JSON_QUEUE_CONSUMERS: "MINIFLARE_QUEUE_CONSUMERS" +}; + +// src/workers/shared/zod.worker.ts +var import_node_buffer3 = require("node:buffer"); +var import_zod = require("zod"); +var import_zod2 = require("zod"); +var HEX_REGEXP = /^[0-9a-f]*$/i; +var BASE64_REGEXP = /^[0-9a-z+/=]*$/i; +var HexDataSchema = import_zod.z.string().regex(HEX_REGEXP).transform((hex) => import_node_buffer3.Buffer.from(hex, "hex")); +var Base64DataSchema = import_zod.z.string().regex(BASE64_REGEXP).transform((base64) => import_node_buffer3.Buffer.from(base64, "base64")); + +// src/workers/queues/schemas.ts +var QueueMessageDelaySchema = import_zod2.z.number().int().min(0).max(43200).optional(); +var QueueProducerOptionsSchema = /* @__PURE__ */ import_zod2.z.object({ + // https://developers.cloudflare.com/queues/platform/configuration/#producer + queueName: import_zod2.z.string(), + deliveryDelay: QueueMessageDelaySchema +}); +var QueueProducerSchema = /* @__PURE__ */ import_zod2.z.intersection( + QueueProducerOptionsSchema, + import_zod2.z.object({ workerName: import_zod2.z.string() }) +); +var QueueProducersSchema = /* @__PURE__ */ import_zod2.z.record(QueueProducerSchema); +var QueueConsumerOptionsSchema = /* @__PURE__ */ import_zod2.z.object({ + // https://developers.cloudflare.com/queues/platform/configuration/#consumer + // https://developers.cloudflare.com/queues/platform/limits/ + maxBatchSize: import_zod2.z.number().min(0).max(100).optional(), + maxBatchTimeout: import_zod2.z.number().min(0).max(60).optional(), + // seconds + maxRetires: import_zod2.z.number().min(0).max(100).optional(), + // deprecated + maxRetries: import_zod2.z.number().min(0).max(100).optional(), + deadLetterQueue: import_zod2.z.ostring(), + retryDelay: QueueMessageDelaySchema +}).transform((queue) => { + if (queue.maxRetires !== void 0) { + queue.maxRetries = queue.maxRetires; + } + return queue; +}); +var QueueConsumerSchema = /* @__PURE__ */ import_zod2.z.intersection( + QueueConsumerOptionsSchema, + import_zod2.z.object({ workerName: import_zod2.z.string() }) +); +var QueueConsumersSchema = /* @__PURE__ */ import_zod2.z.record(QueueConsumerSchema); +var QueueContentTypeSchema = /* @__PURE__ */ import_zod2.z.enum(["text", "json", "bytes", "v8"]).default("v8"); +var QueueIncomingMessageSchema = /* @__PURE__ */ import_zod2.z.object({ + contentType: QueueContentTypeSchema, + delaySecs: QueueMessageDelaySchema, + body: Base64DataSchema, + // When enqueuing messages on dead-letter queues, we want to reuse the same ID + // and timestamp + id: import_zod2.z.ostring(), + timestamp: import_zod2.z.onumber() +}); +var QueuesBatchRequestSchema = /* @__PURE__ */ import_zod2.z.object({ + messages: import_zod2.z.array(QueueIncomingMessageSchema) +}); + +// src/http/request.ts +var import_undici2 = require("undici"); +var kCf = Symbol("kCf"); +var Request = class _Request extends import_undici2.Request { + // We should be able to use a private `#cf` property here instead of a symbol + // here, but we need to set this on a clone, which would otherwise lead to a + // "Cannot write private member to an object whose class did not declare it" + // error. + [kCf]; + constructor(input, init2) { + super(input, init2); + this[kCf] = init2?.cf; + if (input instanceof _Request) this[kCf] ??= input.cf; + } + get cf() { + return this[kCf]; + } + // JSDoc comment so retained when bundling types with api-extractor + /** @ts-expect-error `clone` is actually defined as a method internally */ + clone() { + const request = super.clone(); + Object.setPrototypeOf(request, _Request.prototype); + request[kCf] = this[kCf]; + return request; + } +}; + +// src/http/response.ts +var import_undici3 = require("undici"); +var kWebSocket = Symbol("kWebSocket"); +var Response2 = class _Response extends import_undici3.Response { + // We should be able to use a private `#webSocket` property here instead of a + // symbol here, but `undici` calls `this.status` in its constructor, which + // causes a "Cannot read private member from an object whose class did not + // declare it" error. + [kWebSocket]; + // Override BaseResponse's static methods for building Responses to return + // our type instead. Ideally, we don't want to use `Object.setPrototypeOf`. + // Unfortunately, `error()` and `redirect()` set the internal header guard + // to "immutable". + static error() { + const response = import_undici3.Response.error(); + Object.setPrototypeOf(response, _Response.prototype); + return response; + } + static redirect(url27, status) { + const response = import_undici3.Response.redirect(url27, status); + Object.setPrototypeOf(response, _Response.prototype); + return response; + } + static json(data, init2) { + const body = JSON.stringify(data); + const response = new _Response(body, init2); + response.headers.set("Content-Type", "application/json"); + return response; + } + constructor(body, init2) { + if (init2?.webSocket) { + if (init2.status !== 101) { + throw new RangeError( + "Responses with a WebSocket must have status code 101." + ); + } + init2 = { ...init2, status: 200 }; + } + super(body, init2); + this[kWebSocket] = init2?.webSocket ?? null; + } + // JSDoc comment so retained when bundling types with api-extractor + /** @ts-expect-error `status` is actually defined as a getter internally */ + get status() { + return this[kWebSocket] ? 101 : super.status; + } + get webSocket() { + return this[kWebSocket]; + } + // JSDoc comment so retained when bundling types with api-extractor + /** @ts-expect-error `clone` is actually defined as a method internally */ + clone() { + if (this[kWebSocket]) { + throw new TypeError("Cannot clone a response to a WebSocket handshake."); + } + const response = super.clone(); + Object.setPrototypeOf(response, _Response.prototype); + return response; + } +}; + +// src/http/websocket.ts +var import_assert3 = __toESM(require("assert")); +var import_events = require("events"); +var import_ws = __toESM(require("ws")); + +// src/shared/colour.ts +var originalEnabled = $.enabled; +function _forceColour(enabled = originalEnabled) { + $.enabled = enabled; +} + +// src/shared/error.ts +var MiniflareError = class extends Error { + constructor(code, message, cause) { + super(message); + this.code = code; + this.cause = cause; + Object.setPrototypeOf(this, new.target.prototype); + this.name = `${new.target.name} [${code}]`; + } +}; +var MiniflareCoreError = class extends MiniflareError { +}; + +// src/shared/event.ts +var TypedEventTarget = class extends EventTarget { + addEventListener(type, listener, options) { + super.addEventListener( + type, + listener, + options + ); + } + removeEventListener(type, listener, options) { + super.removeEventListener( + type, + listener, + options + ); + } + dispatchEvent(event) { + return super.dispatchEvent(event); + } +}; + +// src/shared/log.ts +var import_path4 = __toESM(require("path")); +var cwd = process.cwd(); +var cwdNodeModules = import_path4.default.join(cwd, "node_modules"); +var LEVEL_PREFIX = { + [0 /* NONE */]: "", + [1 /* ERROR */]: "err", + [2 /* WARN */]: "wrn", + [3 /* INFO */]: "inf", + [4 /* DEBUG */]: "dbg", + [5 /* VERBOSE */]: "vrb" +}; +var LEVEL_COLOUR = { + [0 /* NONE */]: reset, + [1 /* ERROR */]: red, + [2 /* WARN */]: yellow, + [3 /* INFO */]: green, + [4 /* DEBUG */]: grey, + [5 /* VERBOSE */]: (input) => dim(grey(input)) +}; +function prefixError(prefix, e) { + if (e.stack) { + return new Proxy(e, { + get(target, propertyKey, receiver) { + const value = Reflect.get(target, propertyKey, receiver); + return propertyKey === "stack" ? `${prefix}: ${value}` : value; + } + }); + } + return e; +} +function dimInternalStackLine(line) { + if (line.startsWith(" at") && (!line.includes(cwd) || line.includes(cwdNodeModules))) { + return dim(line); + } + return line; +} +var Log = class _Log { + constructor(level = 3 /* INFO */, opts = {}) { + this.level = level; + const prefix = opts.prefix ?? "mf"; + const suffix = opts.suffix ?? ""; + this.#prefix = prefix ? prefix + ":" : ""; + this.#suffix = suffix ? ":" + suffix : ""; + } + #prefix; + #suffix; + log(message) { + _Log.#beforeLogHook?.(); + console.log(message); + _Log.#afterLogHook?.(); + } + static #beforeLogHook; + static unstable_registerBeforeLogHook(callback) { + this.#beforeLogHook = callback; + } + static #afterLogHook; + static unstable_registerAfterLogHook(callback) { + this.#afterLogHook = callback; + } + logWithLevel(level, message) { + if (level <= this.level) { + const prefix = `[${this.#prefix}${LEVEL_PREFIX[level]}${this.#suffix}]`; + this.log(LEVEL_COLOUR[level](`${prefix} ${message}`)); + } + } + error(message) { + if (this.level < 1 /* ERROR */) { + } else if (message.stack) { + const lines = message.stack.split("\n").map(dimInternalStackLine); + this.logWithLevel(1 /* ERROR */, lines.join("\n")); + } else { + this.logWithLevel(1 /* ERROR */, message.toString()); + } + if (message.cause) { + this.error(prefixError("Cause", message.cause)); + } + } + warn(message) { + this.logWithLevel(2 /* WARN */, message); + } + info(message) { + this.logWithLevel(3 /* INFO */, message); + } + debug(message) { + this.logWithLevel(4 /* DEBUG */, message); + } + verbose(message) { + this.logWithLevel(5 /* VERBOSE */, message); + } +}; +var NoOpLog = class extends Log { + constructor() { + super(0 /* NONE */); + } + log() { + } + error(_message) { + } +}; +var ansiRegexpPattern = [ + "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", + "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))" +].join("|"); +var ansiRegexp = new RegExp(ansiRegexpPattern, "g"); +function stripAnsi(value) { + return value.replace(ansiRegexp, ""); +} + +// src/shared/matcher.ts +var import_glob_to_regexp = __toESM(require("glob-to-regexp")); +function globsToRegExps(globs = []) { + const include = []; + const exclude = []; + const opts = { globstar: true, flags: "g" }; + for (const glob of globs) { + if (glob.startsWith("!")) { + exclude.push(new RegExp((0, import_glob_to_regexp.default)(glob.slice(1), opts), "")); + } else { + include.push(new RegExp((0, import_glob_to_regexp.default)(glob, opts), "")); + } + } + return { include, exclude }; +} + +// src/shared/streams.ts +var import_web = require("stream/web"); +function prefixStream(prefix, stream) { + const identity = new import_web.TransformStream(); + const writer = identity.writable.getWriter(); + void writer.write(prefix).then(() => { + writer.releaseLock(); + return stream.pipeTo(identity.writable); + }).catch((error) => { + return writer.abort(error); + }); + return identity.readable; +} +async function readPrefix(stream, prefixLength) { + const chunks = []; + let chunksLength = 0; + for await (const chunk of stream.values({ preventCancel: true })) { + chunks.push(chunk); + chunksLength += chunk.byteLength; + if (chunksLength >= prefixLength) break; + } + if (chunksLength < prefixLength) { + throw new RangeError( + `Expected ${prefixLength} byte prefix, but received ${chunksLength} byte stream` + ); + } + const atLeastPrefix = Buffer.concat(chunks, chunksLength); + const prefix = atLeastPrefix.subarray(0, prefixLength); + let rest = stream; + if (chunksLength > prefixLength) { + rest = prefixStream(atLeastPrefix.subarray(prefixLength), stream); + } + return [prefix, rest]; +} + +// src/shared/types.ts +var import_assert2 = __toESM(require("assert")); +var import_path5 = __toESM(require("path")); +var import_zod3 = require("zod"); +function zAwaitable(type) { + return type.or(import_zod3.z.promise(type)); +} +var LiteralSchema = import_zod3.z.union([ + import_zod3.z.string(), + import_zod3.z.number(), + import_zod3.z.boolean(), + import_zod3.z.null() +]); +var JsonSchema = import_zod3.z.lazy( + () => import_zod3.z.union([LiteralSchema, import_zod3.z.array(JsonSchema), import_zod3.z.record(JsonSchema)]) +); +var rootPath; +function parseWithRootPath(newRootPath, schema, data, params) { + rootPath = newRootPath; + try { + return schema.parse(data, params); + } finally { + rootPath = void 0; + } +} +var PathSchema = import_zod3.z.string().transform((p) => { + (0, import_assert2.default)( + rootPath !== void 0, + "Expected `PathSchema` to be parsed within `parseWithRootPath()`" + ); + return import_path5.default.resolve(rootPath, p); +}); +function _isCyclic(value, seen = /* @__PURE__ */ new Set()) { + if (typeof value !== "object" || value === null) return false; + for (const child of Object.values(value)) { + if (seen.has(child)) return true; + seen.add(child); + if (_isCyclic(child, seen)) return true; + seen.delete(child); + } + return false; +} + +// src/http/websocket.ts +var MessageEvent = class extends Event { + data; + constructor(type, init2) { + super(type); + this.data = init2.data; + } +}; +var CloseEvent = class extends Event { + code; + reason; + wasClean; + constructor(type, init2) { + super(type); + this.code = init2?.code ?? 1005; + this.reason = init2?.reason ?? ""; + this.wasClean = init2?.wasClean ?? false; + } +}; +var ErrorEvent = class extends Event { + error; + constructor(type, init2) { + super(type); + this.error = init2?.error ?? null; + } +}; +var kPair = Symbol("kPair"); +var kAccepted = Symbol("kAccepted"); +var kCoupled = Symbol("kCoupled"); +var kClosedOutgoing = Symbol("kClosedOutgoing"); +var kClosedIncoming = Symbol("kClosedIncoming"); +var kSend = Symbol("kSend"); +var kClose = Symbol("kClose"); +var kError = Symbol("kError"); +var WebSocket = class _WebSocket extends TypedEventTarget { + // The Workers runtime prefixes these constants with `READY_STATE_`, unlike + // those in the spec: https://websockets.spec.whatwg.org/#interface-definition + static READY_STATE_CONNECTING = 0; + static READY_STATE_OPEN = 1; + static READY_STATE_CLOSING = 2; + static READY_STATE_CLOSED = 3; + #dispatchQueue = []; + [kPair]; + [kAccepted] = false; + [kCoupled] = false; + [kClosedOutgoing] = false; + [kClosedIncoming] = false; + get readyState() { + if (this[kClosedOutgoing] && this[kClosedIncoming]) { + return _WebSocket.READY_STATE_CLOSED; + } else if (this[kClosedOutgoing] || this[kClosedIncoming]) { + return _WebSocket.READY_STATE_CLOSING; + } + return _WebSocket.READY_STATE_OPEN; + } + async #queuingDispatchToPair(event) { + const pair = this[kPair]; + (0, import_assert3.default)(pair !== void 0); + if (pair[kAccepted]) { + pair.dispatchEvent(event); + } else { + (0, import_assert3.default)(pair.#dispatchQueue !== void 0); + pair.#dispatchQueue.push(event); + } + } + accept() { + if (this[kCoupled]) { + throw new TypeError( + "Can't accept() WebSocket that was already used in a response." + ); + } + if (this[kAccepted]) return; + this[kAccepted] = true; + if (this.#dispatchQueue !== void 0) { + for (const event of this.#dispatchQueue) this.dispatchEvent(event); + this.#dispatchQueue = void 0; + } + } + send(message) { + if (!this[kAccepted]) { + throw new TypeError( + "You must call accept() on this WebSocket before sending messages." + ); + } + this[kSend](message); + } + [kSend](message) { + if (this[kClosedOutgoing]) { + throw new TypeError("Can't call WebSocket send() after close()."); + } + const event = new MessageEvent("message", { data: message }); + void this.#queuingDispatchToPair(event); + } + close(code, reason) { + if (code) { + const validCode = code >= 1e3 && code < 5e3 && code !== 1004 && code !== 1005 && code !== 1006 && code !== 1015; + if (!validCode) throw new TypeError("Invalid WebSocket close code."); + } + if (reason !== void 0 && code === void 0) { + throw new TypeError( + "If you specify a WebSocket close reason, you must also specify a code." + ); + } + if (!this[kAccepted]) { + throw new TypeError( + "You must call accept() on this WebSocket before sending messages." + ); + } + this[kClose](code, reason); + } + [kClose](code, reason) { + if (this[kClosedOutgoing]) throw new TypeError("WebSocket already closed"); + const pair = this[kPair]; + (0, import_assert3.default)(pair !== void 0); + this[kClosedOutgoing] = true; + pair[kClosedIncoming] = true; + const event = new CloseEvent("close", { code, reason }); + void this.#queuingDispatchToPair(event); + } + [kError](error) { + const event = new ErrorEvent("error", { error }); + void this.#queuingDispatchToPair(event); + } +}; +var WebSocketPair = function() { + if (!(this instanceof WebSocketPair)) { + throw new TypeError( + "Failed to construct 'WebSocketPair': Please use the 'new' operator, this object constructor cannot be called as a function." + ); + } + this[0] = new WebSocket(); + this[1] = new WebSocket(); + this[0][kPair] = this[1]; + this[1][kPair] = this[0]; +}; +async function coupleWebSocket(ws, pair) { + if (pair[kCoupled]) { + throw new TypeError( + "Can't return WebSocket that was already used in a response." + ); + } + if (pair[kAccepted]) { + throw new TypeError( + "Can't return WebSocket in a Response after calling accept()." + ); + } + ws.on("message", (message, isBinary) => { + if (!pair[kClosedOutgoing]) { + pair[kSend](isBinary ? viewToBuffer(message) : message.toString()); + } + }); + ws.on("close", (code, reason) => { + if (!pair[kClosedOutgoing]) { + pair[kClose](code, reason.toString()); + } + }); + ws.on("error", (error) => { + pair[kError](error); + }); + pair.addEventListener("message", (e) => { + ws.send(e.data); + }); + pair.addEventListener("close", (e) => { + if (e.code === 1005) { + ws.close(); + } else if (e.code === 1006) { + ws.terminate(); + } else { + ws.close(e.code, e.reason); + } + }); + if (ws.readyState === import_ws.default.CONNECTING) { + await (0, import_events.once)(ws, "open"); + } else if (ws.readyState >= import_ws.default.CLOSING) { + throw new TypeError("Incoming WebSocket connection already closed."); + } + pair.accept(); + pair[kCoupled] = true; +} + +// src/http/fetch.ts +var ignored = ["transfer-encoding", "connection", "keep-alive", "expect"]; +function headersFromIncomingRequest(req) { + const entries = Object.entries(req.headers).filter( + (pair) => { + const [name, value] = pair; + return !ignored.includes(name) && value !== void 0; + } + ); + return new undici.Headers(Object.fromEntries(entries)); +} +async function fetch4(input, init2) { + const requestInit = init2; + const request = new Request(input, requestInit); + if (request.method === "GET" && request.headers.get("upgrade") === "websocket") { + const url27 = new URL(request.url); + if (url27.protocol !== "http:" && url27.protocol !== "https:") { + throw new TypeError( + `Fetch API cannot load: ${url27.toString()}. +Make sure you're using http(s):// URLs for WebSocket requests via fetch.` + ); + } + url27.protocol = url27.protocol.replace("http", "ws"); + const headers = {}; + let protocols; + for (const [key, value] of request.headers.entries()) { + if (key.toLowerCase() === "sec-websocket-protocol") { + protocols = value.split(",").map((protocol) => protocol.trim()); + } else { + headers[key] = value; + } + } + let rejectUnauthorized; + if (requestInit.dispatcher instanceof DispatchFetchDispatcher) { + requestInit.dispatcher.addHeaders(headers, url27.pathname + url27.search); + rejectUnauthorized = { rejectUnauthorized: false }; + } + const ws = new import_ws2.default(url27, protocols, { + followRedirects: request.redirect === "follow", + headers, + ...rejectUnauthorized + }); + const responsePromise = new DeferredPromise(); + ws.once("upgrade", (req) => { + const headers2 = headersFromIncomingRequest(req); + const [worker, client] = Object.values(new WebSocketPair()); + const couplePromise = coupleWebSocket(ws, client); + const response2 = new Response2(null, { + status: 101, + webSocket: worker, + headers: headers2 + }); + responsePromise.resolve(couplePromise.then(() => response2)); + }); + ws.once("unexpected-response", (_, req) => { + const headers2 = headersFromIncomingRequest(req); + const response2 = new Response2(req, { + status: req.statusCode, + headers: headers2 + }); + responsePromise.resolve(response2); + }); + return responsePromise; + } + const response = await undici.fetch(request, { + dispatcher: requestInit?.dispatcher + }); + return new Response2(response.body, response); +} +function addHeader(headers, key, value) { + if (Array.isArray(headers)) headers.push(key, value); + else headers[key] = value; +} +var DispatchFetchDispatcher = class extends undici.Dispatcher { + /** + * @param globalDispatcher Dispatcher to use for all non-runtime requests + * (rejects unauthorised certificates) + * @param runtimeDispatcher Dispatcher to use for runtime requests + * (permits unauthorised certificates) + * @param actualRuntimeOrigin Origin to send all runtime requests to + * @param userRuntimeOrigin Origin to treat as runtime request + * (initial URL passed by user to `dispatchFetch()`) + * @param cfBlob `request.cf` blob override for runtime requests + */ + constructor(globalDispatcher, runtimeDispatcher, actualRuntimeOrigin, userRuntimeOrigin, cfBlob) { + super(); + this.globalDispatcher = globalDispatcher; + this.runtimeDispatcher = runtimeDispatcher; + this.actualRuntimeOrigin = actualRuntimeOrigin; + this.userRuntimeOrigin = userRuntimeOrigin; + if (cfBlob !== void 0) this.cfBlobJson = JSON.stringify(cfBlob); + } + cfBlobJson; + addHeaders(headers, path37) { + const originalURL = this.userRuntimeOrigin + path37; + addHeader(headers, CoreHeaders.ORIGINAL_URL, originalURL); + addHeader(headers, CoreHeaders.DISABLE_PRETTY_ERROR, "true"); + if (this.cfBlobJson !== void 0) { + addHeader(headers, CoreHeaders.CF_BLOB, this.cfBlobJson); + } + } + dispatch(options, handler) { + let origin = String(options.origin); + if (origin === this.userRuntimeOrigin) origin = this.actualRuntimeOrigin; + if (origin === this.actualRuntimeOrigin) { + options.origin = origin; + let path37 = options.path; + if (options.query !== void 0) { + const url27 = new URL(path37, "http://placeholder/"); + for (const [key, value] of Object.entries(options.query)) { + url27.searchParams.append(key, value); + } + path37 = url27.pathname + url27.search; + } + options.headers ??= {}; + this.addHeaders(options.headers, path37); + return this.runtimeDispatcher.dispatch(options, handler); + } else { + return this.globalDispatcher.dispatch(options, handler); + } + } + async close(callback) { + await Promise.all([ + this.globalDispatcher.close(), + this.runtimeDispatcher.close() + ]); + callback?.(); + } + async destroy(errCallback, callback) { + let err = null; + if (typeof errCallback === "function") callback = errCallback; + if (errCallback instanceof Error) err = errCallback; + await Promise.all([ + this.globalDispatcher.destroy(err), + this.runtimeDispatcher.destroy(err) + ]); + callback?.(); + } + get isMockActive() { + return this.globalDispatcher.isMockActive ?? false; + } +}; + +// src/http/server.ts +var import_promises2 = __toESM(require("fs/promises")); + +// src/http/cert.ts +var KEY = ` +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIC+umAaVUbEfPqGA9M7b5zAP7tN2eLT1bu8U8gpbaKbsoAoGCCqGSM49 +AwEHoUQDQgAEtrIEgzogjrUHIvB4qgjg/cT7blhWuLUfSUp6H62NCo21NrVWgPtC +mCWw+vbGTBwIr/9X1S4UL1/f3zDICC7YSA== +-----END EC PRIVATE KEY----- +`; +var CERT = ` +-----BEGIN CERTIFICATE----- +MIICcDCCAhegAwIBAgIUE97EcbEWw3YZMN/ucGBSzJ/5qA4wCgYIKoZIzj0EAwIw +VTELMAkGA1UEBhMCVVMxDjAMBgNVBAgMBVRleGFzMQ8wDQYDVQQHDAZBdXN0aW4x +EzARBgNVBAoMCkNsb3VkZmxhcmUxEDAOBgNVBAsMB1dvcmtlcnMwIBcNMjMwNjIy +MTg1ODQ3WhgPMjEyMzA1MjkxODU4NDdaMFUxCzAJBgNVBAYTAlVTMQ4wDAYDVQQI +DAVUZXhhczEPMA0GA1UEBwwGQXVzdGluMRMwEQYDVQQKDApDbG91ZGZsYXJlMRAw +DgYDVQQLDAdXb3JrZXJzMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEtrIEgzog +jrUHIvB4qgjg/cT7blhWuLUfSUp6H62NCo21NrVWgPtCmCWw+vbGTBwIr/9X1S4U +L1/f3zDICC7YSKOBwjCBvzAdBgNVHQ4EFgQUSXahTksi00c6KhUECHIY4FLW7Sow +HwYDVR0jBBgwFoAUSXahTksi00c6KhUECHIY4FLW7SowDwYDVR0TAQH/BAUwAwEB +/zAsBglghkgBhvhCAQ0EHxYdT3BlblNTTCBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUw +CwYDVR0PBAQDAgL0MDEGA1UdJQQqMCgGCCsGAQUFBwMBBggrBgEFBQcDAgYIKwYB +BQUHAwMGCCsGAQUFBwMIMAoGCCqGSM49BAMCA0cAMEQCIE2qnXbKTHQ8wtwI+9XR +h4ivDyz7w7iGxn3+ccmj/CQqAiApdX/Iz/jGRzi04xFlE4GoPVG/zaMi64ckmIpE +ez/dHA== +-----END CERTIFICATE----- +`; + +// src/http/server.ts +async function getEntrySocketHttpOptions(coreOpts) { + let privateKey = void 0; + let certificateChain = void 0; + if ((coreOpts.httpsKey || coreOpts.httpsKeyPath) && (coreOpts.httpsCert || coreOpts.httpsCertPath)) { + privateKey = await valueOrFile(coreOpts.httpsKey, coreOpts.httpsKeyPath); + certificateChain = await valueOrFile( + coreOpts.httpsCert, + coreOpts.httpsCertPath + ); + } else if (coreOpts.https) { + privateKey = KEY; + certificateChain = CERT; + } + if (privateKey && certificateChain) { + return { + https: { + tlsOptions: { + keypair: { + privateKey, + certificateChain + } + } + } + }; + } else { + return { http: {} }; + } +} +function valueOrFile(value, filePath) { + return value ?? (filePath && import_promises2.default.readFile(filePath, "utf8")); +} + +// src/http/helpers.ts +var import_os = require("os"); +function getAccessibleHosts(ipv4Only = false) { + const hosts = []; + Object.values((0, import_os.networkInterfaces)()).forEach((net3) => { + net3?.forEach(({ family, address }) => { + if (family === "IPv4" || family === 4) { + hosts.push(address); + } else if (!ipv4Only) { + hosts.push(address); + } + }); + }); + return hosts; +} + +// src/http/index.ts +var import_undici4 = require("undici"); + +// src/plugins/ai/index.ts +var import_node_assert3 = __toESM(require("node:assert")); +var import_zod5 = require("zod"); + +// src/plugins/shared/index.ts +var import_crypto = __toESM(require("crypto")); +var import_fs5 = require("fs"); +var import_promises3 = __toESM(require("fs/promises")); +var import_path8 = __toESM(require("path")); +var import_url6 = require("url"); +var import_zod4 = require("zod"); + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/shared/mixed-mode-client.worker.ts +var import_fs3 = __toESM(require("fs")); +var import_path6 = __toESM(require("path")); +var import_url3 = __toESM(require("url")); +var contents3; +function mixed_mode_client_worker_default() { + if (contents3 !== void 0) return contents3; + const filePath = import_path6.default.join(__dirname, "workers", "shared/mixed-mode-client.worker.js"); + contents3 = import_fs3.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url3.default.pathToFileURL(filePath); + return contents3; +} + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/shared/object-entry.worker.ts +var import_fs4 = __toESM(require("fs")); +var import_path7 = __toESM(require("path")); +var import_url4 = __toESM(require("url")); +var contents4; +function object_entry_worker_default() { + if (contents4 !== void 0) return contents4; + const filePath = import_path7.default.join(__dirname, "workers", "shared/object-entry.worker.js"); + contents4 = import_fs4.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url4.default.pathToFileURL(filePath); + return contents4; +} + +// src/plugins/shared/constants.ts +var SOCKET_ENTRY = "entry"; +var SOCKET_ENTRY_LOCAL = "entry:local"; +var SOCKET_DIRECT_PREFIX = "direct"; +function getDirectSocketName(workerIndex, entrypoint) { + return `${SOCKET_DIRECT_PREFIX}:${workerIndex}:${entrypoint}`; +} +var SERVICE_LOOPBACK = "loopback"; +var HOST_CAPNP_CONNECT = "miniflare-unsafe-internal-capnp-connect"; +var WORKER_BINDING_SERVICE_LOOPBACK = { + name: CoreBindings.SERVICE_LOOPBACK, + service: { name: SERVICE_LOOPBACK } +}; +var WORKER_BINDING_ENABLE_CONTROL_ENDPOINTS = { + name: SharedBindings.MAYBE_JSON_ENABLE_CONTROL_ENDPOINTS, + json: "true" +}; +var WORKER_BINDING_ENABLE_STICKY_BLOBS = { + name: SharedBindings.MAYBE_JSON_ENABLE_STICKY_BLOBS, + json: "true" +}; +var enableControlEndpoints = false; +function getMiniflareObjectBindings(unsafeStickyBlobs) { + const result = []; + if (enableControlEndpoints) { + result.push(WORKER_BINDING_ENABLE_CONTROL_ENDPOINTS); + } + if (unsafeStickyBlobs) { + result.push(WORKER_BINDING_ENABLE_STICKY_BLOBS); + } + return result; +} +function _enableControlEndpoints() { + enableControlEndpoints = true; +} +function objectEntryWorker(durableObjectNamespace, namespace) { + return { + compatibilityDate: "2023-07-24", + modules: [ + { name: "object-entry.worker.js", esModule: object_entry_worker_default() } + ], + bindings: [ + { name: SharedBindings.TEXT_NAMESPACE, text: namespace }, + { + name: SharedBindings.DURABLE_OBJECT_NAMESPACE_OBJECT, + durableObjectNamespace + } + ] + }; +} +function mixedModeClientWorker(mixedModeConnectionString, binding) { + return { + compatibilityDate: "2025-01-01", + modules: [ + { + name: "index.worker.js", + esModule: mixed_mode_client_worker_default() + } + ], + bindings: [ + { + name: "mixedModeConnectionString", + text: mixedModeConnectionString.href + }, + { + name: "binding", + text: binding + } + ] + }; +} +var kUnsafeEphemeralUniqueKey = Symbol.for( + "miniflare.kUnsafeEphemeralUniqueKey" +); + +// src/plugins/shared/routing.ts +var import_url5 = require("url"); +var RouterError = class extends MiniflareError { +}; +function routeSpecificity(url27) { + const hostParts = url27.host.split("."); + let hostScore = hostParts.length; + if (hostParts[0] === "*") hostScore -= 2; + const pathParts = url27.pathname.split("/"); + let pathScore = pathParts.length; + if (pathParts[pathParts.length - 1] === "*") pathScore -= 2; + return hostScore * 26 + pathScore; +} +function parseRoutes(allRoutes) { + const routes = []; + for (const [target, targetRoutes] of allRoutes) { + for (const route of targetRoutes) { + const hasProtocol = /^[a-z0-9+\-.]+:\/\//i.test(route); + let urlInput = route; + if (!hasProtocol) urlInput = `https://${urlInput}`; + const url27 = new import_url5.URL(urlInput); + const specificity = routeSpecificity(url27); + const protocol = hasProtocol ? url27.protocol : void 0; + const internationalisedAllowHostnamePrefix = url27.hostname.startsWith("xn--*"); + const allowHostnamePrefix = url27.hostname.startsWith("*") || internationalisedAllowHostnamePrefix; + const anyHostname = url27.hostname === "*"; + if (allowHostnamePrefix && !anyHostname) { + let hostname = url27.hostname; + if (internationalisedAllowHostnamePrefix) { + hostname = (0, import_url5.domainToUnicode)(hostname); + } + url27.hostname = hostname.substring(1); + } + const allowPathSuffix = url27.pathname.endsWith("*"); + if (allowPathSuffix) { + url27.pathname = url27.pathname.substring(0, url27.pathname.length - 1); + } + if (url27.search) { + throw new RouterError( + "ERR_QUERY_STRING", + `Route "${route}" for "${target}" contains a query string. This is not allowed.` + ); + } + if (url27.toString().includes("*") && !anyHostname) { + throw new RouterError( + "ERR_INFIX_WILDCARD", + `Route "${route}" for "${target}" contains an infix wildcard. This is not allowed.` + ); + } + routes.push({ + target, + route, + specificity, + protocol, + allowHostnamePrefix, + hostname: anyHostname ? "" : url27.hostname, + path: url27.pathname, + allowPathSuffix + }); + } + } + routes.sort((a, b) => { + if (a.specificity === b.specificity) { + return b.route.length - a.route.length; + } else { + return b.specificity - a.specificity; + } + }); + return routes; +} + +// src/plugins/shared/index.ts +var DEFAULT_PERSIST_ROOT = ".mf"; +var PersistenceSchema = import_zod4.z.union([import_zod4.z.boolean(), import_zod4.z.string().url(), PathSchema]).optional(); +var ProxyNodeBinding = class { + constructor(proxyOverrideHandler) { + this.proxyOverrideHandler = proxyOverrideHandler; + } +}; +function namespaceKeys(namespaces) { + if (Array.isArray(namespaces)) { + return namespaces; + } else if (namespaces !== void 0) { + return Object.keys(namespaces); + } else { + return []; + } +} +function namespaceEntries(namespaces) { + if (Array.isArray(namespaces)) { + return namespaces.map((bindingName) => [bindingName, { id: bindingName }]); + } else if (namespaces !== void 0) { + return Object.entries(namespaces).map(([key, value]) => { + if (typeof value === "string") { + return [key, { id: value }]; + } + return [ + key, + { + id: value.id, + mixedModeConnectionString: value.mixedModeConnectionString + } + ]; + }); + } else { + return []; + } +} +function maybeParseURL(url27) { + if (typeof url27 !== "string" || import_path8.default.isAbsolute(url27)) return; + try { + return new URL(url27); + } catch { + } +} +function getPersistPath(pluginName, tmpPath, persist) { + const memoryishPath = import_path8.default.join(tmpPath, pluginName); + if (persist === void 0 || persist === false) { + return memoryishPath; + } + const url27 = maybeParseURL(persist); + if (url27 !== void 0) { + if (url27.protocol === "memory:") { + return memoryishPath; + } else if (url27.protocol === "file:") { + return (0, import_url6.fileURLToPath)(url27); + } + throw new MiniflareCoreError( + "ERR_PERSIST_UNSUPPORTED", + `Unsupported "${url27.protocol}" persistence protocol for storage: ${url27.href}` + ); + } + return persist === true ? import_path8.default.join(DEFAULT_PERSIST_ROOT, pluginName) : persist; +} +function durableObjectNamespaceIdFromName(uniqueKey, name) { + const key = import_crypto.default.createHash("sha256").update(uniqueKey).digest(); + const nameHmac = import_crypto.default.createHmac("sha256", key).update(name).digest().subarray(0, 16); + const hmac = import_crypto.default.createHmac("sha256", key).update(nameHmac).digest().subarray(0, 16); + return Buffer.concat([nameHmac, hmac]).toString("hex"); +} +async function migrateDatabase(log, uniqueKey, persistPath, namespace) { + const sanitisedNamespace = sanitisePath(namespace); + const previousDir = import_path8.default.join(persistPath, sanitisedNamespace); + const previousPath = import_path8.default.join(previousDir, "db.sqlite"); + const previousWalPath = import_path8.default.join(previousDir, "db.sqlite-wal"); + if (!(0, import_fs5.existsSync)(previousPath)) return; + const id = durableObjectNamespaceIdFromName(uniqueKey, namespace); + const newDir = import_path8.default.join(persistPath, uniqueKey); + const newPath = import_path8.default.join(newDir, `${id}.sqlite`); + const newWalPath = import_path8.default.join(newDir, `${id}.sqlite-wal`); + if ((0, import_fs5.existsSync)(newPath)) { + log.debug( + `Not migrating ${previousPath} to ${newPath} as it already exists` + ); + return; + } + log.debug(`Migrating ${previousPath} to ${newPath}...`); + await import_promises3.default.mkdir(newDir, { recursive: true }); + try { + await import_promises3.default.copyFile(previousPath, newPath); + if ((0, import_fs5.existsSync)(previousWalPath)) { + await import_promises3.default.copyFile(previousWalPath, newWalPath); + } + await import_promises3.default.unlink(previousPath); + await import_promises3.default.unlink(previousWalPath); + } catch (e) { + log.warn(`Error migrating ${previousPath} to ${newPath}: ${e}`); + } +} + +// src/plugins/ai/index.ts +var AISchema = import_zod5.z.object({ + binding: import_zod5.z.string(), + mixedModeConnectionString: import_zod5.z.custom() +}); +var AIOptionsSchema = import_zod5.z.object({ + ai: AISchema.optional() +}); +var AI_PLUGIN_NAME = "ai"; +var AI_PLUGIN = { + options: AIOptionsSchema, + async getBindings(options) { + if (!options.ai) { + return []; + } + (0, import_node_assert3.default)( + options.ai.mixedModeConnectionString, + "Workers AI only supports Mixed Mode" + ); + return [ + { + name: options.ai.binding, + wrapped: { + moduleName: "cloudflare-internal:ai-api", + innerBindings: [ + { + name: "fetcher", + service: { name: `${AI_PLUGIN_NAME}:${options.ai.binding}` } + } + ] + } + } + ]; + }, + getNodeBindings(options) { + if (!options.ai) { + return {}; + } + return { + [options.ai.binding]: new ProxyNodeBinding() + }; + }, + async getServices({ options }) { + if (!options.ai) { + return []; + } + return [ + { + name: `${AI_PLUGIN_NAME}:${options.ai.binding}`, + worker: mixedModeClientWorker( + options.ai.mixedModeConnectionString, + options.ai.binding + ) + } + ]; + } +}; + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/analytics-engine/analytics-engine.worker.ts +var import_fs6 = __toESM(require("fs")); +var import_path9 = __toESM(require("path")); +var import_url7 = __toESM(require("url")); +var contents5; +function analytics_engine_worker_default() { + if (contents5 !== void 0) return contents5; + const filePath = import_path9.default.join(__dirname, "workers", "analytics-engine/analytics-engine.worker.js"); + contents5 = import_fs6.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url7.default.pathToFileURL(filePath); + return contents5; +} + +// src/plugins/analytics-engine/index.ts +var import_zod6 = require("zod"); +var AnalyticsEngineSchema = import_zod6.z.record( + import_zod6.z.object({ + dataset: import_zod6.z.string() + }) +); +var AnalyticsEngineSchemaOptionsSchema = import_zod6.z.object({ + analyticsEngineDatasets: AnalyticsEngineSchema.optional() +}); +var AnalyticsEngineSchemaSharedOptionsSchema = import_zod6.z.object({ + analyticsEngineDatasetsPersist: PersistenceSchema +}); +var ANALYTICS_ENGINE_PLUGIN_NAME = "analytics-engine"; +var ANALYTICS_ENGINE_PLUGIN = { + options: AnalyticsEngineSchemaOptionsSchema, + sharedOptions: AnalyticsEngineSchemaSharedOptionsSchema, + async getBindings(options) { + if (!options.analyticsEngineDatasets) { + return []; + } + const bindings = Object.entries( + options.analyticsEngineDatasets + ).map(([name, config]) => { + return { + name, + wrapped: { + moduleName: `${ANALYTICS_ENGINE_PLUGIN_NAME}:local-simulator`, + innerBindings: [ + { + name: "dataset", + json: JSON.stringify(config.dataset) + } + ] + } + }; + }); + return bindings; + }, + getNodeBindings(options) { + if (!options.analyticsEngineDatasets) { + return {}; + } + return Object.fromEntries( + Object.keys(options.analyticsEngineDatasets).map((name) => [ + name, + new ProxyNodeBinding() + ]) + ); + }, + async getServices({ options, workerIndex }) { + if (!options.analyticsEngineDatasets) { + return []; + } + const extensions = []; + if (workerIndex === 0) { + extensions.push({ + modules: [ + { + name: `${ANALYTICS_ENGINE_PLUGIN_NAME}:local-simulator`, + esModule: analytics_engine_worker_default(), + internal: true + } + ] + }); + } + return { + extensions, + services: [] + }; + } +}; + +// src/plugins/assets/index.ts +var import_node_crypto = __toESM(require("node:crypto")); +var import_promises7 = __toESM(require("node:fs/promises")); +var import_node_path3 = __toESM(require("node:path")); + +// ../workers-shared/utils/constants.ts +var HEADER_SIZE = 20; +var PATH_HASH_SIZE = 16; +var CONTENT_HASH_SIZE = 16; +var TAIL_SIZE = 8; +var PATH_HASH_OFFSET = 0; +var CONTENT_HASH_OFFSET = PATH_HASH_SIZE; +var ENTRY_SIZE = PATH_HASH_SIZE + CONTENT_HASH_SIZE + TAIL_SIZE; +var MAX_ASSET_COUNT = 2e4; +var MAX_ASSET_SIZE = 25 * 1024 * 1024; +var CF_ASSETS_IGNORE_FILENAME = ".assetsignore"; +var REDIRECTS_FILENAME = "_redirects"; +var HEADERS_FILENAME = "_headers"; + +// ../workers-shared/utils/types.ts +var import_zod7 = require("zod"); +var InternalConfigSchema = import_zod7.z.object({ + account_id: import_zod7.z.number().optional(), + script_id: import_zod7.z.number().optional(), + debug: import_zod7.z.boolean().optional() +}); +var RouterConfigSchema = import_zod7.z.object({ + invoke_user_worker_ahead_of_assets: import_zod7.z.boolean().optional(), + has_user_worker: import_zod7.z.boolean().optional(), + ...InternalConfigSchema.shape +}); +var MetadataStaticRedirectEntry = import_zod7.z.object({ + status: import_zod7.z.number(), + to: import_zod7.z.string(), + lineNumber: import_zod7.z.number() +}); +var MetadataRedirectEntry = import_zod7.z.object({ + status: import_zod7.z.number(), + to: import_zod7.z.string() +}); +var MetadataStaticRedirects = import_zod7.z.record(MetadataStaticRedirectEntry); +var MetadataRedirects = import_zod7.z.record(MetadataRedirectEntry); +var MetadataHeaderEntry = import_zod7.z.object({ + set: import_zod7.z.record(import_zod7.z.string()).optional(), + unset: import_zod7.z.array(import_zod7.z.string()).optional() +}); +var MetadataHeaders = import_zod7.z.record(MetadataHeaderEntry); +var RedirectsSchema = import_zod7.z.object({ + version: import_zod7.z.literal(1), + staticRules: MetadataStaticRedirects, + rules: MetadataRedirects +}).optional(); +var HeadersSchema = import_zod7.z.object({ + version: import_zod7.z.literal(2), + rules: MetadataHeaders +}).optional(); +var AssetConfigSchema = import_zod7.z.object({ + compatibility_date: import_zod7.z.string().optional(), + compatibility_flags: import_zod7.z.array(import_zod7.z.string()).optional(), + html_handling: import_zod7.z.enum([ + "auto-trailing-slash", + "force-trailing-slash", + "drop-trailing-slash", + "none" + ]).optional(), + not_found_handling: import_zod7.z.enum(["single-page-application", "404-page", "none"]).optional(), + redirects: RedirectsSchema, + headers: HeadersSchema, + ...InternalConfigSchema.shape +}); + +// ../workers-shared/utils/helpers.ts +var import_node_fs = require("node:fs"); +var import_node_path = require("node:path"); +var import_ignore = __toESM(require_ignore()); +var import_mime = __toESM(require_mime()); +var normalizeFilePath = (relativeFilepath) => { + if ((0, import_node_path.isAbsolute)(relativeFilepath)) { + throw new Error(`Expected relative path`); + } + return "/" + relativeFilepath.split(import_node_path.sep).join("/"); +}; +var getContentType = (absFilePath) => { + let contentType = (0, import_mime.getType)(absFilePath); + if (contentType && contentType.startsWith("text/") && !contentType.includes("charset")) { + contentType = `${contentType}; charset=utf-8`; + } + return contentType; +}; +function createPatternMatcher(patterns, exclude) { + if (patterns.length === 0) { + return (_filePath) => !exclude; + } else { + const ignorer = (0, import_ignore.default)().add(patterns); + return (filePath) => ignorer.test(filePath).ignored; + } +} +function thrownIsDoesNotExistError(thrown) { + return thrown instanceof Error && "code" in thrown && thrown.code === "ENOENT"; +} +function maybeGetFile(filePath) { + try { + return (0, import_node_fs.readFileSync)(filePath, "utf8"); + } catch (e) { + if (!thrownIsDoesNotExistError(e)) { + throw e; + } + } +} +async function createAssetsIgnoreFunction(dir) { + const cfAssetIgnorePath = (0, import_node_path.resolve)(dir, CF_ASSETS_IGNORE_FILENAME); + const ignorePatterns = [ + // Ignore the `.assetsignore` file and other metafiles by default. + // The ignore lib expects unix-style paths for its patterns + `/${CF_ASSETS_IGNORE_FILENAME}`, + `/${REDIRECTS_FILENAME}`, + `/${HEADERS_FILENAME}` + ]; + let assetsIgnoreFilePresent = false; + const assetsIgnore = maybeGetFile(cfAssetIgnorePath); + if (assetsIgnore !== void 0) { + assetsIgnoreFilePresent = true; + ignorePatterns.push(...assetsIgnore.split("\n")); + } + return { + assetsIgnoreFunction: createPatternMatcher(ignorePatterns, true), + assetsIgnoreFilePresent + }; +} + +// ../workers-shared/utils/configuration/constructConfiguration.ts +var import_node_path2 = require("node:path"); + +// ../workers-shared/utils/configuration/constants.ts +var REDIRECTS_VERSION = 1; +var HEADERS_VERSION = 2; +var PERMITTED_STATUS_CODES = /* @__PURE__ */ new Set([200, 301, 302, 303, 307, 308]); +var HEADER_SEPARATOR = ":"; +var MAX_LINE_LENGTH = 2e3; +var MAX_HEADER_RULES = 100; +var MAX_DYNAMIC_REDIRECT_RULES = 100; +var MAX_STATIC_REDIRECT_RULES = 2e3; +var UNSET_OPERATOR = "! "; +var SPLAT_REGEX = /\*/g; +var PLACEHOLDER_REGEX = /:[A-Za-z]\w*/g; + +// ../workers-shared/utils/configuration/constructConfiguration.ts +function constructRedirects({ + redirects, + redirectsFile, + logger +}) { + if (!redirects) { + return {}; + } + const num_valid = redirects.rules.length; + const num_invalid = redirects.invalid.length; + const redirectsRelativePath = redirectsFile ? (0, import_node_path2.relative)(process.cwd(), redirectsFile) : ""; + logger.log( + `\u2728 Parsed ${num_valid} valid redirect rule${num_valid === 1 ? "" : "s"}.` + ); + if (num_invalid > 0) { + let invalidRedirectRulesList = ``; + for (const { line, lineNumber, message } of redirects.invalid) { + invalidRedirectRulesList += `\u25B6\uFE0E ${message} +`; + if (line) { + invalidRedirectRulesList += ` at ${redirectsRelativePath}${lineNumber ? `:${lineNumber}` : ""} | ${line} + +`; + } + } + logger.warn( + `Found ${num_invalid} invalid redirect rule${num_invalid === 1 ? "" : "s"}: +${invalidRedirectRulesList}` + ); + } + if (num_valid === 0) { + return {}; + } + const staticRedirects = {}; + const dynamicRedirects = {}; + let canCreateStaticRule = true; + for (const rule of redirects.rules) { + if (!rule.from.match(SPLAT_REGEX) && !rule.from.match(PLACEHOLDER_REGEX)) { + if (canCreateStaticRule) { + staticRedirects[rule.from] = { + status: rule.status, + to: rule.to, + lineNumber: rule.lineNumber + }; + continue; + } else { + logger.info( + `The redirect rule ${rule.from} \u2192 ${rule.status} ${rule.to} could be made more performant by bringing it above any lines with splats or placeholders.` + ); + } + } + dynamicRedirects[rule.from] = { status: rule.status, to: rule.to }; + canCreateStaticRule = false; + } + return { + redirects: { + version: REDIRECTS_VERSION, + staticRules: staticRedirects, + rules: dynamicRedirects + } + }; +} +function constructHeaders({ + headers, + headersFile, + logger +}) { + if (!headers) { + return {}; + } + const num_valid = headers.rules.length; + const num_invalid = headers.invalid.length; + const headersRelativePath = headersFile ? (0, import_node_path2.relative)(process.cwd(), headersFile) : ""; + logger.log( + `\u2728 Parsed ${num_valid} valid header rule${num_valid === 1 ? "" : "s"}.` + ); + if (num_invalid > 0) { + let invalidHeaderRulesList = ``; + for (const { line, lineNumber, message } of headers.invalid) { + invalidHeaderRulesList += `\u25B6\uFE0E ${message} +`; + if (line) { + invalidHeaderRulesList += ` at ${headersRelativePath}${lineNumber ? `:${lineNumber}` : ""} | ${line} + +`; + } + } + logger.warn( + `Found ${num_invalid} invalid header rule${num_invalid === 1 ? "" : "s"}: +${invalidHeaderRulesList}` + ); + } + if (num_valid === 0) { + return {}; + } + const rules = {}; + for (const rule of headers.rules) { + const configuredRule = {}; + if (Object.keys(rule.headers).length) { + configuredRule.set = rule.headers; + } + if (rule.unsetHeaders.length) { + configuredRule.unset = rule.unsetHeaders; + } + rules[rule.path] = configuredRule; + } + return { + headers: { + version: HEADERS_VERSION, + rules + } + }; +} + +// ../workers-shared/utils/configuration/validateURL.ts +var extractPathname = (path37 = "/", includeSearch, includeHash) => { + if (!path37.startsWith("/")) { + path37 = `/${path37}`; + } + const url27 = new URL(`//${path37}`, "relative://"); + return `${url27.pathname}${includeSearch ? url27.search : ""}${includeHash ? url27.hash : ""}`; +}; +var URL_REGEX = /^https:\/\/+(?[^/]+)\/?(?.*)/; +var HOST_WITH_PORT_REGEX = /.*:\d+$/; +var PATH_REGEX = /^\//; +var validateUrl = (token, onlyRelative = false, disallowPorts = false, includeSearch = false, includeHash = false) => { + const host = URL_REGEX.exec(token); + if (host && host.groups && host.groups.host) { + if (onlyRelative) { + return [ + void 0, + `Only relative URLs are allowed. Skipping absolute URL ${token}.` + ]; + } + if (disallowPorts && host.groups.host.match(HOST_WITH_PORT_REGEX)) { + return [ + void 0, + `Specifying ports is not supported. Skipping absolute URL ${token}.` + ]; + } + return [ + `https://${host.groups.host}${extractPathname( + host.groups.path, + includeSearch, + includeHash + )}`, + void 0 + ]; + } else { + if (!token.startsWith("/") && onlyRelative) { + token = `/${token}`; + } + const path37 = PATH_REGEX.exec(token); + if (path37) { + try { + return [extractPathname(token, includeSearch, includeHash), void 0]; + } catch { + return [void 0, `Error parsing URL segment ${token}. Skipping.`]; + } + } + } + return [ + void 0, + onlyRelative ? "URLs should begin with a forward-slash." : 'URLs should either be relative (e.g. begin with a forward-slash), or use HTTPS (e.g. begin with "https://").' + ]; +}; +function urlHasHost(token) { + const host = URL_REGEX.exec(token); + return Boolean(host && host.groups && host.groups.host); +} + +// ../workers-shared/utils/configuration/parseHeaders.ts +var LINE_IS_PROBABLY_A_PATH = new RegExp(/^([^\s]+:\/\/|^\/)/); +function parseHeaders(input, { + maxRules = MAX_HEADER_RULES, + maxLineLength = MAX_LINE_LENGTH +} = {}) { + const lines = input.split("\n"); + const rules = []; + const invalid = []; + let rule = void 0; + for (let i = 0; i < lines.length; i++) { + const line = (lines[i] || "").trim(); + if (line.length === 0 || line.startsWith("#")) { + continue; + } + if (line.length > maxLineLength) { + invalid.push({ + message: `Ignoring line ${i + 1} as it exceeds the maximum allowed length of ${maxLineLength}.` + }); + continue; + } + if (LINE_IS_PROBABLY_A_PATH.test(line)) { + if (rules.length >= maxRules) { + invalid.push({ + message: `Maximum number of rules supported is ${maxRules}. Skipping remaining ${lines.length - i} lines of file.` + }); + break; + } + if (rule) { + if (isValidRule(rule)) { + rules.push({ + path: rule.path, + headers: rule.headers, + unsetHeaders: rule.unsetHeaders + }); + } else { + invalid.push({ + line: rule.line, + lineNumber: i + 1, + message: "No headers specified" + }); + } + } + const [path37, pathError] = validateUrl(line, false, true); + if (pathError) { + invalid.push({ + line, + lineNumber: i + 1, + message: pathError + }); + rule = void 0; + continue; + } + rule = { + path: path37, + line, + headers: {}, + unsetHeaders: [] + }; + continue; + } + if (!line.includes(HEADER_SEPARATOR)) { + if (!rule) { + invalid.push({ + line, + lineNumber: i + 1, + message: "Expected a path beginning with at least one forward-slash" + }); + } else { + if (line.trim().startsWith(UNSET_OPERATOR)) { + rule.unsetHeaders.push(line.trim().replace(UNSET_OPERATOR, "")); + } else { + invalid.push({ + line, + lineNumber: i + 1, + message: "Expected a colon-separated header pair (e.g. name: value)" + }); + } + } + continue; + } + const [rawName, ...rawValue] = line.split(HEADER_SEPARATOR); + const name = (rawName || "").trim().toLowerCase(); + if (name.includes(" ")) { + invalid.push({ + line, + lineNumber: i + 1, + message: "Header name cannot include spaces" + }); + continue; + } + const value = rawValue.join(HEADER_SEPARATOR).trim(); + if (name === "") { + invalid.push({ + line, + lineNumber: i + 1, + message: "No header name specified" + }); + continue; + } + if (value === "") { + invalid.push({ + line, + lineNumber: i + 1, + message: "No header value specified" + }); + continue; + } + if (!rule) { + invalid.push({ + line, + lineNumber: i + 1, + message: `Path should come before header (${name}: ${value})` + }); + continue; + } + const existingValues = rule.headers[name]; + rule.headers[name] = existingValues ? `${existingValues}, ${value}` : value; + } + if (rule) { + if (isValidRule(rule)) { + rules.push({ + path: rule.path, + headers: rule.headers, + unsetHeaders: rule.unsetHeaders + }); + } else { + invalid.push({ line: rule.line, message: "No headers specified" }); + } + } + return { + rules, + invalid + }; +} +function isValidRule(rule) { + return Object.keys(rule.headers).length > 0 || rule.unsetHeaders.length > 0; +} + +// ../workers-shared/utils/configuration/parseRedirects.ts +function parseRedirects(input, { + maxStaticRules = MAX_STATIC_REDIRECT_RULES, + maxDynamicRules = MAX_DYNAMIC_REDIRECT_RULES, + maxLineLength = MAX_LINE_LENGTH +} = {}) { + const lines = input.split("\n"); + const rules = []; + const seen_paths = /* @__PURE__ */ new Set(); + const invalid = []; + let staticRules = 0; + let dynamicRules = 0; + let canCreateStaticRule = true; + for (let i = 0; i < lines.length; i++) { + const line = (lines[i] || "").trim(); + if (line.length === 0 || line.startsWith("#")) { + continue; + } + if (line.length > maxLineLength) { + invalid.push({ + message: `Ignoring line ${i + 1} as it exceeds the maximum allowed length of ${maxLineLength}.` + }); + continue; + } + const tokens = line.split(/\s+/); + if (tokens.length < 2 || tokens.length > 3) { + invalid.push({ + line, + lineNumber: i + 1, + message: `Expected exactly 2 or 3 whitespace-separated tokens. Got ${tokens.length}.` + }); + continue; + } + const [str_from, str_to, str_status = "302"] = tokens; + const fromResult = validateUrl(str_from, true, true, false, false); + if (fromResult[0] === void 0) { + invalid.push({ + line, + lineNumber: i + 1, + message: fromResult[1] + }); + continue; + } + const from = fromResult[0]; + if (canCreateStaticRule && !from.match(SPLAT_REGEX) && !from.match(PLACEHOLDER_REGEX)) { + staticRules += 1; + if (staticRules > maxStaticRules) { + invalid.push({ + message: `Maximum number of static rules supported is ${maxStaticRules}. Skipping line.` + }); + continue; + } + } else { + dynamicRules += 1; + canCreateStaticRule = false; + if (dynamicRules > maxDynamicRules) { + invalid.push({ + message: `Maximum number of dynamic rules supported is ${maxDynamicRules}. Skipping remaining ${lines.length - i} lines of file.` + }); + break; + } + } + const toResult = validateUrl(str_to, false, false, true, true); + if (toResult[0] === void 0) { + invalid.push({ + line, + lineNumber: i + 1, + message: toResult[1] + }); + continue; + } + const to = toResult[0]; + const status = Number(str_status); + if (isNaN(status) || !PERMITTED_STATUS_CODES.has(status)) { + invalid.push({ + line, + lineNumber: i + 1, + message: `Valid status codes are 200, 301, 302 (default), 303, 307, or 308. Got ${str_status}.` + }); + continue; + } + if (/\/\*?$/.test(from) && /\/index(.html)?$/.test(to) && !urlHasHost(to)) { + invalid.push({ + line, + lineNumber: i + 1, + message: "Infinite loop detected in this rule and has been ignored. This will cause a redirect to strip `.html` or `/index` and end up triggering this rule again. Please fix or remove this rule to silence this warning." + }); + continue; + } + if (seen_paths.has(from)) { + invalid.push({ + line, + lineNumber: i + 1, + message: `Ignoring duplicate rule for path ${from}.` + }); + continue; + } + seen_paths.add(from); + if (status === 200) { + if (urlHasHost(to)) { + invalid.push({ + line, + lineNumber: i + 1, + message: `Proxy (200) redirects can only point to relative paths. Got ${to}` + }); + continue; + } + } + rules.push({ from, to, status, lineNumber: i + 1 }); + } + return { + rules, + invalid + }; +} + +// ../../node_modules/.pnpm/pretty-bytes@6.1.1/node_modules/pretty-bytes/index.js +var BYTE_UNITS = [ + "B", + "kB", + "MB", + "GB", + "TB", + "PB", + "EB", + "ZB", + "YB" +]; +var BIBYTE_UNITS = [ + "B", + "KiB", + "MiB", + "GiB", + "TiB", + "PiB", + "EiB", + "ZiB", + "YiB" +]; +var BIT_UNITS = [ + "b", + "kbit", + "Mbit", + "Gbit", + "Tbit", + "Pbit", + "Ebit", + "Zbit", + "Ybit" +]; +var BIBIT_UNITS = [ + "b", + "kibit", + "Mibit", + "Gibit", + "Tibit", + "Pibit", + "Eibit", + "Zibit", + "Yibit" +]; +var toLocaleString = (number, locale, options) => { + let result = number; + if (typeof locale === "string" || Array.isArray(locale)) { + result = number.toLocaleString(locale, options); + } else if (locale === true || options !== void 0) { + result = number.toLocaleString(void 0, options); + } + return result; +}; +function prettyBytes(number, options) { + if (!Number.isFinite(number)) { + throw new TypeError(`Expected a finite number, got ${typeof number}: ${number}`); + } + options = { + bits: false, + binary: false, + space: true, + ...options + }; + const UNITS = options.bits ? options.binary ? BIBIT_UNITS : BIT_UNITS : options.binary ? BIBYTE_UNITS : BYTE_UNITS; + const separator = options.space ? " " : ""; + if (options.signed && number === 0) { + return ` 0${separator}${UNITS[0]}`; + } + const isNegative = number < 0; + const prefix = isNegative ? "-" : options.signed ? "+" : ""; + if (isNegative) { + number = -number; + } + let localeOptions; + if (options.minimumFractionDigits !== void 0) { + localeOptions = { minimumFractionDigits: options.minimumFractionDigits }; + } + if (options.maximumFractionDigits !== void 0) { + localeOptions = { maximumFractionDigits: options.maximumFractionDigits, ...localeOptions }; + } + if (number < 1) { + const numberString2 = toLocaleString(number, options.locale, localeOptions); + return prefix + numberString2 + separator + UNITS[0]; + } + const exponent = Math.min(Math.floor(options.binary ? Math.log(number) / Math.log(1024) : Math.log10(number) / 3), UNITS.length - 1); + number /= (options.binary ? 1024 : 1e3) ** exponent; + if (!localeOptions) { + number = number.toPrecision(3); + } + const numberString = toLocaleString(Number(number), options.locale, localeOptions); + const unit = UNITS[exponent]; + return prefix + numberString + separator + unit; +} + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/assets/assets.worker.ts +var import_fs7 = __toESM(require("fs")); +var import_path10 = __toESM(require("path")); +var import_url8 = __toESM(require("url")); +var contents6; +function assets_worker_default() { + if (contents6 !== void 0) return contents6; + const filePath = import_path10.default.join(__dirname, "workers", "assets/assets.worker.js"); + contents6 = import_fs7.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url8.default.pathToFileURL(filePath); + return contents6; +} + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/assets/assets-kv.worker.ts +var import_fs8 = __toESM(require("fs")); +var import_path11 = __toESM(require("path")); +var import_url9 = __toESM(require("url")); +var contents7; +function assets_kv_worker_default() { + if (contents7 !== void 0) return contents7; + const filePath = import_path11.default.join(__dirname, "workers", "assets/assets-kv.worker.js"); + contents7 = import_fs8.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url9.default.pathToFileURL(filePath); + return contents7; +} + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/assets/router.worker.ts +var import_fs9 = __toESM(require("fs")); +var import_path12 = __toESM(require("path")); +var import_url10 = __toESM(require("url")); +var contents8; +function router_worker_default() { + if (contents8 !== void 0) return contents8; + const filePath = import_path12.default.join(__dirname, "workers", "assets/router.worker.js"); + contents8 = import_fs9.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url10.default.pathToFileURL(filePath); + return contents8; +} + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/assets/rpc-proxy.worker.ts +var import_fs10 = __toESM(require("fs")); +var import_path13 = __toESM(require("path")); +var import_url11 = __toESM(require("url")); +var contents9; +function rpc_proxy_worker_default() { + if (contents9 !== void 0) return contents9; + const filePath = import_path13.default.join(__dirname, "workers", "assets/rpc-proxy.worker.js"); + contents9 = import_fs10.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url11.default.pathToFileURL(filePath); + return contents9; +} + +// src/plugins/core/index.ts +var import_assert9 = __toESM(require("assert")); +var import_fs18 = require("fs"); +var import_promises6 = __toESM(require("fs/promises")); +var import_path21 = __toESM(require("path")); +var import_stream2 = require("stream"); +var import_tls = __toESM(require("tls")); +var import_util3 = require("util"); +var import_undici7 = require("undici"); + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/core/entry.worker.ts +var import_fs11 = __toESM(require("fs")); +var import_path14 = __toESM(require("path")); +var import_url12 = __toESM(require("url")); +var contents10; +function entry_worker_default() { + if (contents10 !== void 0) return contents10; + const filePath = import_path14.default.join(__dirname, "workers", "core/entry.worker.js"); + contents10 = import_fs11.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url12.default.pathToFileURL(filePath); + return contents10; +} + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/core/strip-cf-connecting-ip.worker.ts +var import_fs12 = __toESM(require("fs")); +var import_path15 = __toESM(require("path")); +var import_url13 = __toESM(require("url")); +var contents11; +function strip_cf_connecting_ip_worker_default() { + if (contents11 !== void 0) return contents11; + const filePath = import_path15.default.join(__dirname, "workers", "core/strip-cf-connecting-ip.worker.js"); + contents11 = import_fs12.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url13.default.pathToFileURL(filePath); + return contents11; +} + +// src/plugins/core/index.ts +var import_zod14 = require("zod"); + +// src/runtime/index.ts +var import_assert4 = __toESM(require("assert")); +var import_child_process = __toESM(require("child_process")); +var import_events2 = require("events"); +var import_readline = __toESM(require("readline")); +var import_stream = require("stream"); +var import_workerd2 = __toESM(require("workerd")); +var import_zod8 = require("zod"); + +// ../../node_modules/.pnpm/capnp-es@0.0.7_typescript@5.7.3/node_modules/capnp-es/dist/shared/capnp-es.DAoyiaGr.mjs +var ListElementSize = /* @__PURE__ */ ((ListElementSize2) => { + ListElementSize2[ListElementSize2["VOID"] = 0] = "VOID"; + ListElementSize2[ListElementSize2["BIT"] = 1] = "BIT"; + ListElementSize2[ListElementSize2["BYTE"] = 2] = "BYTE"; + ListElementSize2[ListElementSize2["BYTE_2"] = 3] = "BYTE_2"; + ListElementSize2[ListElementSize2["BYTE_4"] = 4] = "BYTE_4"; + ListElementSize2[ListElementSize2["BYTE_8"] = 5] = "BYTE_8"; + ListElementSize2[ListElementSize2["POINTER"] = 6] = "POINTER"; + ListElementSize2[ListElementSize2["COMPOSITE"] = 7] = "COMPOSITE"; + return ListElementSize2; +})(ListElementSize || {}); +var tmpWord = new DataView(new ArrayBuffer(8)); +new Uint16Array(tmpWord.buffer)[0] = 258; +var DEFAULT_BUFFER_SIZE = 4096; +var DEFAULT_TRAVERSE_LIMIT = 64 << 20; +var LIST_SIZE_MASK = 7; +var MAX_BUFFER_DUMP_BYTES = 8192; +var MAX_INT32 = 2147483647; +var MAX_UINT32 = 4294967295; +var MIN_SINGLE_SEGMENT_GROWTH = 4096; +var NATIVE_LITTLE_ENDIAN = tmpWord.getUint8(0) === 2; +var PACK_SPAN_THRESHOLD = 2; +var POINTER_DOUBLE_FAR_MASK = 4; +var POINTER_TYPE_MASK = 3; +var MAX_DEPTH = MAX_INT32; +var MAX_SEGMENT_LENGTH = MAX_UINT32; +var INVARIANT_UNREACHABLE_CODE = "CAPNP-TS000 Unreachable code detected."; +function assertNever(n) { + throw new Error(INVARIANT_UNREACHABLE_CODE + ` (never block hit with: ${n})`); +} +var MSG_INVALID_FRAME_HEADER = "CAPNP-TS001 Attempted to parse an invalid message frame header; are you sure this is a Cap'n Proto message?"; +var MSG_PACK_NOT_WORD_ALIGNED = "CAPNP-TS003 Attempted to pack a message that was not word-aligned."; +var MSG_SEGMENT_OUT_OF_BOUNDS = "CAPNP-TS004 Segment ID %X is out of bounds for message %s."; +var MSG_SEGMENT_TOO_SMALL = "CAPNP-TS005 First segment must have at least enough room to hold the root pointer (8 bytes)."; +var PTR_ADOPT_WRONG_MESSAGE = "CAPNP-TS008 Attempted to adopt %s into a pointer in a different message %s."; +var PTR_ALREADY_ADOPTED = "CAPNP-TS009 Attempted to adopt %s more than once."; +var PTR_COMPOSITE_SIZE_UNDEFINED = "CAPNP-TS010 Attempted to set a composite list without providing a composite element size."; +var PTR_DEPTH_LIMIT_EXCEEDED = "CAPNP-TS011 Nesting depth limit exceeded for %s."; +var PTR_INIT_COMPOSITE_STRUCT = "CAPNP-TS013 Attempted to initialize a struct member from a composite list (%s)."; +var PTR_INVALID_FAR_TARGET = "CAPNP-TS015 Target of a far pointer (%s) is another far pointer."; +var PTR_INVALID_LIST_SIZE = "CAPNP-TS016 Invalid list element size: %x."; +var PTR_INVALID_POINTER_TYPE = "CAPNP-TS017 Invalid pointer type: %x."; +var PTR_INVALID_UNION_ACCESS = "CAPNP-TS018 Attempted to access getter on %s for union field %s that is not currently set (wanted: %d, found: %d)."; +var PTR_OFFSET_OUT_OF_BOUNDS = "CAPNP-TS019 Pointer offset %a is out of bounds for underlying buffer."; +var PTR_STRUCT_DATA_OUT_OF_BOUNDS = "CAPNP-TS020 Attempted to access out-of-bounds struct data (struct: %s, %d bytes at %a, data words: %d)."; +var PTR_STRUCT_POINTER_OUT_OF_BOUNDS = "CAPNP-TS021 Attempted to access out-of-bounds struct pointer (%s, index: %d, length: %d)."; +var PTR_TRAVERSAL_LIMIT_EXCEEDED = "CAPNP-TS022 Traversal limit exceeded! Slow down! %s"; +var PTR_WRONG_LIST_TYPE = "CAPNP-TS023 Cannot convert %s to a %s list."; +var PTR_WRONG_POINTER_TYPE = "CAPNP-TS024 Attempted to convert pointer %s to a %s type."; +var SEG_GET_NON_ZERO_SINGLE = "CAPNP-TS035 Attempted to get a segment other than 0 (%d) from a single segment arena."; +var SEG_ID_OUT_OF_BOUNDS = "CAPNP-TS036 Attempted to get an out-of-bounds segment (%d)."; +var SEG_NOT_WORD_ALIGNED = "CAPNP-TS037 Segment buffer length %d is not a multiple of 8."; +var SEG_REPLACEMENT_BUFFER_TOO_SMALL = "CAPNP-TS038 Attempted to replace a segment buffer with one that is smaller than the allocated space."; +var SEG_SIZE_OVERFLOW = `CAPNP-TS039 Requested size %x exceeds maximum value (${MAX_SEGMENT_LENGTH}).`; +var TYPE_COMPOSITE_SIZE_UNDEFINED = "CAPNP-TS040 Must provide a composite element size for composite list pointers."; +var LIST_NO_MUTABLE = "CAPNP-TS045: Cannot call mutative methods on an immutable list."; +var LIST_NO_SEARCH = "CAPNP-TS046: Search is not supported for list."; +var RPC_NULL_CLIENT = "CAPNP-TS100 Call on null client."; +function bufferToHex(buffer) { + const a = new Uint8Array(buffer); + const h = []; + for (let i = 0; i < a.byteLength; i++) { + h.push(pad(a[i].toString(16), 2)); + } + return `[${h.join(" ")}]`; +} +function dumpBuffer(buffer) { + const b = buffer instanceof ArrayBuffer ? new Uint8Array(buffer) : new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); + const byteLength = Math.min(b.byteLength, MAX_BUFFER_DUMP_BYTES); + let r = format("\n=== buffer[%d] ===", byteLength); + for (let j = 0; j < byteLength; j += 16) { + r += ` +${pad(j.toString(16), 8)}: `; + let s = ""; + let k; + for (k = 0; k < 16 && j + k < b.byteLength; k++) { + const v = b[j + k]; + r += `${pad(v.toString(16), 2)} `; + s += v > 31 && v < 255 ? String.fromCharCode(v) : "\xB7"; + if (k === 7) r += " "; + } + r += `${repeat((17 - k) * 3, " ")}${s}`; + } + r += "\n"; + if (byteLength !== b.byteLength) { + r += format("=== (truncated %d bytes) ===\n", b.byteLength - byteLength); + } + return r; +} +function format(s, ...args) { + const n = s.length; + let arg; + let argIndex = 0; + let c; + let escaped2 = false; + let i = 0; + let leadingZero = false; + let precision; + let result = ""; + function nextArg() { + return args[argIndex++]; + } + function slurpNumber() { + let digits = ""; + while (/\d/.test(s[i])) { + digits += s[i++]; + c = s[i]; + } + return digits.length > 0 ? Number.parseInt(digits, 10) : null; + } + for (; i < n; ++i) { + c = s[i]; + if (escaped2) { + escaped2 = false; + if (c === ".") { + leadingZero = false; + c = s[++i]; + } else if (c === "0" && s[i + 1] === ".") { + leadingZero = true; + i += 2; + c = s[i]; + } else { + leadingZero = true; + } + precision = slurpNumber(); + switch (c) { + case "a": { + result += "0x" + pad(Number.parseInt(String(nextArg()), 10).toString(16), 8); + break; + } + case "b": { + result += Number.parseInt(String(nextArg()), 10).toString(2); + break; + } + case "c": { + arg = nextArg(); + result += typeof arg === "string" || arg instanceof String ? arg : String.fromCharCode(Number.parseInt(String(arg), 10)); + break; + } + case "d": { + result += Number.parseInt(String(nextArg()), 10); + break; + } + case "f": { + const tmp = Number.parseFloat(String(nextArg())).toFixed( + precision || 6 + ); + result += leadingZero ? tmp : tmp.replace(/^0/, ""); + break; + } + case "j": { + result += JSON.stringify(nextArg()); + break; + } + case "o": { + result += "0" + Number.parseInt(String(nextArg()), 10).toString(8); + break; + } + case "s": { + result += nextArg(); + break; + } + case "x": { + result += "0x" + Number.parseInt(String(nextArg()), 10).toString(16); + break; + } + case "X": { + result += "0x" + Number.parseInt(String(nextArg()), 10).toString(16).toUpperCase(); + break; + } + default: { + result += c; + break; + } + } + } else if (c === "%") { + escaped2 = true; + } else { + result += c; + } + } + return result; +} +function pad(v, width, pad2 = "0") { + return v.length >= width ? v : Array.from({ length: width - v.length + 1 }).join(pad2) + v; +} +function padToWord$1(size) { + return size + 7 & -8; +} +function repeat(times, str) { + let out = ""; + let n = times; + let s = str; + if (n < 1 || n > Number.MAX_VALUE) return out; + do { + if (n % 2) out += s; + n = Math.floor(n / 2); + if (n) s += s; + } while (n); + return out; +} +var ObjectSize = class { + /** The number of bytes required for the data section. */ + dataByteLength; + /** The number of pointers in the object. */ + pointerLength; + constructor(dataByteLength, pointerCount) { + this.dataByteLength = dataByteLength; + this.pointerLength = pointerCount; + } + toString() { + return format( + "ObjectSize_dw:%d,pc:%d", + getDataWordLength(this), + this.pointerLength + ); + } +}; +function getByteLength(o) { + return o.dataByteLength + o.pointerLength * 8; +} +function getDataWordLength(o) { + return o.dataByteLength / 8; +} +function getWordLength(o) { + return o.dataByteLength / 8 + o.pointerLength; +} +function padToWord(o) { + return new ObjectSize(padToWord$1(o.dataByteLength), o.pointerLength); +} +var Orphan = class { + /** If this member is not present then the orphan has already been adopted, or something went very wrong. */ + _capnp; + byteOffset; + segment; + constructor(src) { + const c = getContent(src); + this.segment = c.segment; + this.byteOffset = c.byteOffset; + this._capnp = {}; + this._capnp.type = getTargetPointerType(src); + switch (this._capnp.type) { + case PointerType.STRUCT: { + this._capnp.size = getTargetStructSize(src); + break; + } + case PointerType.LIST: { + this._capnp.length = getTargetListLength(src); + this._capnp.elementSize = getTargetListElementSize(src); + if (this._capnp.elementSize === ListElementSize.COMPOSITE) { + this._capnp.size = getTargetCompositeListSize(src); + } + break; + } + case PointerType.OTHER: { + this._capnp.capId = getCapabilityId(src); + break; + } + default: { + throw new Error(PTR_INVALID_POINTER_TYPE); + } + } + erasePointer(src); + } + /** + * Adopt (move) this orphan into the target pointer location. This will allocate far pointers in `dst` as needed. + * + * @param {T} dst The destination pointer. + * @returns {void} + */ + _moveTo(dst) { + if (this._capnp === void 0) { + throw new Error(format(PTR_ALREADY_ADOPTED, this)); + } + if (this.segment.message !== dst.segment.message) { + throw new Error(format(PTR_ADOPT_WRONG_MESSAGE, this, dst)); + } + erase(dst); + const res = initPointer(this.segment, this.byteOffset, dst); + switch (this._capnp.type) { + case PointerType.STRUCT: { + setStructPointer(res.offsetWords, this._capnp.size, res.pointer); + break; + } + case PointerType.LIST: { + let offsetWords = res.offsetWords; + if (this._capnp.elementSize === ListElementSize.COMPOSITE) { + offsetWords--; + } + setListPointer( + offsetWords, + this._capnp.elementSize, + this._capnp.length, + res.pointer, + this._capnp.size + ); + break; + } + case PointerType.OTHER: { + setInterfacePointer(this._capnp.capId, res.pointer); + break; + } + /* istanbul ignore next */ + default: { + throw new Error(PTR_INVALID_POINTER_TYPE); + } + } + this._capnp = void 0; + } + dispose() { + if (this._capnp === void 0) { + return; + } + switch (this._capnp.type) { + case PointerType.STRUCT: { + this.segment.fillZeroWords( + this.byteOffset, + getWordLength(this._capnp.size) + ); + break; + } + case PointerType.LIST: { + const byteLength = getListByteLength( + this._capnp.elementSize, + this._capnp.length, + this._capnp.size + ); + this.segment.fillZeroWords(this.byteOffset, byteLength); + break; + } + } + this._capnp = void 0; + } + [Symbol.for("nodejs.util.inspect.custom")]() { + return format( + "Orphan_%d@%a,type:%s", + this.segment.id, + this.byteOffset, + this._capnp && this._capnp.type + ); + } +}; +function adopt(src, p) { + src._moveTo(p); +} +function disown(p) { + return new Orphan(p); +} +function dump(p) { + return bufferToHex(p.segment.buffer.slice(p.byteOffset, p.byteOffset + 8)); +} +function getListByteLength(elementSize, length, compositeSize) { + switch (elementSize) { + case ListElementSize.BIT: { + return padToWord$1(length + 7 >>> 3); + } + case ListElementSize.BYTE: + case ListElementSize.BYTE_2: + case ListElementSize.BYTE_4: + case ListElementSize.BYTE_8: + case ListElementSize.POINTER: + case ListElementSize.VOID: { + return padToWord$1(getListElementByteLength(elementSize) * length); + } + /* istanbul ignore next */ + case ListElementSize.COMPOSITE: { + if (compositeSize === void 0) { + throw new Error(format(PTR_INVALID_LIST_SIZE, Number.NaN)); + } + return length * padToWord$1(getByteLength(compositeSize)); + } + /* istanbul ignore next */ + default: { + throw new Error(PTR_INVALID_LIST_SIZE); + } + } +} +function getListElementByteLength(elementSize) { + switch (elementSize) { + /* istanbul ignore next */ + case ListElementSize.BIT: { + return Number.NaN; + } + case ListElementSize.BYTE: { + return 1; + } + case ListElementSize.BYTE_2: { + return 2; + } + case ListElementSize.BYTE_4: { + return 4; + } + case ListElementSize.BYTE_8: + case ListElementSize.POINTER: { + return 8; + } + /* istanbul ignore next */ + case ListElementSize.COMPOSITE: { + return Number.NaN; + } + /* istanbul ignore next */ + case ListElementSize.VOID: { + return 0; + } + /* istanbul ignore next */ + default: { + throw new Error(format(PTR_INVALID_LIST_SIZE, elementSize)); + } + } +} +function add(offset, p) { + return new Pointer(p.segment, p.byteOffset + offset, p._capnp.depthLimit); +} +function copyFrom(src, p) { + if (p.segment === src.segment && p.byteOffset === src.byteOffset) { + return; + } + erase(p); + if (isNull(src)) return; + switch (getTargetPointerType(src)) { + case PointerType.STRUCT: { + copyFromStruct(src, p); + break; + } + case PointerType.LIST: { + copyFromList(src, p); + break; + } + case PointerType.OTHER: { + copyFromInterface(src, p); + break; + } + /* istanbul ignore next */ + default: { + throw new Error( + format(PTR_INVALID_POINTER_TYPE, getTargetPointerType(p)) + ); + } + } +} +function erase(p) { + if (isNull(p)) return; + let c; + switch (getTargetPointerType(p)) { + case PointerType.STRUCT: { + const size = getTargetStructSize(p); + c = getContent(p); + c.segment.fillZeroWords(c.byteOffset, size.dataByteLength / 8); + for (let i = 0; i < size.pointerLength; i++) { + erase(add(i * 8, c)); + } + break; + } + case PointerType.LIST: { + const elementSize = getTargetListElementSize(p); + const length = getTargetListLength(p); + let contentWords = padToWord$1( + length * getListElementByteLength(elementSize) + ); + c = getContent(p); + if (elementSize === ListElementSize.POINTER) { + for (let i = 0; i < length; i++) { + erase( + new Pointer( + c.segment, + c.byteOffset + i * 8, + p._capnp.depthLimit - 1 + ) + ); + } + break; + } else if (elementSize === ListElementSize.COMPOSITE) { + const tag = add(-8, c); + const compositeSize = getStructSize(tag); + const compositeByteLength = getByteLength(compositeSize); + contentWords = getOffsetWords(tag); + c.segment.setWordZero(c.byteOffset - 8); + for (let i = 0; i < length; i++) { + for (let j = 0; j < compositeSize.pointerLength; j++) { + erase( + new Pointer( + c.segment, + c.byteOffset + i * compositeByteLength + j * 8, + p._capnp.depthLimit - 1 + ) + ); + } + } + } + c.segment.fillZeroWords(c.byteOffset, contentWords); + break; + } + case PointerType.OTHER: { + break; + } + default: { + throw new Error( + format(PTR_INVALID_POINTER_TYPE, getTargetPointerType(p)) + ); + } + } + erasePointer(p); +} +function erasePointer(p) { + if (getPointerType(p) === PointerType.FAR) { + const landingPad = followFar(p); + if (isDoubleFar(p)) { + landingPad.segment.setWordZero(landingPad.byteOffset + 8); + } + landingPad.segment.setWordZero(landingPad.byteOffset); + } + p.segment.setWordZero(p.byteOffset); +} +function followFar(p) { + const targetSegment = p.segment.message.getSegment( + p.segment.getUint32(p.byteOffset + 4) + ); + const targetWordOffset = p.segment.getUint32(p.byteOffset) >>> 3; + return new Pointer( + targetSegment, + targetWordOffset * 8, + p._capnp.depthLimit - 1 + ); +} +function followFars(p) { + if (getPointerType(p) === PointerType.FAR) { + const landingPad = followFar(p); + if (isDoubleFar(p)) landingPad.byteOffset += 8; + return landingPad; + } + return p; +} +function getCapabilityId(p) { + return p.segment.getUint32(p.byteOffset + 4); +} +function isCompositeList(p) { + return getTargetPointerType(p) === PointerType.LIST && getTargetListElementSize(p) === ListElementSize.COMPOSITE; +} +function getContent(p, ignoreCompositeIndex) { + let c; + if (isDoubleFar(p)) { + const landingPad = followFar(p); + c = new Pointer( + p.segment.message.getSegment(getFarSegmentId(landingPad)), + getOffsetWords(landingPad) * 8 + ); + } else { + const target = followFars(p); + c = new Pointer( + target.segment, + target.byteOffset + 8 + getOffsetWords(target) * 8 + ); + } + if (isCompositeList(p)) c.byteOffset += 8; + if (!ignoreCompositeIndex && p._capnp.compositeIndex !== void 0) { + c.byteOffset -= 8; + c.byteOffset += 8 + p._capnp.compositeIndex * getByteLength(padToWord(getStructSize(c))); + } + return c; +} +function getFarSegmentId(p) { + return p.segment.getUint32(p.byteOffset + 4); +} +function getListElementSize(p) { + return p.segment.getUint32(p.byteOffset + 4) & LIST_SIZE_MASK; +} +function getListLength(p) { + return p.segment.getUint32(p.byteOffset + 4) >>> 3; +} +function getOffsetWords(p) { + const o = p.segment.getInt32(p.byteOffset); + return o & 2 ? o >> 3 : o >> 2; +} +function getPointerType(p) { + return p.segment.getUint32(p.byteOffset) & POINTER_TYPE_MASK; +} +function getStructDataWords(p) { + return p.segment.getUint16(p.byteOffset + 4); +} +function getStructPointerLength(p) { + return p.segment.getUint16(p.byteOffset + 6); +} +function getStructSize(p) { + return new ObjectSize(getStructDataWords(p) * 8, getStructPointerLength(p)); +} +function getTargetCompositeListTag(p) { + const c = getContent(p); + c.byteOffset -= 8; + return c; +} +function getTargetCompositeListSize(p) { + return getStructSize(getTargetCompositeListTag(p)); +} +function getTargetListElementSize(p) { + return getListElementSize(followFars(p)); +} +function getTargetListLength(p) { + const t = followFars(p); + if (getListElementSize(t) === ListElementSize.COMPOSITE) { + return getOffsetWords(getTargetCompositeListTag(p)); + } + return getListLength(t); +} +function getTargetPointerType(p) { + const t = getPointerType(followFars(p)); + if (t === PointerType.FAR) throw new Error(format(PTR_INVALID_FAR_TARGET, p)); + return t; +} +function getTargetStructSize(p) { + return getStructSize(followFars(p)); +} +function initPointer(contentSegment, contentOffset, p) { + if (p.segment !== contentSegment) { + if (!contentSegment.hasCapacity(8)) { + const landingPad2 = p.segment.allocate(16); + setFarPointer(true, landingPad2.byteOffset / 8, landingPad2.segment.id, p); + setFarPointer(false, contentOffset / 8, contentSegment.id, landingPad2); + landingPad2.byteOffset += 8; + return new PointerAllocationResult(landingPad2, 0); + } + const landingPad = contentSegment.allocate(8); + if (landingPad.segment.id !== contentSegment.id) { + throw new Error(INVARIANT_UNREACHABLE_CODE); + } + setFarPointer(false, landingPad.byteOffset / 8, landingPad.segment.id, p); + return new PointerAllocationResult( + landingPad, + (contentOffset - landingPad.byteOffset - 8) / 8 + ); + } + return new PointerAllocationResult(p, (contentOffset - p.byteOffset - 8) / 8); +} +function isDoubleFar(p) { + return getPointerType(p) === PointerType.FAR && (p.segment.getUint32(p.byteOffset) & POINTER_DOUBLE_FAR_MASK) !== 0; +} +function isNull(p) { + return p.segment.isWordZero(p.byteOffset); +} +function relocateTo(dst, src) { + const t = followFars(src); + const lo = t.segment.getUint8(t.byteOffset) & 3; + const hi = t.segment.getUint32(t.byteOffset + 4); + erase(dst); + const res = initPointer( + t.segment, + t.byteOffset + 8 + getOffsetWords(t) * 8, + dst + ); + res.pointer.segment.setUint32( + res.pointer.byteOffset, + lo | res.offsetWords << 2 + ); + res.pointer.segment.setUint32(res.pointer.byteOffset + 4, hi); + erasePointer(src); +} +function setFarPointer(doubleFar, offsetWords, segmentId, p) { + const A = PointerType.FAR; + const B = doubleFar ? 1 : 0; + const C = offsetWords; + const D = segmentId; + p.segment.setUint32(p.byteOffset, A | B << 2 | C << 3); + p.segment.setUint32(p.byteOffset + 4, D); +} +function setInterfacePointer(capId, p) { + p.segment.setUint32(p.byteOffset, PointerType.OTHER); + p.segment.setUint32(p.byteOffset + 4, capId); +} +function getInterfacePointer(p) { + return p.segment.getUint32(p.byteOffset + 4); +} +function setListPointer(offsetWords, size, length, p, compositeSize) { + const A = PointerType.LIST; + const B = offsetWords; + const C = size; + let D = length; + if (size === ListElementSize.COMPOSITE) { + if (compositeSize === void 0) { + throw new TypeError(TYPE_COMPOSITE_SIZE_UNDEFINED); + } + D *= getWordLength(compositeSize); + } + p.segment.setUint32(p.byteOffset, A | B << 2); + p.segment.setUint32(p.byteOffset + 4, C | D << 3); +} +function setStructPointer(offsetWords, size, p) { + const A = PointerType.STRUCT; + const B = offsetWords; + const C = getDataWordLength(size); + const D = size.pointerLength; + p.segment.setUint32(p.byteOffset, A | B << 2); + p.segment.setUint16(p.byteOffset + 4, C); + p.segment.setUint16(p.byteOffset + 6, D); +} +function validate(pointerType, p, elementSize) { + if (isNull(p)) return; + const t = followFars(p); + const A = t.segment.getUint32(t.byteOffset) & POINTER_TYPE_MASK; + if (A !== pointerType) { + throw new Error(format(PTR_WRONG_POINTER_TYPE, p, pointerType)); + } + if (elementSize !== void 0) { + const C = t.segment.getUint32(t.byteOffset + 4) & LIST_SIZE_MASK; + if (C !== elementSize) { + throw new Error( + format(PTR_WRONG_LIST_TYPE, p, ListElementSize[elementSize]) + ); + } + } +} +function copyFromInterface(src, dst) { + const srcCapId = getInterfacePointer(src); + if (srcCapId < 0) { + return; + } + const srcCapTable = src.segment.message._capnp.capTable; + if (!srcCapTable) { + return; + } + const client = srcCapTable[srcCapId]; + if (!client) { + return; + } + const dstCapId = dst.segment.message.addCap(client); + setInterfacePointer(dstCapId, dst); +} +function copyFromList(src, dst) { + if (dst._capnp.depthLimit <= 0) throw new Error(PTR_DEPTH_LIMIT_EXCEEDED); + const srcContent = getContent(src); + const srcElementSize = getTargetListElementSize(src); + const srcLength = getTargetListLength(src); + let srcCompositeSize; + let srcStructByteLength; + let dstContent; + if (srcElementSize === ListElementSize.POINTER) { + dstContent = dst.segment.allocate(srcLength << 3); + for (let i = 0; i < srcLength; i++) { + const srcPtr = new Pointer( + srcContent.segment, + srcContent.byteOffset + (i << 3), + src._capnp.depthLimit - 1 + ); + const dstPtr = new Pointer( + dstContent.segment, + dstContent.byteOffset + (i << 3), + dst._capnp.depthLimit - 1 + ); + copyFrom(srcPtr, dstPtr); + } + } else if (srcElementSize === ListElementSize.COMPOSITE) { + srcCompositeSize = padToWord(getTargetCompositeListSize(src)); + srcStructByteLength = getByteLength(srcCompositeSize); + dstContent = dst.segment.allocate( + getByteLength(srcCompositeSize) * srcLength + 8 + ); + dstContent.segment.copyWord( + dstContent.byteOffset, + srcContent.segment, + srcContent.byteOffset - 8 + ); + if (srcCompositeSize.dataByteLength > 0) { + const wordLength = getWordLength(srcCompositeSize) * srcLength; + dstContent.segment.copyWords( + dstContent.byteOffset + 8, + srcContent.segment, + srcContent.byteOffset, + wordLength + ); + } + for (let i = 0; i < srcLength; i++) { + for (let j = 0; j < srcCompositeSize.pointerLength; j++) { + const offset = i * srcStructByteLength + srcCompositeSize.dataByteLength + (j << 3); + const srcPtr = new Pointer( + srcContent.segment, + srcContent.byteOffset + offset, + src._capnp.depthLimit - 1 + ); + const dstPtr = new Pointer( + dstContent.segment, + dstContent.byteOffset + offset + 8, + dst._capnp.depthLimit - 1 + ); + copyFrom(srcPtr, dstPtr); + } + } + } else { + const byteLength = padToWord$1( + srcElementSize === ListElementSize.BIT ? srcLength + 7 >>> 3 : getListElementByteLength(srcElementSize) * srcLength + ); + const wordLength = byteLength >>> 3; + dstContent = dst.segment.allocate(byteLength); + dstContent.segment.copyWords( + dstContent.byteOffset, + srcContent.segment, + srcContent.byteOffset, + wordLength + ); + } + const res = initPointer(dstContent.segment, dstContent.byteOffset, dst); + setListPointer( + res.offsetWords, + srcElementSize, + srcLength, + res.pointer, + srcCompositeSize + ); +} +function copyFromStruct(src, dst) { + if (dst._capnp.depthLimit <= 0) throw new Error(PTR_DEPTH_LIMIT_EXCEEDED); + const srcContent = getContent(src); + const srcSize = getTargetStructSize(src); + const srcDataWordLength = getDataWordLength(srcSize); + const dstContent = dst.segment.allocate(getByteLength(srcSize)); + dstContent.segment.copyWords( + dstContent.byteOffset, + srcContent.segment, + srcContent.byteOffset, + srcDataWordLength + ); + for (let i = 0; i < srcSize.pointerLength; i++) { + const offset = srcSize.dataByteLength + i * 8; + const srcPtr = new Pointer( + srcContent.segment, + srcContent.byteOffset + offset, + src._capnp.depthLimit - 1 + ); + const dstPtr = new Pointer( + dstContent.segment, + dstContent.byteOffset + offset, + dst._capnp.depthLimit - 1 + ); + copyFrom(srcPtr, dstPtr); + } + if (dst._capnp.compositeList) return; + const res = initPointer(dstContent.segment, dstContent.byteOffset, dst); + setStructPointer(res.offsetWords, srcSize, res.pointer); +} +function trackPointerAllocation(message, p) { + message._capnp.traversalLimit -= 8; + if (message._capnp.traversalLimit <= 0) { + throw new Error(format(PTR_TRAVERSAL_LIMIT_EXCEEDED, p)); + } +} +var PointerAllocationResult = class { + offsetWords; + pointer; + constructor(pointer, offsetWords) { + this.pointer = pointer; + this.offsetWords = offsetWords; + } +}; +var PointerType = /* @__PURE__ */ ((PointerType2) => { + PointerType2[PointerType2["STRUCT"] = 0] = "STRUCT"; + PointerType2[PointerType2["LIST"] = 1] = "LIST"; + PointerType2[PointerType2["FAR"] = 2] = "FAR"; + PointerType2[PointerType2["OTHER"] = 3] = "OTHER"; + return PointerType2; +})(PointerType || {}); +var Pointer = class { + static _capnp = { + displayName: "Pointer" + }; + _capnp; + /** Offset, in bytes, from the start of the segment to the beginning of this pointer. */ + byteOffset; + /** + * The starting segment for this pointer's data. In the case of a far pointer, the actual content this pointer is + * referencing will be in another segment within the same message. + */ + segment; + constructor(segment, byteOffset, depthLimit = MAX_DEPTH) { + this._capnp = { compositeList: false, depthLimit }; + this.segment = segment; + this.byteOffset = byteOffset; + if (depthLimit < 1) { + throw new Error(format(PTR_DEPTH_LIMIT_EXCEEDED, this)); + } + trackPointerAllocation(segment.message, this); + if (byteOffset < 0 || byteOffset > segment.byteLength) { + throw new Error(format(PTR_OFFSET_OUT_OF_BOUNDS, byteOffset)); + } + } + [Symbol.toStringTag]() { + return format("Pointer_%d", this.segment.id); + } + toString() { + return format("->%d@%a%s", this.segment.id, this.byteOffset, dump(this)); + } +}; +var List = class _List extends Pointer { + static _capnp = { + displayName: "List", + size: ListElementSize.VOID + }; + constructor(segment, byteOffset, depthLimit) { + super(segment, byteOffset, depthLimit); + return new Proxy(this, _List.#proxyHandler); + } + static #proxyHandler = { + get(target, prop, receiver) { + const val = Reflect.get(target, prop, receiver); + if (val !== void 0) return val; + if (typeof prop === "string") { + return target.get(+prop); + } + } + }; + get length() { + return getTargetListLength(this); + } + toArray() { + const length = this.length; + const res = Array.from({ length }); + for (let i = 0; i < length; i++) { + res[i] = this.at(i); + } + return res; + } + get(_index) { + throw new TypeError("Cannot get from a generic list."); + } + set(_index, _value) { + throw new TypeError("Cannot set on a generic list."); + } + at(index) { + if (index < 0) { + const length = this.length; + index += length; + } + return this.get(index); + } + concat(other) { + const length = this.length; + const otherLength = other.length; + const res = Array.from({ length: length + otherLength }); + for (let i = 0; i < length; i++) res[i] = this.at(i); + for (let i = 0; i < otherLength; i++) res[i + length] = other.at(i); + return res; + } + some(cb, _this) { + const length = this.length; + for (let i = 0; i < length; i++) { + if (cb.call(_this, this.at(i), i, this)) { + return true; + } + } + return false; + } + filter(cb, _this) { + const length = this.length; + const res = []; + for (let i = 0; i < length; i++) { + const value = this.at(i); + if (cb.call(_this, value, i, this)) { + res.push(value); + } + } + return res; + } + find(cb, _this) { + const length = this.length; + for (let i = 0; i < length; i++) { + const value = this.at(i); + if (cb.call(_this, value, i, this)) { + return value; + } + } + return void 0; + } + findIndex(cb, _this) { + const length = this.length; + for (let i = 0; i < length; i++) { + const value = this.at(i); + if (cb.call(_this, value, i, this)) { + return i; + } + } + return -1; + } + forEach(cb, _this) { + const length = this.length; + for (let i = 0; i < length; i++) { + cb.call(_this, this.at(i), i, this); + } + } + map(cb, _this) { + const length = this.length; + const res = Array.from({ length }); + for (let i = 0; i < length; i++) { + res[i] = cb.call(_this, this.at(i), i, this); + } + return res; + } + flatMap(cb, _this) { + const length = this.length; + const res = []; + for (let i = 0; i < length; i++) { + const r = cb.call(_this, this.at(i), i, this); + res.push(...Array.isArray(r) ? r : [r]); + } + return res; + } + every(cb, _this) { + const length = this.length; + for (let i = 0; i < length; i++) { + if (!cb.call(_this, this.at(i), i, this)) { + return false; + } + } + return true; + } + reduce(cb, initialValue) { + let i = 0; + let res; + if (initialValue === void 0) { + res = this.at(0); + i++; + } else { + res = initialValue; + } + for (; i < this.length; i++) { + res = cb(res, this.at(i), i, this); + } + return res; + } + reduceRight(cb, initialValue) { + let i = this.length - 1; + let res; + if (initialValue === void 0) { + res = this.at(i); + i--; + } else { + res = initialValue; + } + for (; i >= 0; i--) { + res = cb(res, this.at(i), i, this); + } + return res; + } + slice(start = 0, end) { + const length = end ? Math.min(this.length, end) : this.length; + const res = Array.from({ length: length - start }); + for (let i = start; i < length; i++) res[i] = this.at(i); + return res; + } + join(separator) { + return this.toArray().join(separator); + } + toReversed() { + return this.toArray().reverse(); + } + toSorted(compareFn) { + return this.toArray().sort(compareFn); + } + toSpliced(start, deleteCount, ...items) { + return this.toArray().splice(start, deleteCount, ...items); + } + fill(value, start, end) { + const length = this.length; + const s = Math.max(start ?? 0, 0); + const e = Math.min(end ?? length, length); + for (let i = s; i < e; i++) { + this.set(i, value); + } + return this; + } + copyWithin(target, start, end) { + const length = this.length; + const e = end ?? length; + const s = start < 0 ? Math.max(length + start, 0) : start; + const t = target < 0 ? Math.max(length + target, 0) : target; + const len = Math.min(e - s, length - t); + for (let i = 0; i < len; i++) { + this.set(t + i, this.at(s + i)); + } + return this; + } + keys() { + const length = this.length; + return Array.from({ length }, (_, i) => i)[Symbol.iterator](); + } + values() { + return this.toArray().values(); + } + entries() { + return this.toArray().entries(); + } + flat(depth) { + return this.toArray().flat(depth); + } + with(index, value) { + return this.toArray().with(index, value); + } + includes(_searchElement, _fromIndex) { + throw new Error(LIST_NO_SEARCH); + } + findLast(_cb, _thisArg) { + throw new Error(LIST_NO_SEARCH); + } + findLastIndex(_cb, _t) { + throw new Error(LIST_NO_SEARCH); + } + indexOf(_searchElement, _fromIndex) { + throw new Error(LIST_NO_SEARCH); + } + lastIndexOf(_searchElement, _fromIndex) { + throw new Error(LIST_NO_SEARCH); + } + pop() { + throw new Error(LIST_NO_MUTABLE); + } + push(..._items) { + throw new Error(LIST_NO_MUTABLE); + } + reverse() { + throw new Error(LIST_NO_MUTABLE); + } + shift() { + throw new Error(LIST_NO_MUTABLE); + } + unshift(..._items) { + throw new Error(LIST_NO_MUTABLE); + } + splice(_start, _deleteCount, ..._rest) { + throw new Error(LIST_NO_MUTABLE); + } + sort(_fn) { + throw new Error(LIST_NO_MUTABLE); + } + get [Symbol.unscopables]() { + return Array.prototype[Symbol.unscopables]; + } + [Symbol.iterator]() { + return this.values(); + } + toJSON() { + return this.toArray(); + } + toString() { + return this.join(","); + } + toLocaleString(_locales, _options) { + return this.toString(); + } + [Symbol.toStringTag]() { + return "[object Array]"; + } + static [Symbol.toStringTag]() { + return this._capnp.displayName; + } +}; +function initList$1(elementSize, length, l, compositeSize) { + let c; + switch (elementSize) { + case ListElementSize.BIT: { + c = l.segment.allocate(Math.ceil(length / 8)); + break; + } + case ListElementSize.BYTE: + case ListElementSize.BYTE_2: + case ListElementSize.BYTE_4: + case ListElementSize.BYTE_8: + case ListElementSize.POINTER: { + c = l.segment.allocate(length * getListElementByteLength(elementSize)); + break; + } + case ListElementSize.COMPOSITE: { + if (compositeSize === void 0) { + throw new Error(format(PTR_COMPOSITE_SIZE_UNDEFINED)); + } + compositeSize = padToWord(compositeSize); + const byteLength = getByteLength(compositeSize) * length; + c = l.segment.allocate(byteLength + 8); + setStructPointer(length, compositeSize, c); + break; + } + case ListElementSize.VOID: { + setListPointer(0, elementSize, length, l); + return; + } + default: { + throw new Error(format(PTR_INVALID_LIST_SIZE, elementSize)); + } + } + const res = initPointer(c.segment, c.byteOffset, l); + setListPointer( + res.offsetWords, + elementSize, + length, + res.pointer, + compositeSize + ); +} +var Data = class extends List { + static fromPointer(pointer) { + validate(PointerType.LIST, pointer, ListElementSize.BYTE); + return this._fromPointerUnchecked(pointer); + } + static _fromPointerUnchecked(pointer) { + return new this( + pointer.segment, + pointer.byteOffset, + pointer._capnp.depthLimit + ); + } + /** + * Copy the contents of `src` into this Data pointer. If `src` is smaller than the length of this pointer then the + * remaining bytes will be zeroed out. Extra bytes in `src` are ignored. + * + * @param {(ArrayBuffer | ArrayBufferView)} src The source buffer. + * @returns {void} + */ + // TODO: Would be nice to have a way to zero-copy a buffer by allocating a new segment into the message with that + // buffer data. + copyBuffer(src) { + const c = getContent(this); + const dstLength = this.length; + const srcLength = src.byteLength; + const i = src instanceof ArrayBuffer ? new Uint8Array(src) : new Uint8Array( + src.buffer, + src.byteOffset, + Math.min(dstLength, srcLength) + ); + const o = new Uint8Array(c.segment.buffer, c.byteOffset, this.length); + o.set(i); + if (dstLength > srcLength) { + o.fill(0, srcLength, dstLength); + } + } + /** + * Read a byte from the specified offset. + * + * @param {number} byteOffset The byte offset to read. + * @returns {number} The byte value. + */ + get(byteOffset) { + const c = getContent(this); + return c.segment.getUint8(c.byteOffset + byteOffset); + } + /** + * Write a byte at the specified offset. + * + * @param {number} byteOffset The byte offset to set. + * @param {number} value The byte value to set. + * @returns {void} + */ + set(byteOffset, value) { + const c = getContent(this); + c.segment.setUint8(c.byteOffset + byteOffset, value); + } + /** + * Creates a **copy** of the underlying buffer data and returns it as an ArrayBuffer. + * + * To obtain a reference to the underlying buffer instead, use `toUint8Array()` or `toDataView()`. + * + * @returns {ArrayBuffer} A copy of this data buffer. + */ + toArrayBuffer() { + const c = getContent(this); + return c.segment.buffer.slice(c.byteOffset, c.byteOffset + this.length); + } + /** + * Convert this Data pointer to a DataView representing the pointer's contents. + * + * WARNING: The DataView references memory from a message segment, so do not venture outside the bounds of the + * DataView or else BAD THINGS. + * + * @returns {DataView} A live reference to the underlying buffer. + */ + toDataView() { + const c = getContent(this); + return new DataView(c.segment.buffer, c.byteOffset, this.length); + } + [Symbol.toStringTag]() { + return `Data_${super.toString()}`; + } + /** + * Convert this Data pointer to a Uint8Array representing the pointer's contents. + * + * WARNING: The Uint8Array references memory from a message segment, so do not venture outside the bounds of the + * Uint8Array or else BAD THINGS. + * + * @returns {DataView} A live reference to the underlying buffer. + */ + toUint8Array() { + const c = getContent(this); + return new Uint8Array(c.segment.buffer, c.byteOffset, this.length); + } +}; +var textEncoder = new TextEncoder(); +var textDecoder = new TextDecoder(); +var Text = class extends List { + static fromPointer(pointer) { + validate(PointerType.LIST, pointer, ListElementSize.BYTE); + return textFromPointerUnchecked(pointer); + } + /** + * Read a utf-8 encoded string value from this pointer. + * + * @param {number} [index] The index at which to start reading; defaults to zero. + * @returns {string} The string value. + */ + get(index = 0) { + if (isNull(this)) return ""; + const c = getContent(this); + return textDecoder.decode( + new Uint8Array( + c.segment.buffer, + c.byteOffset + index, + this.length - index + ) + ); + } + /** + * Get the number of utf-8 encoded bytes in this text. This does **not** include the NUL byte. + * + * @returns {number} The number of bytes allocated for the text. + */ + get length() { + return super.length - 1; + } + /** + * Write a utf-8 encoded string value starting at the specified index. + * + * @param {number} index The index at which to start copying the string. Note that if this is not zero the bytes + * before `index` will be left as-is. All bytes after `index` will be overwritten. + * @param {string} value The string value to set. + * @returns {void} + */ + set(index, value) { + const src = textEncoder.encode(value); + const dstLength = src.byteLength + index; + let c; + let original; + if (!isNull(this)) { + c = getContent(this); + let originalLength = this.length; + if (originalLength >= index) { + originalLength = index; + } + original = new Uint8Array( + c.segment.buffer.slice( + c.byteOffset, + c.byteOffset + Math.min(originalLength, index) + ) + ); + erase(this); + } + initList$1(ListElementSize.BYTE, dstLength + 1, this); + c = getContent(this); + const dst = new Uint8Array(c.segment.buffer, c.byteOffset, dstLength); + if (original) dst.set(original); + dst.set(src, index); + } + toString() { + return this.get(); + } + toJSON() { + return this.get(); + } + [Symbol.toPrimitive]() { + return this.get(); + } + [Symbol.toStringTag]() { + return `Text_${super.toString()}`; + } +}; +function textFromPointerUnchecked(pointer) { + return new Text( + pointer.segment, + pointer.byteOffset, + pointer._capnp.depthLimit + ); +} +var Struct = class extends Pointer { + static _capnp = { + displayName: "Struct" + }; + /** + * Create a new pointer to a struct. + * + * @constructor {Struct} + * @param {Segment} segment The segment the pointer resides in. + * @param {number} byteOffset The offset from the beginning of the segment to the beginning of the pointer data. + * @param {any} [depthLimit=MAX_DEPTH] The nesting depth limit for this object. + * @param {number} [compositeIndex] If set, then this pointer is actually a reference to a composite list + * (`this._getPointerTargetType() === PointerType.LIST`), and this number is used as the index of the struct within + * the list. It is not valid to call `initStruct()` on a composite struct – the struct contents are initialized when + * the list pointer is initialized. + */ + constructor(segment, byteOffset, depthLimit = MAX_DEPTH, compositeIndex) { + super(segment, byteOffset, depthLimit); + this._capnp.compositeIndex = compositeIndex; + this._capnp.compositeList = compositeIndex !== void 0; + } + static [Symbol.toStringTag]() { + return this._capnp.displayName; + } + [Symbol.toStringTag]() { + return `Struct_${super.toString()}${this._capnp.compositeIndex === void 0 ? "" : `,ci:${this._capnp.compositeIndex}`} > ${getContent(this).toString()}`; + } +}; +var AnyStruct = class extends Struct { + static _capnp = { + displayName: "AnyStruct", + id: "0", + size: new ObjectSize(0, 0) + }; +}; +var FixedAnswer = class { + struct() { + return Promise.resolve(this.structSync()); + } +}; +var ErrorAnswer = class extends FixedAnswer { + err; + constructor(err) { + super(); + this.err = err; + } + structSync() { + throw this.err; + } + pipelineCall(_transform, _call) { + return this; + } + pipelineClose(_transform) { + throw this.err; + } +}; +var ErrorClient = class { + err; + constructor(err) { + this.err = err; + } + call(_call) { + return new ErrorAnswer(this.err); + } + close() { + throw this.err; + } +}; +function clientOrNull(client) { + return client ? client : new ErrorClient(new Error(RPC_NULL_CLIENT)); +} +var TMP_WORD = new DataView(new ArrayBuffer(8)); +function initStruct(size, s) { + if (s._capnp.compositeIndex !== void 0) { + throw new Error(format(PTR_INIT_COMPOSITE_STRUCT, s)); + } + erase(s); + const c = s.segment.allocate(getByteLength(size)); + const res = initPointer(c.segment, c.byteOffset, s); + setStructPointer(res.offsetWords, size, res.pointer); +} +function initStructAt(index, StructClass, p) { + const s = getPointerAs(index, StructClass, p); + initStruct(StructClass._capnp.size, s); + return s; +} +function checkPointerBounds(index, s) { + const pointerLength = getSize(s).pointerLength; + if (index < 0 || index >= pointerLength) { + throw new Error( + format(PTR_STRUCT_POINTER_OUT_OF_BOUNDS, s, index, pointerLength) + ); + } +} +function getInterfaceClientOrNullAt(index, s) { + return getInterfaceClientOrNull(getPointer(index, s)); +} +function getInterfaceClientOrNull(p) { + let client = null; + const capId = getInterfacePointer(p); + const capTable = p.segment.message._capnp.capTable; + if (capTable && capId >= 0 && capId < capTable.length) { + client = capTable[capId]; + } + return clientOrNull(client); +} +function resize(dstSize, s) { + const srcSize = getSize(s); + const srcContent = getContent(s); + const dstContent = s.segment.allocate(getByteLength(dstSize)); + dstContent.segment.copyWords( + dstContent.byteOffset, + srcContent.segment, + srcContent.byteOffset, + Math.min(getDataWordLength(srcSize), getDataWordLength(dstSize)) + ); + const res = initPointer(dstContent.segment, dstContent.byteOffset, s); + setStructPointer(res.offsetWords, dstSize, res.pointer); + for (let i = 0; i < Math.min(srcSize.pointerLength, dstSize.pointerLength); i++) { + const srcPtr = new Pointer( + srcContent.segment, + srcContent.byteOffset + srcSize.dataByteLength + i * 8 + ); + if (isNull(srcPtr)) { + continue; + } + const srcPtrTarget = followFars(srcPtr); + const srcPtrContent = getContent(srcPtr); + const dstPtr = new Pointer( + dstContent.segment, + dstContent.byteOffset + dstSize.dataByteLength + i * 8 + ); + if (getTargetPointerType(srcPtr) === PointerType.LIST && getTargetListElementSize(srcPtr) === ListElementSize.COMPOSITE) { + srcPtrContent.byteOffset -= 8; + } + const r = initPointer( + srcPtrContent.segment, + srcPtrContent.byteOffset, + dstPtr + ); + const a = srcPtrTarget.segment.getUint8(srcPtrTarget.byteOffset) & 3; + const b = srcPtrTarget.segment.getUint32(srcPtrTarget.byteOffset + 4); + r.pointer.segment.setUint32(r.pointer.byteOffset, a | r.offsetWords << 2); + r.pointer.segment.setUint32(r.pointer.byteOffset + 4, b); + } + srcContent.segment.fillZeroWords( + srcContent.byteOffset, + getWordLength(srcSize) + ); +} +function getAs(StructClass, s) { + return new StructClass( + s.segment, + s.byteOffset, + s._capnp.depthLimit, + s._capnp.compositeIndex + ); +} +function getBit(bitOffset, s, defaultMask) { + const byteOffset = Math.floor(bitOffset / 8); + const bitMask = 1 << bitOffset % 8; + checkDataBounds(byteOffset, 1, s); + const ds = getDataSection(s); + const v = ds.segment.getUint8(ds.byteOffset + byteOffset); + if (defaultMask === void 0) return (v & bitMask) !== 0; + const defaultValue = defaultMask.getUint8(0); + return ((v ^ defaultValue) & bitMask) !== 0; +} +function getData(index, s, defaultValue) { + checkPointerBounds(index, s); + const ps = getPointerSection(s); + ps.byteOffset += index * 8; + const l = new Data(ps.segment, ps.byteOffset, s._capnp.depthLimit - 1); + if (isNull(l)) { + if (defaultValue) { + copyFrom(defaultValue, l); + } else { + initList$1(ListElementSize.BYTE, 0, l); + } + } + return l; +} +function getDataSection(s) { + return getContent(s); +} +function getFloat32(byteOffset, s, defaultMask) { + checkDataBounds(byteOffset, 4, s); + const ds = getDataSection(s); + if (defaultMask === void 0) { + return ds.segment.getFloat32(ds.byteOffset + byteOffset); + } + const v = ds.segment.getUint32(ds.byteOffset + byteOffset) ^ defaultMask.getUint32(0, true); + TMP_WORD.setUint32(0, v, NATIVE_LITTLE_ENDIAN); + return TMP_WORD.getFloat32(0, NATIVE_LITTLE_ENDIAN); +} +function getFloat64(byteOffset, s, defaultMask) { + checkDataBounds(byteOffset, 8, s); + const ds = getDataSection(s); + if (defaultMask !== void 0) { + const lo = ds.segment.getUint32(ds.byteOffset + byteOffset) ^ defaultMask.getUint32(0, true); + const hi = ds.segment.getUint32(ds.byteOffset + byteOffset + 4) ^ defaultMask.getUint32(4, true); + TMP_WORD.setUint32(0, lo, NATIVE_LITTLE_ENDIAN); + TMP_WORD.setUint32(4, hi, NATIVE_LITTLE_ENDIAN); + return TMP_WORD.getFloat64(0, NATIVE_LITTLE_ENDIAN); + } + return ds.segment.getFloat64(ds.byteOffset + byteOffset); +} +function getInt16(byteOffset, s, defaultMask) { + checkDataBounds(byteOffset, 2, s); + const ds = getDataSection(s); + if (defaultMask === void 0) { + return ds.segment.getInt16(ds.byteOffset + byteOffset); + } + const v = ds.segment.getUint16(ds.byteOffset + byteOffset) ^ defaultMask.getUint16(0, true); + TMP_WORD.setUint16(0, v, NATIVE_LITTLE_ENDIAN); + return TMP_WORD.getInt16(0, NATIVE_LITTLE_ENDIAN); +} +function getInt32(byteOffset, s, defaultMask) { + checkDataBounds(byteOffset, 4, s); + const ds = getDataSection(s); + if (defaultMask === void 0) { + return ds.segment.getInt32(ds.byteOffset + byteOffset); + } + const v = ds.segment.getUint32(ds.byteOffset + byteOffset) ^ defaultMask.getUint16(0, true); + TMP_WORD.setUint32(0, v, NATIVE_LITTLE_ENDIAN); + return TMP_WORD.getInt32(0, NATIVE_LITTLE_ENDIAN); +} +function getInt64(byteOffset, s, defaultMask) { + checkDataBounds(byteOffset, 8, s); + const ds = getDataSection(s); + if (defaultMask !== void 0) { + const lo = ds.segment.getUint32(ds.byteOffset + byteOffset) ^ defaultMask.getUint32(0, true); + const hi = ds.segment.getUint32(ds.byteOffset + byteOffset + 4) ^ defaultMask.getUint32(4, true); + TMP_WORD.setUint32(NATIVE_LITTLE_ENDIAN ? 0 : 4, lo, NATIVE_LITTLE_ENDIAN); + TMP_WORD.setUint32(NATIVE_LITTLE_ENDIAN ? 4 : 0, hi, NATIVE_LITTLE_ENDIAN); + return TMP_WORD.getBigInt64(0, NATIVE_LITTLE_ENDIAN); + } + return ds.segment.getInt64(ds.byteOffset + byteOffset); +} +function getInt8(byteOffset, s, defaultMask) { + checkDataBounds(byteOffset, 1, s); + const ds = getDataSection(s); + if (defaultMask === void 0) { + return ds.segment.getInt8(ds.byteOffset + byteOffset); + } + const v = ds.segment.getUint8(ds.byteOffset + byteOffset) ^ defaultMask.getUint8(0); + TMP_WORD.setUint8(0, v); + return TMP_WORD.getInt8(0); +} +function getList(index, ListClass, s, defaultValue) { + checkPointerBounds(index, s); + const ps = getPointerSection(s); + ps.byteOffset += index * 8; + const l = new ListClass(ps.segment, ps.byteOffset, s._capnp.depthLimit - 1); + if (isNull(l)) { + if (defaultValue) { + copyFrom(defaultValue, l); + } else { + initList$1(ListClass._capnp.size, 0, l, ListClass._capnp.compositeSize); + } + } else if (ListClass._capnp.compositeSize !== void 0) { + const srcSize = getTargetCompositeListSize(l); + const dstSize = ListClass._capnp.compositeSize; + if (dstSize.dataByteLength > srcSize.dataByteLength || dstSize.pointerLength > srcSize.pointerLength) { + const srcContent = getContent(l); + const srcLength = getTargetListLength(l); + const dstContent = l.segment.allocate( + getByteLength(dstSize) * srcLength + 8 + ); + const res = initPointer(dstContent.segment, dstContent.byteOffset, l); + setListPointer( + res.offsetWords, + ListClass._capnp.size, + srcLength, + res.pointer, + dstSize + ); + setStructPointer(srcLength, dstSize, dstContent); + dstContent.byteOffset += 8; + for (let i = 0; i < srcLength; i++) { + const srcElementOffset = srcContent.byteOffset + i * getByteLength(srcSize); + const dstElementOffset = dstContent.byteOffset + i * getByteLength(dstSize); + dstContent.segment.copyWords( + dstElementOffset, + srcContent.segment, + srcElementOffset, + getWordLength(srcSize) + ); + for (let j = 0; j < srcSize.pointerLength; j++) { + const srcPtr = new Pointer( + srcContent.segment, + srcElementOffset + srcSize.dataByteLength + j * 8 + ); + const dstPtr = new Pointer( + dstContent.segment, + dstElementOffset + dstSize.dataByteLength + j * 8 + ); + const srcPtrTarget = followFars(srcPtr); + const srcPtrContent = getContent(srcPtr); + if (getTargetPointerType(srcPtr) === PointerType.LIST && getTargetListElementSize(srcPtr) === ListElementSize.COMPOSITE) { + srcPtrContent.byteOffset -= 8; + } + const r = initPointer( + srcPtrContent.segment, + srcPtrContent.byteOffset, + dstPtr + ); + const a = srcPtrTarget.segment.getUint8(srcPtrTarget.byteOffset) & 3; + const b = srcPtrTarget.segment.getUint32(srcPtrTarget.byteOffset + 4); + r.pointer.segment.setUint32( + r.pointer.byteOffset, + a | r.offsetWords << 2 + ); + r.pointer.segment.setUint32(r.pointer.byteOffset + 4, b); + } + } + srcContent.segment.fillZeroWords( + srcContent.byteOffset, + getWordLength(srcSize) * srcLength + ); + } + } + return l; +} +function getPointer(index, s) { + checkPointerBounds(index, s); + const ps = getPointerSection(s); + ps.byteOffset += index * 8; + return new Pointer(ps.segment, ps.byteOffset, s._capnp.depthLimit - 1); +} +function getPointerAs(index, PointerClass, s) { + checkPointerBounds(index, s); + const ps = getPointerSection(s); + ps.byteOffset += index * 8; + return new PointerClass(ps.segment, ps.byteOffset, s._capnp.depthLimit - 1); +} +function getPointerSection(s) { + const ps = getContent(s); + ps.byteOffset += padToWord$1(getSize(s).dataByteLength); + return ps; +} +function getSize(s) { + if (s._capnp.compositeIndex !== void 0) { + const c = getContent(s, true); + c.byteOffset -= 8; + return getStructSize(c); + } + return getTargetStructSize(s); +} +function getStruct(index, StructClass, s, defaultValue) { + const t = getPointerAs(index, StructClass, s); + if (isNull(t)) { + if (defaultValue) { + copyFrom(defaultValue, t); + } else { + initStruct(StructClass._capnp.size, t); + } + } else { + validate(PointerType.STRUCT, t); + const ts = getTargetStructSize(t); + if (ts.dataByteLength < StructClass._capnp.size.dataByteLength || ts.pointerLength < StructClass._capnp.size.pointerLength) { + resize(StructClass._capnp.size, t); + } + } + return t; +} +function getText(index, s, defaultValue) { + const t = Text.fromPointer(getPointer(index, s)); + if (isNull(t) && defaultValue) t.set(0, defaultValue); + return t.get(0); +} +function getUint16(byteOffset, s, defaultMask) { + checkDataBounds(byteOffset, 2, s); + const ds = getDataSection(s); + if (defaultMask === void 0) { + return ds.segment.getUint16(ds.byteOffset + byteOffset); + } + return ds.segment.getUint16(ds.byteOffset + byteOffset) ^ defaultMask.getUint16(0, true); +} +function getUint32(byteOffset, s, defaultMask) { + checkDataBounds(byteOffset, 4, s); + const ds = getDataSection(s); + if (defaultMask === void 0) { + return ds.segment.getUint32(ds.byteOffset + byteOffset); + } + return ds.segment.getUint32(ds.byteOffset + byteOffset) ^ defaultMask.getUint32(0, true); +} +function getUint64(byteOffset, s, defaultMask) { + checkDataBounds(byteOffset, 8, s); + const ds = getDataSection(s); + if (defaultMask !== void 0) { + const lo = ds.segment.getUint32(ds.byteOffset + byteOffset) ^ defaultMask.getUint32(0, true); + const hi = ds.segment.getUint32(ds.byteOffset + byteOffset + 4) ^ defaultMask.getUint32(4, true); + TMP_WORD.setUint32(NATIVE_LITTLE_ENDIAN ? 0 : 4, lo, NATIVE_LITTLE_ENDIAN); + TMP_WORD.setUint32(NATIVE_LITTLE_ENDIAN ? 4 : 0, hi, NATIVE_LITTLE_ENDIAN); + return TMP_WORD.getBigUint64(0, NATIVE_LITTLE_ENDIAN); + } + return ds.segment.getUint64(ds.byteOffset + byteOffset); +} +function getUint8(byteOffset, s, defaultMask) { + checkDataBounds(byteOffset, 1, s); + const ds = getDataSection(s); + if (defaultMask === void 0) { + return ds.segment.getUint8(ds.byteOffset + byteOffset); + } + return ds.segment.getUint8(ds.byteOffset + byteOffset) ^ defaultMask.getUint8(0); +} +function initData(index, length, s) { + checkPointerBounds(index, s); + const ps = getPointerSection(s); + ps.byteOffset += index * 8; + const l = new Data(ps.segment, ps.byteOffset, s._capnp.depthLimit - 1); + erase(l); + initList$1(ListElementSize.BYTE, length, l); + return l; +} +function initList(index, ListClass, length, s) { + checkPointerBounds(index, s); + const ps = getPointerSection(s); + ps.byteOffset += index * 8; + const l = new ListClass(ps.segment, ps.byteOffset, s._capnp.depthLimit - 1); + erase(l); + initList$1(ListClass._capnp.size, length, l, ListClass._capnp.compositeSize); + return l; +} +function setBit(bitOffset, value, s, defaultMask) { + const byteOffset = Math.floor(bitOffset / 8); + const bitMask = 1 << bitOffset % 8; + checkDataBounds(byteOffset, 1, s); + const ds = getDataSection(s); + const b = ds.segment.getUint8(ds.byteOffset + byteOffset); + if (defaultMask !== void 0) { + value = (defaultMask.getUint8(0) & bitMask) === 0 ? value : !value; + } + ds.segment.setUint8( + ds.byteOffset + byteOffset, + value ? b | bitMask : b & ~bitMask + ); +} +function setFloat32(byteOffset, value, s, defaultMask) { + checkDataBounds(byteOffset, 4, s); + const ds = getDataSection(s); + if (defaultMask !== void 0) { + TMP_WORD.setFloat32(0, value, NATIVE_LITTLE_ENDIAN); + const v = TMP_WORD.getUint32(0, NATIVE_LITTLE_ENDIAN) ^ defaultMask.getUint32(0, true); + ds.segment.setUint32(ds.byteOffset + byteOffset, v); + return; + } + ds.segment.setFloat32(ds.byteOffset + byteOffset, value); +} +function setFloat64(byteOffset, value, s, defaultMask) { + checkDataBounds(byteOffset, 8, s); + const ds = getDataSection(s); + if (defaultMask !== void 0) { + TMP_WORD.setFloat64(0, value, NATIVE_LITTLE_ENDIAN); + const lo = TMP_WORD.getUint32(0, NATIVE_LITTLE_ENDIAN) ^ defaultMask.getUint32(0, true); + const hi = TMP_WORD.getUint32(4, NATIVE_LITTLE_ENDIAN) ^ defaultMask.getUint32(4, true); + ds.segment.setUint32(ds.byteOffset + byteOffset, lo); + ds.segment.setUint32(ds.byteOffset + byteOffset + 4, hi); + return; + } + ds.segment.setFloat64(ds.byteOffset + byteOffset, value); +} +function setInt16(byteOffset, value, s, defaultMask) { + checkDataBounds(byteOffset, 2, s); + const ds = getDataSection(s); + if (defaultMask !== void 0) { + TMP_WORD.setInt16(0, value, NATIVE_LITTLE_ENDIAN); + const v = TMP_WORD.getUint16(0, NATIVE_LITTLE_ENDIAN) ^ defaultMask.getUint16(0, true); + ds.segment.setUint16(ds.byteOffset + byteOffset, v); + return; + } + ds.segment.setInt16(ds.byteOffset + byteOffset, value); +} +function setInt32(byteOffset, value, s, defaultMask) { + checkDataBounds(byteOffset, 4, s); + const ds = getDataSection(s); + if (defaultMask !== void 0) { + TMP_WORD.setInt32(0, value, NATIVE_LITTLE_ENDIAN); + const v = TMP_WORD.getUint32(0, NATIVE_LITTLE_ENDIAN) ^ defaultMask.getUint32(0, true); + ds.segment.setUint32(ds.byteOffset + byteOffset, v); + return; + } + ds.segment.setInt32(ds.byteOffset + byteOffset, value); +} +function setInt64(byteOffset, value, s, defaultMask) { + checkDataBounds(byteOffset, 8, s); + const ds = getDataSection(s); + if (defaultMask !== void 0) { + TMP_WORD.setBigInt64(0, value, NATIVE_LITTLE_ENDIAN); + const lo = TMP_WORD.getUint32(NATIVE_LITTLE_ENDIAN ? 0 : 4, NATIVE_LITTLE_ENDIAN) ^ defaultMask.getUint32(0, true); + const hi = TMP_WORD.getUint32(NATIVE_LITTLE_ENDIAN ? 4 : 0, NATIVE_LITTLE_ENDIAN) ^ defaultMask.getUint32(4, true); + ds.segment.setUint32(ds.byteOffset + byteOffset, lo); + ds.segment.setUint32(ds.byteOffset + byteOffset + 4, hi); + return; + } + ds.segment.setInt64(ds.byteOffset + byteOffset, value); +} +function setInt8(byteOffset, value, s, defaultMask) { + checkDataBounds(byteOffset, 1, s); + const ds = getDataSection(s); + if (defaultMask !== void 0) { + TMP_WORD.setInt8(0, value); + const v = TMP_WORD.getUint8(0) ^ defaultMask.getUint8(0); + ds.segment.setUint8(ds.byteOffset + byteOffset, v); + return; + } + ds.segment.setInt8(ds.byteOffset + byteOffset, value); +} +function setText(index, value, s) { + Text.fromPointer(getPointer(index, s)).set(0, value); +} +function setUint16(byteOffset, value, s, defaultMask) { + checkDataBounds(byteOffset, 2, s); + const ds = getDataSection(s); + if (defaultMask !== void 0) value ^= defaultMask.getUint16(0, true); + ds.segment.setUint16(ds.byteOffset + byteOffset, value); +} +function setUint32(byteOffset, value, s, defaultMask) { + checkDataBounds(byteOffset, 4, s); + const ds = getDataSection(s); + if (defaultMask !== void 0) value ^= defaultMask.getUint32(0, true); + ds.segment.setUint32(ds.byteOffset + byteOffset, value); +} +function setUint64(byteOffset, value, s, defaultMask) { + checkDataBounds(byteOffset, 8, s); + const ds = getDataSection(s); + if (defaultMask !== void 0) { + TMP_WORD.setBigUint64(0, value, NATIVE_LITTLE_ENDIAN); + const lo = TMP_WORD.getUint32(NATIVE_LITTLE_ENDIAN ? 0 : 4, NATIVE_LITTLE_ENDIAN) ^ defaultMask.getUint32(0, true); + const hi = TMP_WORD.getUint32(NATIVE_LITTLE_ENDIAN ? 4 : 0, NATIVE_LITTLE_ENDIAN) ^ defaultMask.getUint32(4, true); + ds.segment.setUint32(ds.byteOffset + byteOffset, lo); + ds.segment.setUint32(ds.byteOffset + byteOffset + 4, hi); + return; + } + ds.segment.setUint64(ds.byteOffset + byteOffset, value); +} +function setUint8(byteOffset, value, s, defaultMask) { + checkDataBounds(byteOffset, 1, s); + const ds = getDataSection(s); + if (defaultMask !== void 0) value ^= defaultMask.getUint8(0); + ds.segment.setUint8(ds.byteOffset + byteOffset, value); +} +function testWhich(name, found, wanted, s) { + if (found !== wanted) { + throw new Error(format(PTR_INVALID_UNION_ACCESS, s, name, found, wanted)); + } +} +function checkDataBounds(byteOffset, byteLength, s) { + const dataByteLength = getSize(s).dataByteLength; + if (byteOffset < 0 || byteLength < 0 || byteOffset + byteLength > dataByteLength) { + throw new Error( + format( + PTR_STRUCT_DATA_OUT_OF_BOUNDS, + s, + byteLength, + byteOffset, + dataByteLength + ) + ); + } +} + +// ../../node_modules/.pnpm/capnp-es@0.0.7_typescript@5.7.3/node_modules/capnp-es/dist/shared/capnp-es.Cx0B_Qxd.mjs +var ArenaKind = /* @__PURE__ */ ((ArenaKind2) => { + ArenaKind2[ArenaKind2["SINGLE_SEGMENT"] = 0] = "SINGLE_SEGMENT"; + ArenaKind2[ArenaKind2["MULTI_SEGMENT"] = 1] = "MULTI_SEGMENT"; + return ArenaKind2; +})(ArenaKind || {}); +var ArenaAllocationResult = class { + /** + * The newly allocated buffer. This buffer might be a copy of an existing segment's buffer with free space appended. + * + * @type {ArrayBuffer} + */ + buffer; + /** + * The id of the newly-allocated segment. + * + * @type {number} + */ + id; + constructor(id, buffer) { + this.id = id; + this.buffer = buffer; + } +}; +var MultiSegmentArena = class { + constructor(buffers = [new ArrayBuffer(DEFAULT_BUFFER_SIZE)]) { + this.buffers = buffers; + let i = buffers.length; + while (--i >= 0) { + if ((buffers[i].byteLength & 7) !== 0) { + throw new Error(format(SEG_NOT_WORD_ALIGNED, buffers[i].byteLength)); + } + } + } + static allocate = allocate$2; + static getBuffer = getBuffer$2; + static getNumSegments = getNumSegments$2; + kind = ArenaKind.MULTI_SEGMENT; + toString() { + return format("MultiSegmentArena_segments:%d", getNumSegments$2(this)); + } +}; +function allocate$2(minSize, m) { + const b = new ArrayBuffer(padToWord$1(Math.max(minSize, DEFAULT_BUFFER_SIZE))); + m.buffers.push(b); + return new ArenaAllocationResult(m.buffers.length - 1, b); +} +function getBuffer$2(id, m) { + if (id < 0 || id >= m.buffers.length) { + throw new Error(format(SEG_ID_OUT_OF_BOUNDS, id)); + } + return m.buffers[id]; +} +function getNumSegments$2(m) { + return m.buffers.length; +} +var SingleSegmentArena = class { + static allocate = allocate$1; + static getBuffer = getBuffer$1; + static getNumSegments = getNumSegments$1; + buffer; + kind = ArenaKind.SINGLE_SEGMENT; + constructor(buffer = new ArrayBuffer(DEFAULT_BUFFER_SIZE)) { + if ((buffer.byteLength & 7) !== 0) { + throw new Error(format(SEG_NOT_WORD_ALIGNED, buffer.byteLength)); + } + this.buffer = buffer; + } + toString() { + return format("SingleSegmentArena_len:%x", this.buffer.byteLength); + } +}; +function allocate$1(minSize, segments, s) { + const srcBuffer = segments.length > 0 ? segments[0].buffer : s.buffer; + minSize = minSize < MIN_SINGLE_SEGMENT_GROWTH ? MIN_SINGLE_SEGMENT_GROWTH : padToWord$1(minSize); + s.buffer = new ArrayBuffer(srcBuffer.byteLength + minSize); + new Float64Array(s.buffer).set(new Float64Array(srcBuffer)); + return new ArenaAllocationResult(0, s.buffer); +} +function getBuffer$1(id, s) { + if (id !== 0) throw new Error(format(SEG_GET_NON_ZERO_SINGLE, id)); + return s.buffer; +} +function getNumSegments$1() { + return 1; +} +var Arena = class { + static allocate = allocate; + static copy = copy$1; + static getBuffer = getBuffer; + static getNumSegments = getNumSegments; +}; +function allocate(minSize, segments, a) { + switch (a.kind) { + case ArenaKind.MULTI_SEGMENT: { + return MultiSegmentArena.allocate(minSize, a); + } + case ArenaKind.SINGLE_SEGMENT: { + return SingleSegmentArena.allocate(minSize, segments, a); + } + default: { + return assertNever(a); + } + } +} +function copy$1(a) { + switch (a.kind) { + case ArenaKind.MULTI_SEGMENT: { + let i = a.buffers.length; + const buffers = Array.from({ length: i }); + while (--i >= 0) { + buffers[i] = a.buffers[i].slice(0); + } + return new MultiSegmentArena(buffers); + } + case ArenaKind.SINGLE_SEGMENT: { + return new SingleSegmentArena(a.buffer.slice(0)); + } + default: { + return assertNever(a); + } + } +} +function getBuffer(id, a) { + switch (a.kind) { + case ArenaKind.MULTI_SEGMENT: { + return MultiSegmentArena.getBuffer(id, a); + } + case ArenaKind.SINGLE_SEGMENT: { + return SingleSegmentArena.getBuffer(id, a); + } + default: { + return assertNever(a); + } + } +} +function getNumSegments(a) { + switch (a.kind) { + case ArenaKind.MULTI_SEGMENT: { + return MultiSegmentArena.getNumSegments(a); + } + case ArenaKind.SINGLE_SEGMENT: { + return SingleSegmentArena.getNumSegments(); + } + default: { + return assertNever(a); + } + } +} +function getHammingWeight(x) { + let w = x - (x >> 1 & 1431655765); + w = (w & 858993459) + (w >> 2 & 858993459); + return (w + (w >> 4) & 252645135) * 16843009 >> 24; +} +function getTagByte(a, b, c, d, e, f, g, h) { + return (a === 0 ? 0 : 1) | (b === 0 ? 0 : 2) | (c === 0 ? 0 : 4) | (d === 0 ? 0 : 8) | (e === 0 ? 0 : 16) | (f === 0 ? 0 : 32) | (g === 0 ? 0 : 64) | (h === 0 ? 0 : 128); +} +function getUnpackedByteLength(packed) { + const p = new Uint8Array(packed); + let wordCount = 0; + let lastTag = 119; + for (let i = 0; i < p.byteLength; ) { + const tag = p[i]; + if (lastTag === 0) { + wordCount += tag; + i++; + lastTag = 119; + } else if (lastTag === 255) { + wordCount += tag; + i += tag * 8 + 1; + lastTag = 119; + } else { + wordCount++; + i += getHammingWeight(tag) + 1; + lastTag = tag; + } + } + return wordCount * 8; +} +function getZeroByteCount(a, b, c, d, e, f, g, h) { + return (a === 0 ? 1 : 0) + (b === 0 ? 1 : 0) + (c === 0 ? 1 : 0) + (d === 0 ? 1 : 0) + (e === 0 ? 1 : 0) + (f === 0 ? 1 : 0) + (g === 0 ? 1 : 0) + (h === 0 ? 1 : 0); +} +function pack(unpacked, byteOffset = 0, byteLength) { + if (unpacked.byteLength % 8 !== 0) throw new Error(MSG_PACK_NOT_WORD_ALIGNED); + const src = new Uint8Array(unpacked, byteOffset, byteLength); + const dst = []; + let lastTag = 119; + let spanWordCountOffset = 0; + let rangeWordCount = 0; + for (let srcByteOffset = 0; srcByteOffset < src.byteLength; srcByteOffset += 8) { + const a = src[srcByteOffset]; + const b = src[srcByteOffset + 1]; + const c = src[srcByteOffset + 2]; + const d = src[srcByteOffset + 3]; + const e = src[srcByteOffset + 4]; + const f = src[srcByteOffset + 5]; + const g = src[srcByteOffset + 6]; + const h = src[srcByteOffset + 7]; + const tag = getTagByte(a, b, c, d, e, f, g, h); + let skipWriteWord = true; + switch (lastTag) { + case 0: { + if (tag !== 0 || rangeWordCount >= 255) { + dst.push(rangeWordCount); + rangeWordCount = 0; + skipWriteWord = false; + } else { + rangeWordCount++; + } + break; + } + case 255: { + const zeroCount = getZeroByteCount(a, b, c, d, e, f, g, h); + if (zeroCount >= PACK_SPAN_THRESHOLD || rangeWordCount >= 255) { + dst[spanWordCountOffset] = rangeWordCount; + rangeWordCount = 0; + skipWriteWord = false; + } else { + dst.push(a, b, c, d, e, f, g, h); + rangeWordCount++; + } + break; + } + default: { + skipWriteWord = false; + break; + } + } + if (skipWriteWord) continue; + dst.push(tag); + lastTag = tag; + if (a !== 0) dst.push(a); + if (b !== 0) dst.push(b); + if (c !== 0) dst.push(c); + if (d !== 0) dst.push(d); + if (e !== 0) dst.push(e); + if (f !== 0) dst.push(f); + if (g !== 0) dst.push(g); + if (h !== 0) dst.push(h); + if (tag === 255) { + spanWordCountOffset = dst.length; + dst.push(0); + } + } + if (lastTag === 0) { + dst.push(rangeWordCount); + } else if (lastTag === 255) { + dst[spanWordCountOffset] = rangeWordCount; + } + return new Uint8Array(dst).buffer; +} +function unpack(packed) { + const src = new Uint8Array(packed); + const dst = new Uint8Array(new ArrayBuffer(getUnpackedByteLength(packed))); + let lastTag = 119; + for (let srcByteOffset = 0, dstByteOffset = 0; srcByteOffset < src.byteLength; ) { + const tag = src[srcByteOffset]; + if (lastTag === 0) { + dstByteOffset += tag * 8; + srcByteOffset++; + lastTag = 119; + } else if (lastTag === 255) { + const spanByteLength = tag * 8; + dst.set( + src.subarray(srcByteOffset + 1, srcByteOffset + 1 + spanByteLength), + dstByteOffset + ); + dstByteOffset += spanByteLength; + srcByteOffset += 1 + spanByteLength; + lastTag = 119; + } else { + srcByteOffset++; + for (let i = 1; i <= 128; i <<= 1) { + if ((tag & i) !== 0) dst[dstByteOffset] = src[srcByteOffset++]; + dstByteOffset++; + } + lastTag = tag; + } + } + return dst.buffer; +} +var Segment = class { + buffer; + /** The number of bytes currently allocated in the segment. */ + byteLength; + /** + * This value should always be zero. It's only here to satisfy the DataView interface. + * + * In the future the Segment implementation (or a child class) may allow accessing the buffer from a nonzero offset, + * but that adds a lot of extra arithmetic. + */ + byteOffset; + [Symbol.toStringTag] = "Segment"; + id; + message; + _dv; + constructor(id, message, buffer, byteLength = 0) { + this.id = id; + this.message = message; + this.buffer = buffer; + this._dv = new DataView(buffer); + this.byteOffset = 0; + this.byteLength = byteLength; + } + /** + * Attempt to allocate the requested number of bytes in this segment. If this segment is full this method will return + * a pointer to freshly allocated space in another segment from the same message. + * + * @param {number} byteLength The number of bytes to allocate, will be rounded up to the nearest word. + * @returns {Pointer} A pointer to the newly allocated space. + */ + allocate(byteLength) { + let segment = this; + byteLength = padToWord$1(byteLength); + if (byteLength > MAX_SEGMENT_LENGTH - 8) { + throw new Error(format(SEG_SIZE_OVERFLOW, byteLength)); + } + if (!segment.hasCapacity(byteLength)) { + segment = segment.message.allocateSegment(byteLength); + } + const byteOffset = segment.byteLength; + segment.byteLength = segment.byteLength + byteLength; + return new Pointer(segment, byteOffset); + } + /** + * Quickly copy a word (8 bytes) from `srcSegment` into this one at the given offset. + * + * @param {number} byteOffset The offset to write the word to. + * @param {Segment} srcSegment The segment to copy the word from. + * @param {number} srcByteOffset The offset from the start of `srcSegment` to copy from. + * @returns {void} + */ + copyWord(byteOffset, srcSegment, srcByteOffset) { + const value = srcSegment._dv.getFloat64( + srcByteOffset, + NATIVE_LITTLE_ENDIAN + ); + this._dv.setFloat64(byteOffset, value, NATIVE_LITTLE_ENDIAN); + } + /** + * Quickly copy words from `srcSegment` into this one. + * + * @param {number} byteOffset The offset to start copying into. + * @param {Segment} srcSegment The segment to copy from. + * @param {number} srcByteOffset The start offset to copy from. + * @param {number} wordLength The number of words to copy. + * @returns {void} + */ + copyWords(byteOffset, srcSegment, srcByteOffset, wordLength) { + const dst = new Float64Array(this.buffer, byteOffset, wordLength); + const src = new Float64Array(srcSegment.buffer, srcByteOffset, wordLength); + dst.set(src); + } + /** + * Quickly fill a number of words in the buffer with zeroes. + * + * @param {number} byteOffset The first byte to set to zero. + * @param {number} wordLength The number of words (not bytes!) to zero out. + * @returns {void} + */ + fillZeroWords(byteOffset, wordLength) { + new Float64Array(this.buffer, byteOffset, wordLength).fill(0); + } + getBigInt64(byteOffset, littleEndian) { + return this._dv.getBigInt64(byteOffset, littleEndian); + } + getBigUint64(byteOffset, littleEndian) { + return this._dv.getBigUint64(byteOffset, littleEndian); + } + /** + * Get the total number of bytes available in this segment (the size of its underlying buffer). + * + * @returns {number} The total number of bytes this segment can hold. + */ + getCapacity() { + return this.buffer.byteLength; + } + /** + * Read a float32 value out of this segment. + * + * @param {number} byteOffset The offset in bytes to the value. + * @returns {number} The value. + */ + getFloat32(byteOffset) { + return this._dv.getFloat32(byteOffset, true); + } + /** + * Read a float64 value out of this segment. + * + * @param {number} byteOffset The offset in bytes to the value. + * @returns {number} The value. + */ + getFloat64(byteOffset) { + return this._dv.getFloat64(byteOffset, true); + } + /** + * Read an int16 value out of this segment. + * + * @param {number} byteOffset The offset in bytes to the value. + * @returns {number} The value. + */ + getInt16(byteOffset) { + return this._dv.getInt16(byteOffset, true); + } + /** + * Read an int32 value out of this segment. + * + * @param {number} byteOffset The offset in bytes to the value. + * @returns {number} The value. + */ + getInt32(byteOffset) { + return this._dv.getInt32(byteOffset, true); + } + /** + * Read an int64 value out of this segment. + * + * @param {number} byteOffset The offset in bytes to the value. + * @returns {number} The value. + */ + getInt64(byteOffset) { + return this._dv.getBigInt64(byteOffset, true); + } + /** + * Read an int8 value out of this segment. + * + * @param {number} byteOffset The offset in bytes to the value. + * @returns {number} The value. + */ + getInt8(byteOffset) { + return this._dv.getInt8(byteOffset); + } + /** + * Read a uint16 value out of this segment. + * + * @param {number} byteOffset The offset in bytes to the value. + * @returns {number} The value. + */ + getUint16(byteOffset) { + return this._dv.getUint16(byteOffset, true); + } + /** + * Read a uint32 value out of this segment. + * + * @param {number} byteOffset The offset in bytes to the value. + * @returns {number} The value. + */ + getUint32(byteOffset) { + return this._dv.getUint32(byteOffset, true); + } + /** + * Read a uint64 value (as a bigint) out of this segment. + * NOTE: this does not copy the memory region, so updates to the underlying buffer will affect the returned value! + * + * @param {number} byteOffset The offset in bytes to the value. + * @returns {number} The value. + */ + getUint64(byteOffset) { + return this._dv.getBigUint64(byteOffset, true); + } + /** + * Read a uint8 value out of this segment. + * + * @param {number} byteOffset The offset in bytes to the value. + * @returns {number} The value. + */ + getUint8(byteOffset) { + return this._dv.getUint8(byteOffset); + } + hasCapacity(byteLength) { + return this.buffer.byteLength - this.byteLength >= byteLength; + } + /** + * Quickly check the word at the given offset to see if it is equal to zero. + * + * PERF_V8: Fastest way to do this is by reading the whole word as a `number` (float64) in the _native_ endian format + * and see if it's zero. + * + * Benchmark: http://jsben.ch/#/Pjooc + * + * @param {number} byteOffset The offset to the word. + * @returns {boolean} `true` if the word is zero. + */ + isWordZero(byteOffset) { + return this._dv.getFloat64(byteOffset, NATIVE_LITTLE_ENDIAN) === 0; + } + /** + * Swap out this segment's underlying buffer with a new one. It's assumed that the new buffer has the same content but + * more free space, otherwise all existing pointers to this segment will be hilariously broken. + * + * @param {ArrayBuffer} buffer The new buffer to use. + * @returns {void} + */ + replaceBuffer(buffer) { + if (this.buffer === buffer) return; + if (buffer.byteLength < this.byteLength) { + throw new Error(SEG_REPLACEMENT_BUFFER_TOO_SMALL); + } + this._dv = new DataView(buffer); + this.buffer = buffer; + } + setBigInt64(byteOffset, value, littleEndian) { + this._dv.setBigInt64(byteOffset, value, littleEndian); + } + /** WARNING: This function is not yet implemented. */ + setBigUint64(byteOffset, value, littleEndian) { + this._dv.setBigUint64(byteOffset, value, littleEndian); + } + /** + * Write a float32 value to the specified offset. + * + * @param {number} byteOffset The offset from the beginning of the buffer. + * @param {number} val The value to store. + * @returns {void} + */ + setFloat32(byteOffset, val) { + this._dv.setFloat32(byteOffset, val, true); + } + /** + * Write an float64 value to the specified offset. + * + * @param {number} byteOffset The offset from the beginning of the buffer. + * @param {number} val The value to store. + * @returns {void} + */ + setFloat64(byteOffset, val) { + this._dv.setFloat64(byteOffset, val, true); + } + /** + * Write an int16 value to the specified offset. + * + * @param {number} byteOffset The offset from the beginning of the buffer. + * @param {number} val The value to store. + * @returns {void} + */ + setInt16(byteOffset, val) { + this._dv.setInt16(byteOffset, val, true); + } + /** + * Write an int32 value to the specified offset. + * + * @param {number} byteOffset The offset from the beginning of the buffer. + * @param {number} val The value to store. + * @returns {void} + */ + setInt32(byteOffset, val) { + this._dv.setInt32(byteOffset, val, true); + } + /** + * Write an int8 value to the specified offset. + * + * @param {number} byteOffset The offset from the beginning of the buffer. + * @param {number} val The value to store. + * @returns {void} + */ + setInt8(byteOffset, val) { + this._dv.setInt8(byteOffset, val); + } + /** + * Write an int64 value to the specified offset. + * + * @param {number} byteOffset The offset from the beginning of the buffer. + * @param {bigint} val The value to store. + * @returns {void} + */ + setInt64(byteOffset, val) { + this._dv.setBigInt64(byteOffset, val, true); + } + /** + * Write a uint16 value to the specified offset. + * + * @param {number} byteOffset The offset from the beginning of the buffer. + * @param {number} val The value to store. + * @returns {void} + */ + setUint16(byteOffset, val) { + this._dv.setUint16(byteOffset, val, true); + } + /** + * Write a uint32 value to the specified offset. + * + * @param {number} byteOffset The offset from the beginning of the buffer. + * @param {number} val The value to store. + * @returns {void} + */ + setUint32(byteOffset, val) { + this._dv.setUint32(byteOffset, val, true); + } + /** + * Write a uint64 value to the specified offset. + * + * @param {number} byteOffset The offset from the beginning of the buffer. + * @param {bigint} val The value to store. + * @returns {void} + */ + setUint64(byteOffset, val) { + this._dv.setBigUint64(byteOffset, val, true); + } + /** + * Write a uint8 (byte) value to the specified offset. + * + * @param {number} byteOffset The offset from the beginning of the buffer. + * @param {number} val The value to store. + * @returns {void} + */ + setUint8(byteOffset, val) { + this._dv.setUint8(byteOffset, val); + } + /** + * Write a zero word (8 bytes) to the specified offset. This is slightly faster than calling `setUint64` or + * `setFloat64` with a zero value. + * + * Benchmark: http://jsben.ch/#/dUdPI + * + * @param {number} byteOffset The offset of the word to set to zero. + * @returns {void} + */ + setWordZero(byteOffset) { + this._dv.setFloat64(byteOffset, 0, NATIVE_LITTLE_ENDIAN); + } + toString() { + return format( + "Segment_id:%d,off:%a,len:%a,cap:%a", + this.id, + this.byteLength, + this.byteOffset, + this.buffer.byteLength + ); + } +}; +var Message = class { + static allocateSegment = allocateSegment; + static dump = dump2; + static getRoot = getRoot; + static getSegment = getSegment; + static initRoot = initRoot; + static readRawPointer = readRawPointer; + static toArrayBuffer = toArrayBuffer; + static toPackedArrayBuffer = toPackedArrayBuffer; + _capnp; + /** + * A Cap'n Proto message. + * + * SECURITY WARNING: In Node.js do not pass a Buffer's internal array buffer into this constructor. Pass the buffer + * directly and everything will be fine. If not, your message will potentially be initialized with random memory + * contents! + * + * The constructor method creates a new Message, optionally using a provided arena for segment allocation, or a buffer + * to read from. + * + * @constructor {Message} + * + * @param {AnyArena|ArrayBufferView|ArrayBuffer} [src] The source for the message. + * A value of `undefined` will cause the message to initialize with a single segment arena only big enough for the + * root pointer; it will expand as you go. This is a reasonable choice for most messages. + * + * Passing an arena will cause the message to use that arena for its segment allocation. Contents will be accepted + * as-is. + * + * Passing an array buffer view (like `DataView`, `Uint8Array` or `Buffer`) will create a **copy** of the source + * buffer; beware of the potential performance cost! + * + * @param {boolean} [packed] Whether or not the message is packed. If `true` (the default), the message will be + * unpacked. + * + * @param {boolean} [singleSegment] If true, `src` will be treated as a message consisting of a single segment without + * a framing header. + * + */ + constructor(src, packed = true, singleSegment = false) { + this._capnp = initMessage(src, packed, singleSegment); + if (src) preallocateSegments(this); + } + allocateSegment(byteLength) { + return allocateSegment(byteLength, this); + } + /** + * Copies the contents of this message into an identical message with its own ArrayBuffers. + * + * @returns A copy of this message. + */ + copy() { + return copy(this); + } + /** + * Create a pretty-printed string dump of this message; incredibly useful for debugging. + * + * WARNING: Do not call this method on large messages! + * + * @returns {string} A big steaming pile of pretty hex digits. + */ + dump() { + return dump2(this); + } + /** + * Get a struct pointer for the root of this message. This is primarily used when reading a message; it will not + * overwrite existing data. + * + * @template T + * @param {StructCtor} RootStruct The struct type to use as the root. + * @returns {T} A struct representing the root of the message. + */ + getRoot(RootStruct) { + return getRoot(RootStruct, this); + } + /** + * Get a segment by its id. + * + * This will lazily allocate the first segment if it doesn't already exist. + * + * @param {number} id The segment id. + * @returns {Segment} The requested segment. + */ + getSegment(id) { + return getSegment(id, this); + } + /** + * Initialize a new message using the provided struct type as the root. + * + * @template T + * @param {StructCtor} RootStruct The struct type to use as the root. + * @returns {T} An initialized struct pointing to the root of the message. + */ + initRoot(RootStruct) { + return initRoot(RootStruct, this); + } + /** + * Set the root of the message to a copy of the given pointer. Used internally + * to make copies of pointers for default values. + * + * @param {Pointer} src The source pointer to copy. + * @returns {void} + */ + setRoot(src) { + setRoot(src, this); + } + /** + * Combine the contents of this message's segments into a single array buffer and prepend a stream framing header + * containing information about the following segment data. + * + * @returns {ArrayBuffer} An ArrayBuffer with the contents of this message. + */ + toArrayBuffer() { + return toArrayBuffer(this); + } + /** + * Like `toArrayBuffer()`, but also applies the packing algorithm to the output. This is typically what you want to + * use if you're sending the message over a network link or other slow I/O interface where size matters. + * + * @returns {ArrayBuffer} A packed message. + */ + toPackedArrayBuffer() { + return toPackedArrayBuffer(this); + } + addCap(client) { + if (!this._capnp.capTable) { + this._capnp.capTable = []; + } + const id = this._capnp.capTable.length; + this._capnp.capTable.push(client); + return id; + } + toString() { + return `Message_arena:${this._capnp.arena}`; + } +}; +function initMessage(src, packed = true, singleSegment = false) { + if (src === void 0) { + return { + arena: new SingleSegmentArena(), + segments: [], + traversalLimit: DEFAULT_TRAVERSE_LIMIT + }; + } + if (isAnyArena(src)) { + return { arena: src, segments: [], traversalLimit: DEFAULT_TRAVERSE_LIMIT }; + } + let buf = src; + if (isArrayBufferView(buf)) { + buf = buf.buffer.slice( + buf.byteOffset, + buf.byteOffset + buf.byteLength + ); + } + if (packed) buf = unpack(buf); + if (singleSegment) { + return { + arena: new SingleSegmentArena(buf), + segments: [], + traversalLimit: DEFAULT_TRAVERSE_LIMIT + }; + } + return { + arena: new MultiSegmentArena(getFramedSegments(buf)), + segments: [], + traversalLimit: DEFAULT_TRAVERSE_LIMIT + }; +} +function getFramedSegments(message) { + const dv = new DataView(message); + const segmentCount = dv.getUint32(0, true) + 1; + const segments = Array.from({ length: segmentCount }); + let byteOffset = 4 + segmentCount * 4; + byteOffset += byteOffset % 8; + if (byteOffset + segmentCount * 4 > message.byteLength) { + throw new Error(MSG_INVALID_FRAME_HEADER); + } + for (let i = 0; i < segmentCount; i++) { + const byteLength = dv.getUint32(4 + i * 4, true) * 8; + if (byteOffset + byteLength > message.byteLength) { + throw new Error(MSG_INVALID_FRAME_HEADER); + } + segments[i] = message.slice(byteOffset, byteOffset + byteLength); + byteOffset += byteLength; + } + return segments; +} +function preallocateSegments(m) { + const numSegments = Arena.getNumSegments(m._capnp.arena); + m._capnp.segments = Array.from({ length: numSegments }); + for (let i = 0; i < numSegments; i++) { + if (i === 0 && Arena.getBuffer(i, m._capnp.arena).byteLength < 8) { + throw new Error(MSG_SEGMENT_TOO_SMALL); + } + const buffer = Arena.getBuffer(i, m._capnp.arena); + const segment = new Segment(i, m, buffer, buffer.byteLength); + m._capnp.segments[i] = segment; + } +} +function isArrayBufferView(src) { + return src.byteOffset !== void 0; +} +function isAnyArena(o) { + return o.kind !== void 0; +} +function allocateSegment(byteLength, m) { + const res = Arena.allocate(byteLength, m._capnp.segments, m._capnp.arena); + let s; + if (res.id === m._capnp.segments.length) { + s = new Segment(res.id, m, res.buffer); + m._capnp.segments.push(s); + } else if (res.id < 0 || res.id > m._capnp.segments.length) { + throw new Error(format(MSG_SEGMENT_OUT_OF_BOUNDS, res.id, m)); + } else { + s = m._capnp.segments[res.id]; + s.replaceBuffer(res.buffer); + } + return s; +} +function dump2(m) { + let r = ""; + if (m._capnp.segments.length === 0) { + return "================\nNo Segments\n================\n"; + } + for (let i = 0; i < m._capnp.segments.length; i++) { + r += `================ +Segment #${i} +================ +`; + const { buffer, byteLength } = m._capnp.segments[i]; + const b = new Uint8Array(buffer, 0, byteLength); + r += dumpBuffer(b); + } + return r; +} +function getRoot(RootStruct, m) { + const root = new RootStruct(m.getSegment(0), 0); + validate(PointerType.STRUCT, root); + const ts = getTargetStructSize(root); + if (ts.dataByteLength < RootStruct._capnp.size.dataByteLength || ts.pointerLength < RootStruct._capnp.size.pointerLength) { + resize(RootStruct._capnp.size, root); + } + return root; +} +function getSegment(id, m) { + const segmentLength = m._capnp.segments.length; + if (id === 0 && segmentLength === 0) { + const arenaSegments = Arena.getNumSegments(m._capnp.arena); + if (arenaSegments === 0) { + allocateSegment(DEFAULT_BUFFER_SIZE, m); + } else { + m._capnp.segments[0] = new Segment( + 0, + m, + Arena.getBuffer(0, m._capnp.arena) + ); + } + if (!m._capnp.segments[0].hasCapacity(8)) { + throw new Error(MSG_SEGMENT_TOO_SMALL); + } + m._capnp.segments[0].allocate(8); + return m._capnp.segments[0]; + } + if (id < 0 || id >= segmentLength) { + throw new Error(format(MSG_SEGMENT_OUT_OF_BOUNDS, id, m)); + } + return m._capnp.segments[id]; +} +function initRoot(RootStruct, m) { + const root = new RootStruct(m.getSegment(0), 0); + initStruct(RootStruct._capnp.size, root); + return root; +} +function readRawPointer(data) { + return new Pointer(new Message(data).getSegment(0), 0); +} +function setRoot(src, m) { + copyFrom(src, new Pointer(m.getSegment(0), 0)); +} +function toArrayBuffer(m) { + const streamFrame = getStreamFrame(m); + if (m._capnp.segments.length === 0) getSegment(0, m); + const segments = m._capnp.segments; + const totalLength = streamFrame.byteLength + segments.reduce((l, s) => l + padToWord$1(s.byteLength), 0); + const out = new Uint8Array(new ArrayBuffer(totalLength)); + let o = streamFrame.byteLength; + out.set(new Uint8Array(streamFrame)); + for (const s of segments) { + const segmentLength = padToWord$1(s.byteLength); + out.set(new Uint8Array(s.buffer, 0, segmentLength), o); + o += segmentLength; + } + return out.buffer; +} +function toPackedArrayBuffer(m) { + const streamFrame = pack(getStreamFrame(m)); + if (m._capnp.segments.length === 0) m.getSegment(0); + const segments = m._capnp.segments.map( + (s) => pack(s.buffer, 0, padToWord$1(s.byteLength)) + ); + const totalLength = streamFrame.byteLength + segments.reduce((l, s) => l + s.byteLength, 0); + const out = new Uint8Array(new ArrayBuffer(totalLength)); + let o = streamFrame.byteLength; + out.set(new Uint8Array(streamFrame)); + for (const s of segments) { + out.set(new Uint8Array(s), o); + o += s.byteLength; + } + return out.buffer; +} +function getStreamFrame(m) { + const length = m._capnp.segments.length; + if (length === 0) { + return new Float64Array(1).buffer; + } + const frameLength = 4 + length * 4 + (1 - length % 2) * 4; + const out = new DataView(new ArrayBuffer(frameLength)); + out.setUint32(0, length - 1, true); + for (const [i, s] of m._capnp.segments.entries()) { + out.setUint32(i * 4 + 4, s.byteLength / 8, true); + } + return out.buffer; +} +function copy(m) { + return new Message(Arena.copy(m._capnp.arena)); +} + +// ../../node_modules/.pnpm/capnp-es@0.0.7_typescript@5.7.3/node_modules/capnp-es/dist/shared/capnp-es.DCKndyix.mjs +function CompositeList(CompositeClass) { + return class extends List { + static _capnp = { + compositeSize: CompositeClass._capnp.size, + displayName: `List<${CompositeClass._capnp.displayName}>`, + size: ListElementSize.COMPOSITE + }; + get(index) { + return new CompositeClass( + this.segment, + this.byteOffset, + this._capnp.depthLimit - 1, + index + ); + } + set(index, value) { + copyFrom(value, this.get(index)); + } + [Symbol.toStringTag]() { + return `Composite_${super.toString()},cls:${CompositeClass.toString()}`; + } + }; +} +function _makePrimitiveMaskFn(byteLength, setter) { + return (x) => { + const dv = new DataView(new ArrayBuffer(byteLength)); + setter.call(dv, 0, x, true); + return dv; + }; +} +var getFloat32Mask = _makePrimitiveMaskFn( + 4, + DataView.prototype.setFloat32 +); +var getFloat64Mask = _makePrimitiveMaskFn( + 8, + DataView.prototype.setFloat64 +); +var getInt16Mask = _makePrimitiveMaskFn( + 2, + DataView.prototype.setInt16 +); +var getInt32Mask = _makePrimitiveMaskFn( + 4, + DataView.prototype.setInt32 +); +var getInt64Mask = _makePrimitiveMaskFn( + 8, + DataView.prototype.setBigInt64 +); +var getInt8Mask = _makePrimitiveMaskFn(1, DataView.prototype.setInt8); +var getUint16Mask = _makePrimitiveMaskFn( + 2, + DataView.prototype.setUint16 +); +var getUint32Mask = _makePrimitiveMaskFn( + 4, + DataView.prototype.setUint32 +); +var getUint64Mask = _makePrimitiveMaskFn( + 8, + DataView.prototype.setBigUint64 +); +var getUint8Mask = _makePrimitiveMaskFn( + 1, + DataView.prototype.setUint8 +); +function getBitMask(value, bitOffset) { + const dv = new DataView(new ArrayBuffer(1)); + if (!value) return dv; + dv.setUint8(0, 1 << bitOffset % 8); + return dv; +} + +// ../../node_modules/.pnpm/capnp-es@0.0.7_typescript@5.7.3/node_modules/capnp-es/dist/shared/capnp-es.B1ADXvSS.mjs +var Interface = class extends Pointer { + static _capnp = { + displayName: "Interface" + }; + static getCapID = getCapID; + static getAsInterface = getAsInterface; + static isInterface = isInterface; + static getClient = getClient; + constructor(segment, byteOffset, depthLimit = MAX_DEPTH) { + super(segment, byteOffset, depthLimit); + } + static fromPointer(p) { + return getAsInterface(p); + } + getCapId() { + return getCapID(this); + } + getClient() { + return getClient(this); + } + [Symbol.for("nodejs.util.inspect.custom")]() { + return format( + "Interface_%d@%a,%d,limit:%x", + this.segment.id, + this.byteOffset, + this.getCapId(), + this._capnp.depthLimit + ); + } +}; +function getAsInterface(p) { + if (getTargetPointerType(p) === PointerType.OTHER) { + return new Interface(p.segment, p.byteOffset, p._capnp.depthLimit); + } + return null; +} +function isInterface(p) { + return getTargetPointerType(p) === PointerType.OTHER; +} +function getCapID(i) { + if (i.segment.getUint32(i.byteOffset) !== PointerType.OTHER) { + return -1; + } + return i.segment.getUint32(i.byteOffset + 4); +} +function getClient(i) { + const capID = getCapID(i); + const { capTable } = i.segment.message._capnp; + if (!capTable) { + return null; + } + return capTable[capID]; +} + +// ../../node_modules/.pnpm/capnp-es@0.0.7_typescript@5.7.3/node_modules/capnp-es/dist/index.mjs +var Void = class extends Struct { + static _capnp = { + displayName: "Void", + id: "0", + size: new ObjectSize(0, 0) + }; +}; +var utils = { + __proto__: null, + PointerAllocationResult, + add, + adopt, + checkDataBounds, + checkPointerBounds, + copyFrom, + copyFromInterface, + copyFromList, + copyFromStruct, + disown, + dump, + erase, + erasePointer, + followFar, + followFars, + getAs, + getBit, + getCapabilityId, + getContent, + getData, + getDataSection, + getFarSegmentId, + getFloat32, + getFloat64, + getInt16, + getInt32, + getInt64, + getInt8, + getInterfaceClientOrNull, + getInterfaceClientOrNullAt, + getInterfacePointer, + getList, + getListByteLength, + getListElementByteLength, + getListElementSize, + getListLength, + getOffsetWords, + getPointer, + getPointerAs, + getPointerSection, + getPointerType, + getSize, + getStruct, + getStructDataWords, + getStructPointerLength, + getStructSize, + getTargetCompositeListSize, + getTargetCompositeListTag, + getTargetListElementSize, + getTargetListLength, + getTargetPointerType, + getTargetStructSize, + getText, + getUint16, + getUint32, + getUint64, + getUint8, + initData, + initList, + initPointer, + initStruct, + initStructAt, + isDoubleFar, + isNull, + relocateTo, + resize, + setBit, + setFarPointer, + setFloat32, + setFloat64, + setInt16, + setInt32, + setInt64, + setInt8, + setInterfacePointer, + setListPointer, + setStructPointer, + setText, + setUint16, + setUint32, + setUint64, + setUint8, + testWhich, + trackPointerAllocation, + validate +}; +function PointerList(PointerClass) { + return class extends List { + static _capnp = { + displayName: `List<${PointerClass._capnp.displayName}>`, + size: ListElementSize.POINTER + }; + get(index) { + const c = getContent(this); + return new PointerClass( + c.segment, + c.byteOffset + index * 8, + this._capnp.depthLimit - 1 + ); + } + set(index, value) { + copyFrom(value, this.get(index)); + } + [Symbol.toStringTag]() { + return `Pointer_${super.toString()},cls:${PointerClass.toString()}`; + } + }; +} +var AnyPointerList = PointerList(Pointer); +var BoolList = class extends List { + static _capnp = { + displayName: "List", + size: ListElementSize.BIT + }; + get(index) { + const bitMask = 1 << index % 8; + const byteOffset = index >>> 3; + const c = getContent(this); + const v = c.segment.getUint8(c.byteOffset + byteOffset); + return (v & bitMask) !== 0; + } + set(index, value) { + const bitMask = 1 << index % 8; + const c = getContent(this); + const byteOffset = c.byteOffset + (index >>> 3); + const v = c.segment.getUint8(byteOffset); + c.segment.setUint8(byteOffset, value ? v | bitMask : v & ~bitMask); + } + [Symbol.toStringTag]() { + return `Bool_${super.toString()}`; + } +}; +var DataList = PointerList(Data); +var Float32List = class extends List { + static _capnp = { + displayName: "List", + size: ListElementSize.BYTE_4 + }; + get(index) { + const c = getContent(this); + return c.segment.getFloat32(c.byteOffset + index * 4); + } + set(index, value) { + const c = getContent(this); + c.segment.setFloat32(c.byteOffset + index * 4, value); + } + [Symbol.toStringTag]() { + return `Float32_${super.toString()}`; + } +}; +var Float64List = class extends List { + static _capnp = { + displayName: "List", + size: ListElementSize.BYTE_8 + }; + get(index) { + const c = getContent(this); + return c.segment.getFloat64(c.byteOffset + index * 8); + } + set(index, value) { + const c = getContent(this); + c.segment.setFloat64(c.byteOffset + index * 8, value); + } + [Symbol.toStringTag]() { + return `Float64_${super.toString()}`; + } +}; +var Int8List = class extends List { + static _capnp = { + displayName: "List", + size: ListElementSize.BYTE + }; + get(index) { + const c = getContent(this); + return c.segment.getInt8(c.byteOffset + index); + } + set(index, value) { + const c = getContent(this); + c.segment.setInt8(c.byteOffset + index, value); + } + [Symbol.toStringTag]() { + return `Int8_${super.toString()}`; + } +}; +var Int16List = class extends List { + static _capnp = { + displayName: "List", + size: ListElementSize.BYTE_2 + }; + get(index) { + const c = getContent(this); + return c.segment.getInt16(c.byteOffset + index * 2); + } + set(index, value) { + const c = getContent(this); + c.segment.setInt16(c.byteOffset + index * 2, value); + } + [Symbol.toStringTag]() { + return `Int16_${super.toString()}`; + } +}; +var Int32List = class extends List { + static _capnp = { + displayName: "List", + size: ListElementSize.BYTE_4 + }; + get(index) { + const c = getContent(this); + return c.segment.getInt32(c.byteOffset + index * 4); + } + set(index, value) { + const c = getContent(this); + c.segment.setInt32(c.byteOffset + index * 4, value); + } + [Symbol.toStringTag]() { + return `Int32_${super.toString()}`; + } +}; +var Int64List = class extends List { + static _capnp = { + displayName: "List", + size: ListElementSize.BYTE_8 + }; + get(index) { + const c = getContent(this); + return c.segment.getInt64(c.byteOffset + index * 8); + } + set(index, value) { + const c = getContent(this); + c.segment.setInt64(c.byteOffset + index * 8, value); + } + [Symbol.toStringTag]() { + return `Int64_${super.toString()}`; + } +}; +var InterfaceList = PointerList(Interface); +var TextList = class extends List { + static _capnp = { + displayName: "List", + size: ListElementSize.POINTER + }; + get(index) { + const c = getContent(this); + c.byteOffset += index * 8; + return Text.fromPointer(c).get(0); + } + set(index, value) { + const c = getContent(this); + c.byteOffset += index * 8; + Text.fromPointer(c).set(0, value); + } + [Symbol.toStringTag]() { + return `Text_${super.toString()}`; + } +}; +var Uint8List = class extends List { + static _capnp = { + displayName: "List", + size: ListElementSize.BYTE + }; + get(index) { + const c = getContent(this); + return c.segment.getUint8(c.byteOffset + index); + } + set(index, value) { + const c = getContent(this); + c.segment.setUint8(c.byteOffset + index, value); + } + [Symbol.toStringTag]() { + return `Uint8_${super.toString()}`; + } +}; +var Uint16List = class extends List { + static _capnp = { + displayName: "List", + size: ListElementSize.BYTE_2 + }; + get(index) { + const c = getContent(this); + return c.segment.getUint16(c.byteOffset + index * 2); + } + set(index, value) { + const c = getContent(this); + c.segment.setUint16(c.byteOffset + index * 2, value); + } + [Symbol.toStringTag]() { + return `Uint16_${super.toString()}`; + } +}; +var Uint32List = class extends List { + static _capnp = { + displayName: "List", + size: ListElementSize.BYTE_4 + }; + get(index) { + const c = getContent(this); + return c.segment.getUint32(c.byteOffset + index * 4); + } + set(index, value) { + const c = getContent(this); + c.segment.setUint32(c.byteOffset + index * 4, value); + } + [Symbol.toStringTag]() { + return `Uint32_${super.toString()}`; + } +}; +var Uint64List = class extends List { + static _capnp = { + displayName: "List", + size: ListElementSize.BYTE_8 + }; + get(index) { + const c = getContent(this); + return c.segment.getUint64(c.byteOffset + index * 8); + } + set(index, value) { + const c = getContent(this); + c.segment.setUint64(c.byteOffset + index * 8, value); + } + [Symbol.toStringTag]() { + return `Uint64_${super.toString()}`; + } +}; +var VoidList = PointerList(Void); +var ConnWeakRefRegistry = globalThis.FinalizationRegistry ? new FinalizationRegistry((cb) => cb()) : void 0; + +// src/runtime/config/generated.ts +var _capnpFileId = BigInt("0xe6afd26682091c01"); +var Config = class _Config extends Struct { + static _capnp = { + displayName: "Config", + id: "8794486c76aaa7d6", + size: new ObjectSize(0, 5) + }; + static _Services; + static _Sockets; + static _Extensions; + _adoptServices(value) { + utils.adopt(value, utils.getPointer(0, this)); + } + _disownServices() { + return utils.disown(this.services); + } + /** + * List of named services defined by this server. These names are private; they are only used + * to refer to the services from elsewhere in this config file, as well as for logging and the + * like. Services are not reachable until you configure some way to make them reachable, such + * as via a Socket. + * + * If you do not define any service called "internet", one is defined implicitly, representing + * the ability to access public internet servers. An explicit definition would look like: + * + * ( name = "internet", + * network = ( + * allow = ["public"], # Allows connections to publicly-routable addresses only. + * tlsOptions = (trustBrowserCas = true) + * ) + * ) + * + * The "internet" service backs the global `fetch()` function in a Worker, unless that Worker's + * configuration specifies some other service using the `globalOutbound` setting. + * */ + get services() { + return utils.getList(0, _Config._Services, this); + } + _hasServices() { + return !utils.isNull(utils.getPointer(0, this)); + } + _initServices(length) { + return utils.initList(0, _Config._Services, length, this); + } + set services(value) { + utils.copyFrom(value, utils.getPointer(0, this)); + } + _adoptSockets(value) { + utils.adopt(value, utils.getPointer(1, this)); + } + _disownSockets() { + return utils.disown(this.sockets); + } + /** + * List of sockets on which this server will listen, and the services that will be exposed + * through them. + * */ + get sockets() { + return utils.getList(1, _Config._Sockets, this); + } + _hasSockets() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initSockets(length) { + return utils.initList(1, _Config._Sockets, length, this); + } + set sockets(value) { + utils.copyFrom(value, utils.getPointer(1, this)); + } + _adoptV8Flags(value) { + utils.adopt(value, utils.getPointer(2, this)); + } + _disownV8Flags() { + return utils.disown(this.v8Flags); + } + /** + * List of "command-line" flags to pass to V8, like "--expose-gc". We put these in the config + * rather than on the actual command line because for most use cases, managing these via the + * config file is probably cleaner and easier than passing on the actual CLI. + * + * WARNING: Use at your own risk. V8 flags can have all sorts of wild effects including completely + * breaking everything. V8 flags also generally do not come with any guarantee of stability + * between V8 versions. Most users should not set any V8 flags. + * */ + get v8Flags() { + return utils.getList(2, TextList, this); + } + _hasV8Flags() { + return !utils.isNull(utils.getPointer(2, this)); + } + _initV8Flags(length) { + return utils.initList(2, TextList, length, this); + } + set v8Flags(value) { + utils.copyFrom(value, utils.getPointer(2, this)); + } + _adoptExtensions(value) { + utils.adopt(value, utils.getPointer(3, this)); + } + _disownExtensions() { + return utils.disown(this.extensions); + } + /** + * Extensions provide capabilities to all workers. Extensions are usually prepared separately + * and are late-linked with the app using this config field. + * */ + get extensions() { + return utils.getList(3, _Config._Extensions, this); + } + _hasExtensions() { + return !utils.isNull(utils.getPointer(3, this)); + } + _initExtensions(length) { + return utils.initList(3, _Config._Extensions, length, this); + } + set extensions(value) { + utils.copyFrom(value, utils.getPointer(3, this)); + } + _adoptAutogates(value) { + utils.adopt(value, utils.getPointer(4, this)); + } + _disownAutogates() { + return utils.disown(this.autogates); + } + /** + * A list of gates which are enabled. + * These are used to gate features/changes in workerd and in our internal repo. See the equivalent + * config definition in our internal repo for more details. + * */ + get autogates() { + return utils.getList(4, TextList, this); + } + _hasAutogates() { + return !utils.isNull(utils.getPointer(4, this)); + } + _initAutogates(length) { + return utils.initList(4, TextList, length, this); + } + set autogates(value) { + utils.copyFrom(value, utils.getPointer(4, this)); + } + toString() { + return "Config_" + super.toString(); + } +}; +var Socket_Https = class extends Struct { + static _capnp = { + displayName: "https", + id: "de123876383cbbdc", + size: new ObjectSize(8, 5) + }; + _adoptOptions(value) { + utils.adopt(value, utils.getPointer(2, this)); + } + _disownOptions() { + return utils.disown(this.options); + } + get options() { + return utils.getStruct(2, HttpOptions, this); + } + _hasOptions() { + return !utils.isNull(utils.getPointer(2, this)); + } + _initOptions() { + return utils.initStructAt(2, HttpOptions, this); + } + set options(value) { + utils.copyFrom(value, utils.getPointer(2, this)); + } + _adoptTlsOptions(value) { + utils.adopt(value, utils.getPointer(3, this)); + } + _disownTlsOptions() { + return utils.disown(this.tlsOptions); + } + get tlsOptions() { + return utils.getStruct(3, TlsOptions, this); + } + _hasTlsOptions() { + return !utils.isNull(utils.getPointer(3, this)); + } + _initTlsOptions() { + return utils.initStructAt(3, TlsOptions, this); + } + set tlsOptions(value) { + utils.copyFrom(value, utils.getPointer(3, this)); + } + toString() { + return "Socket_Https_" + super.toString(); + } +}; +var Socket_Which = { + HTTP: 0, + HTTPS: 1 +}; +var Socket = class extends Struct { + static HTTP = Socket_Which.HTTP; + static HTTPS = Socket_Which.HTTPS; + static _capnp = { + displayName: "Socket", + id: "9a0eba45530ee79f", + size: new ObjectSize(8, 5) + }; + /** + * Each socket has a unique name which can be used on the command line to override the socket's + * address with `--socket-addr =` or `--socket-fd =`. + * */ + get name() { + return utils.getText(0, this); + } + set name(value) { + utils.setText(0, value, this); + } + /** + * Address/port on which this socket will listen. Optional; if not specified, then you will be + * required to specify the socket on the command line with with `--socket-addr =` or + * `--socket-fd =`. + * + * Examples: + * - "*:80": Listen on port 80 on all local IPv4 and IPv6 interfaces. + * - "1.2.3.4": Listen on the specific IPv4 address on the default port for the protocol. + * - "1.2.3.4:80": Listen on the specific IPv4 address and port. + * - "1234:5678::abcd": Listen on the specific IPv6 address on the default port for the protocol. + * - "[1234:5678::abcd]:80": Listen on the specific IPv6 address and port. + * - "unix:/path/to/socket": Listen on a Unix socket. + * - "unix-abstract:name": On Linux, listen on the given "abstract" Unix socket name. + * - "example.com:80": Perform a DNS lookup to determine the address, and then listen on it. If + * this resolves to multiple addresses, listen on all of them. + * + * (These are the formats supported by KJ's parseAddress().) + * */ + get address() { + return utils.getText(1, this); + } + set address(value) { + utils.setText(1, value, this); + } + _adoptHttp(value) { + utils.setUint16(0, 0, this); + utils.adopt(value, utils.getPointer(2, this)); + } + _disownHttp() { + return utils.disown(this.http); + } + get http() { + utils.testWhich("http", utils.getUint16(0, this), 0, this); + return utils.getStruct(2, HttpOptions, this); + } + _hasHttp() { + return !utils.isNull(utils.getPointer(2, this)); + } + _initHttp() { + utils.setUint16(0, 0, this); + return utils.initStructAt(2, HttpOptions, this); + } + get _isHttp() { + return utils.getUint16(0, this) === 0; + } + set http(value) { + utils.setUint16(0, 0, this); + utils.copyFrom(value, utils.getPointer(2, this)); + } + get https() { + utils.testWhich("https", utils.getUint16(0, this), 1, this); + return utils.getAs(Socket_Https, this); + } + _initHttps() { + utils.setUint16(0, 1, this); + return utils.getAs(Socket_Https, this); + } + get _isHttps() { + return utils.getUint16(0, this) === 1; + } + set https(_) { + utils.setUint16(0, 1, this); + } + _adoptService(value) { + utils.adopt(value, utils.getPointer(4, this)); + } + _disownService() { + return utils.disown(this.service); + } + /** + * Service name which should handle requests on this socket. + * */ + get service() { + return utils.getStruct(4, ServiceDesignator, this); + } + _hasService() { + return !utils.isNull(utils.getPointer(4, this)); + } + _initService() { + return utils.initStructAt(4, ServiceDesignator, this); + } + set service(value) { + utils.copyFrom(value, utils.getPointer(4, this)); + } + toString() { + return "Socket_" + super.toString(); + } + which() { + return utils.getUint16(0, this); + } +}; +var Service_Which = { + UNSPECIFIED: 0, + WORKER: 1, + NETWORK: 2, + EXTERNAL: 3, + DISK: 4 +}; +var Service = class extends Struct { + static UNSPECIFIED = Service_Which.UNSPECIFIED; + static WORKER = Service_Which.WORKER; + static NETWORK = Service_Which.NETWORK; + static EXTERNAL = Service_Which.EXTERNAL; + static DISK = Service_Which.DISK; + static _capnp = { + displayName: "Service", + id: "e5c88e8bb7bcb6b9", + size: new ObjectSize(8, 2) + }; + /** + * Name of the service. Used only to refer to the service from elsewhere in the config file. + * Services are not accessible unless you explicitly configure them to be, such as through a + * `Socket` or through a binding from another Worker. + * */ + get name() { + return utils.getText(0, this); + } + set name(value) { + utils.setText(0, value, this); + } + get _isUnspecified() { + return utils.getUint16(0, this) === 0; + } + set unspecified(_) { + utils.setUint16(0, 0, this); + } + _adoptWorker(value) { + utils.setUint16(0, 1, this); + utils.adopt(value, utils.getPointer(1, this)); + } + _disownWorker() { + return utils.disown(this.worker); + } + /** + * A Worker! + * */ + get worker() { + utils.testWhich("worker", utils.getUint16(0, this), 1, this); + return utils.getStruct(1, Worker, this); + } + _hasWorker() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initWorker() { + utils.setUint16(0, 1, this); + return utils.initStructAt(1, Worker, this); + } + get _isWorker() { + return utils.getUint16(0, this) === 1; + } + set worker(value) { + utils.setUint16(0, 1, this); + utils.copyFrom(value, utils.getPointer(1, this)); + } + _adoptNetwork(value) { + utils.setUint16(0, 2, this); + utils.adopt(value, utils.getPointer(1, this)); + } + _disownNetwork() { + return utils.disown(this.network); + } + /** + * A service that implements access to a network. fetch() requests are routed according to + * the URL hostname. + * */ + get network() { + utils.testWhich("network", utils.getUint16(0, this), 2, this); + return utils.getStruct(1, Network, this); + } + _hasNetwork() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initNetwork() { + utils.setUint16(0, 2, this); + return utils.initStructAt(1, Network, this); + } + get _isNetwork() { + return utils.getUint16(0, this) === 2; + } + set network(value) { + utils.setUint16(0, 2, this); + utils.copyFrom(value, utils.getPointer(1, this)); + } + _adoptExternal(value) { + utils.setUint16(0, 3, this); + utils.adopt(value, utils.getPointer(1, this)); + } + _disownExternal() { + return utils.disown(this.external); + } + /** + * A service that forwards all requests to a specific remote server. Typically used to + * connect to a back-end server on your internal network. + * */ + get external() { + utils.testWhich("external", utils.getUint16(0, this), 3, this); + return utils.getStruct(1, ExternalServer, this); + } + _hasExternal() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initExternal() { + utils.setUint16(0, 3, this); + return utils.initStructAt(1, ExternalServer, this); + } + get _isExternal() { + return utils.getUint16(0, this) === 3; + } + set external(value) { + utils.setUint16(0, 3, this); + utils.copyFrom(value, utils.getPointer(1, this)); + } + _adoptDisk(value) { + utils.setUint16(0, 4, this); + utils.adopt(value, utils.getPointer(1, this)); + } + _disownDisk() { + return utils.disown(this.disk); + } + /** + * An HTTP service backed by a directory on disk, supporting a basic HTTP GET/PUT. Generally + * not intended to be exposed directly to the internet; typically you want to bind this into + * a Worker that adds logic for setting Content-Type and the like. + * */ + get disk() { + utils.testWhich("disk", utils.getUint16(0, this), 4, this); + return utils.getStruct(1, DiskDirectory, this); + } + _hasDisk() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initDisk() { + utils.setUint16(0, 4, this); + return utils.initStructAt(1, DiskDirectory, this); + } + get _isDisk() { + return utils.getUint16(0, this) === 4; + } + set disk(value) { + utils.setUint16(0, 4, this); + utils.copyFrom(value, utils.getPointer(1, this)); + } + toString() { + return "Service_" + super.toString(); + } + which() { + return utils.getUint16(0, this); + } +}; +var ServiceDesignator_Props_Which = { + EMPTY: 0, + JSON: 1 +}; +var ServiceDesignator_Props = class extends Struct { + static EMPTY = ServiceDesignator_Props_Which.EMPTY; + static JSON = ServiceDesignator_Props_Which.JSON; + static _capnp = { + displayName: "props", + id: "f0dc90173b494522", + size: new ObjectSize(8, 3) + }; + get _isEmpty() { + return utils.getUint16(0, this) === 0; + } + set empty(_) { + utils.setUint16(0, 0, this); + } + /** + * A JSON-encoded value. + * */ + get json() { + utils.testWhich("json", utils.getUint16(0, this), 1, this); + return utils.getText(2, this); + } + get _isJson() { + return utils.getUint16(0, this) === 1; + } + set json(value) { + utils.setUint16(0, 1, this); + utils.setText(2, value, this); + } + toString() { + return "ServiceDesignator_Props_" + super.toString(); + } + which() { + return utils.getUint16(0, this); + } +}; +var ServiceDesignator = class extends Struct { + static _capnp = { + displayName: "ServiceDesignator", + id: "ae8ec91cee724450", + size: new ObjectSize(8, 3) + }; + /** + * Name of the service in the Config.services list. + * */ + get name() { + return utils.getText(0, this); + } + set name(value) { + utils.setText(0, value, this); + } + /** + * A modules-syntax Worker can export multiple named entrypoints. `export default {` specifies + * the default entrypoint, whereas `export let foo = {` defines an entrypoint named `foo`. If + * `entrypoint` is specified here, it names an alternate entrypoint to use on the target worker, + * otherwise the default is used. + * */ + get entrypoint() { + return utils.getText(1, this); + } + set entrypoint(value) { + utils.setText(1, value, this); + } + /** + * Value to provide in `ctx.props` in the target worker. + * */ + get props() { + return utils.getAs(ServiceDesignator_Props, this); + } + _initProps() { + return utils.getAs(ServiceDesignator_Props, this); + } + toString() { + return "ServiceDesignator_" + super.toString(); + } +}; +var Worker_Module_Which = { + ES_MODULE: 0, + COMMON_JS_MODULE: 1, + TEXT: 2, + DATA: 3, + WASM: 4, + JSON: 5, + NODE_JS_COMPAT_MODULE: 6, + PYTHON_MODULE: 7, + PYTHON_REQUIREMENT: 8 +}; +var Worker_Module = class extends Struct { + static ES_MODULE = Worker_Module_Which.ES_MODULE; + static COMMON_JS_MODULE = Worker_Module_Which.COMMON_JS_MODULE; + static TEXT = Worker_Module_Which.TEXT; + static DATA = Worker_Module_Which.DATA; + static WASM = Worker_Module_Which.WASM; + static JSON = Worker_Module_Which.JSON; + static NODE_JS_COMPAT_MODULE = Worker_Module_Which.NODE_JS_COMPAT_MODULE; + static PYTHON_MODULE = Worker_Module_Which.PYTHON_MODULE; + static PYTHON_REQUIREMENT = Worker_Module_Which.PYTHON_REQUIREMENT; + static _capnp = { + displayName: "Module", + id: "d9d87a63770a12f3", + size: new ObjectSize(8, 3) + }; + /** + * Name (or path) used to import the module. + * */ + get name() { + return utils.getText(0, this); + } + set name(value) { + utils.setText(0, value, this); + } + /** + * An ES module file with imports and exports. + * + * As with `serviceWorkerScript`, above, the value is the raw source code. + * */ + get esModule() { + utils.testWhich("esModule", utils.getUint16(0, this), 0, this); + return utils.getText(1, this); + } + get _isEsModule() { + return utils.getUint16(0, this) === 0; + } + set esModule(value) { + utils.setUint16(0, 0, this); + utils.setText(1, value, this); + } + /** + * A common JS module, using require(). + * */ + get commonJsModule() { + utils.testWhich("commonJsModule", utils.getUint16(0, this), 1, this); + return utils.getText(1, this); + } + get _isCommonJsModule() { + return utils.getUint16(0, this) === 1; + } + set commonJsModule(value) { + utils.setUint16(0, 1, this); + utils.setText(1, value, this); + } + /** + * A raw text blob. Importing this will produce a string with the value. + * */ + get text() { + utils.testWhich("text", utils.getUint16(0, this), 2, this); + return utils.getText(1, this); + } + get _isText() { + return utils.getUint16(0, this) === 2; + } + set text(value) { + utils.setUint16(0, 2, this); + utils.setText(1, value, this); + } + _adoptData(value) { + utils.setUint16(0, 3, this); + utils.adopt(value, utils.getPointer(1, this)); + } + _disownData() { + return utils.disown(this.data); + } + /** + * A raw data blob. Importing this will produce an ArrayBuffer with the value. + * */ + get data() { + utils.testWhich("data", utils.getUint16(0, this), 3, this); + return utils.getData(1, this); + } + _hasData() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initData(length) { + utils.setUint16(0, 3, this); + return utils.initData(1, length, this); + } + get _isData() { + return utils.getUint16(0, this) === 3; + } + set data(value) { + utils.setUint16(0, 3, this); + utils.copyFrom(value, utils.getPointer(1, this)); + } + _adoptWasm(value) { + utils.setUint16(0, 4, this); + utils.adopt(value, utils.getPointer(1, this)); + } + _disownWasm() { + return utils.disown(this.wasm); + } + /** + * A Wasm module. The value is a compiled binary Wasm module file. Importing this will produce + * a `WebAssembly.Module` object, which you can then instantiate. + * */ + get wasm() { + utils.testWhich("wasm", utils.getUint16(0, this), 4, this); + return utils.getData(1, this); + } + _hasWasm() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initWasm(length) { + utils.setUint16(0, 4, this); + return utils.initData(1, length, this); + } + get _isWasm() { + return utils.getUint16(0, this) === 4; + } + set wasm(value) { + utils.setUint16(0, 4, this); + utils.copyFrom(value, utils.getPointer(1, this)); + } + /** + * Importing this will produce the result of parsing the given text as JSON. + * */ + get json() { + utils.testWhich("json", utils.getUint16(0, this), 5, this); + return utils.getText(1, this); + } + get _isJson() { + return utils.getUint16(0, this) === 5; + } + set json(value) { + utils.setUint16(0, 5, this); + utils.setText(1, value, this); + } + /** + * A Node.js module is a specialization of a commonJsModule that: + * (a) allows for importing Node.js-compat built-ins without the node: specifier-prefix + * (b) exposes the subset of common Node.js globals such as process, Buffer, etc that + * we implement in the workerd runtime. + * */ + get nodeJsCompatModule() { + utils.testWhich( + "nodeJsCompatModule", + utils.getUint16(0, this), + 6, + this + ); + return utils.getText(1, this); + } + get _isNodeJsCompatModule() { + return utils.getUint16(0, this) === 6; + } + set nodeJsCompatModule(value) { + utils.setUint16(0, 6, this); + utils.setText(1, value, this); + } + /** + * A Python module. All bundles containing this value type are converted into a JS/WASM Worker + * Bundle prior to execution. + * */ + get pythonModule() { + utils.testWhich("pythonModule", utils.getUint16(0, this), 7, this); + return utils.getText(1, this); + } + get _isPythonModule() { + return utils.getUint16(0, this) === 7; + } + set pythonModule(value) { + utils.setUint16(0, 7, this); + utils.setText(1, value, this); + } + /** + * A Python package that is required by this bundle. The package must be supported by + * Pyodide (https://pyodide.org/en/stable/usage/packages-in-pyodide.html). All packages listed + * will be installed prior to the execution of the worker. + * */ + get pythonRequirement() { + utils.testWhich("pythonRequirement", utils.getUint16(0, this), 8, this); + return utils.getText(1, this); + } + get _isPythonRequirement() { + return utils.getUint16(0, this) === 8; + } + set pythonRequirement(value) { + utils.setUint16(0, 8, this); + utils.setText(1, value, this); + } + _adoptNamedExports(value) { + utils.adopt(value, utils.getPointer(2, this)); + } + _disownNamedExports() { + return utils.disown(this.namedExports); + } + /** + * For commonJsModule and nodeJsCompatModule, this is a list of named exports that the + * module expects to be exported once the evaluation is complete. + * */ + get namedExports() { + return utils.getList(2, TextList, this); + } + _hasNamedExports() { + return !utils.isNull(utils.getPointer(2, this)); + } + _initNamedExports(length) { + return utils.initList(2, TextList, length, this); + } + set namedExports(value) { + utils.copyFrom(value, utils.getPointer(2, this)); + } + toString() { + return "Worker_Module_" + super.toString(); + } + which() { + return utils.getUint16(0, this); + } +}; +var Worker_Binding_Type_Which = { + UNSPECIFIED: 0, + TEXT: 1, + DATA: 2, + JSON: 3, + WASM: 4, + CRYPTO_KEY: 5, + SERVICE: 6, + DURABLE_OBJECT_NAMESPACE: 7, + KV_NAMESPACE: 8, + R2BUCKET: 9, + R2ADMIN: 10, + QUEUE: 11, + ANALYTICS_ENGINE: 12, + HYPERDRIVE: 13 +}; +var Worker_Binding_Type = class extends Struct { + static UNSPECIFIED = Worker_Binding_Type_Which.UNSPECIFIED; + static TEXT = Worker_Binding_Type_Which.TEXT; + static DATA = Worker_Binding_Type_Which.DATA; + static JSON = Worker_Binding_Type_Which.JSON; + static WASM = Worker_Binding_Type_Which.WASM; + static CRYPTO_KEY = Worker_Binding_Type_Which.CRYPTO_KEY; + static SERVICE = Worker_Binding_Type_Which.SERVICE; + static DURABLE_OBJECT_NAMESPACE = Worker_Binding_Type_Which.DURABLE_OBJECT_NAMESPACE; + static KV_NAMESPACE = Worker_Binding_Type_Which.KV_NAMESPACE; + static R2BUCKET = Worker_Binding_Type_Which.R2BUCKET; + static R2ADMIN = Worker_Binding_Type_Which.R2ADMIN; + static QUEUE = Worker_Binding_Type_Which.QUEUE; + static ANALYTICS_ENGINE = Worker_Binding_Type_Which.ANALYTICS_ENGINE; + static HYPERDRIVE = Worker_Binding_Type_Which.HYPERDRIVE; + static _capnp = { + displayName: "Type", + id: "8906a1296519bf8a", + size: new ObjectSize(8, 1) + }; + get _isUnspecified() { + return utils.getUint16(0, this) === 0; + } + set unspecified(_) { + utils.setUint16(0, 0, this); + } + get _isText() { + return utils.getUint16(0, this) === 1; + } + set text(_) { + utils.setUint16(0, 1, this); + } + get _isData() { + return utils.getUint16(0, this) === 2; + } + set data(_) { + utils.setUint16(0, 2, this); + } + get _isJson() { + return utils.getUint16(0, this) === 3; + } + set json(_) { + utils.setUint16(0, 3, this); + } + get _isWasm() { + return utils.getUint16(0, this) === 4; + } + set wasm(_) { + utils.setUint16(0, 4, this); + } + _adoptCryptoKey(value) { + utils.setUint16(0, 5, this); + utils.adopt(value, utils.getPointer(0, this)); + } + _disownCryptoKey() { + return utils.disown(this.cryptoKey); + } + get cryptoKey() { + utils.testWhich("cryptoKey", utils.getUint16(0, this), 5, this); + return utils.getList( + 0, + Uint16List, + this + ); + } + _hasCryptoKey() { + return !utils.isNull(utils.getPointer(0, this)); + } + _initCryptoKey(length) { + utils.setUint16(0, 5, this); + return utils.initList( + 0, + Uint16List, + length, + this + ); + } + get _isCryptoKey() { + return utils.getUint16(0, this) === 5; + } + set cryptoKey(value) { + utils.setUint16(0, 5, this); + utils.copyFrom(value, utils.getPointer(0, this)); + } + get _isService() { + return utils.getUint16(0, this) === 6; + } + set service(_) { + utils.setUint16(0, 6, this); + } + get _isDurableObjectNamespace() { + return utils.getUint16(0, this) === 7; + } + set durableObjectNamespace(_) { + utils.setUint16(0, 7, this); + } + get _isKvNamespace() { + return utils.getUint16(0, this) === 8; + } + set kvNamespace(_) { + utils.setUint16(0, 8, this); + } + get _isR2Bucket() { + return utils.getUint16(0, this) === 9; + } + set r2Bucket(_) { + utils.setUint16(0, 9, this); + } + get _isR2Admin() { + return utils.getUint16(0, this) === 10; + } + set r2Admin(_) { + utils.setUint16(0, 10, this); + } + get _isQueue() { + return utils.getUint16(0, this) === 11; + } + set queue(_) { + utils.setUint16(0, 11, this); + } + get _isAnalyticsEngine() { + return utils.getUint16(0, this) === 12; + } + set analyticsEngine(_) { + utils.setUint16(0, 12, this); + } + get _isHyperdrive() { + return utils.getUint16(0, this) === 13; + } + set hyperdrive(_) { + utils.setUint16(0, 13, this); + } + toString() { + return "Worker_Binding_Type_" + super.toString(); + } + which() { + return utils.getUint16(0, this); + } +}; +var Worker_Binding_DurableObjectNamespaceDesignator = class extends Struct { + static _capnp = { + displayName: "DurableObjectNamespaceDesignator", + id: "804f144ff477aac7", + size: new ObjectSize(0, 2) + }; + /** + * Exported class name that implements the Durable Object. + * */ + get className() { + return utils.getText(0, this); + } + set className(value) { + utils.setText(0, value, this); + } + /** + * The service name of the worker that defines this class. If omitted, the current worker + * is assumed. + * + * Use of this field is discouraged. Instead, when accessing a different Worker's Durable + * Objects, specify a `service` binding to that worker, and have the worker implement an + * appropriate API. + * + * (This is intentionally not a ServiceDesignator because you cannot choose an alternate + * entrypoint here; the class name IS the entrypoint.) + * */ + get serviceName() { + return utils.getText(1, this); + } + set serviceName(value) { + utils.setText(1, value, this); + } + toString() { + return "Worker_Binding_DurableObjectNamespaceDesignator_" + super.toString(); + } +}; +var Worker_Binding_CryptoKey_Usage = { + ENCRYPT: 0, + DECRYPT: 1, + SIGN: 2, + VERIFY: 3, + DERIVE_KEY: 4, + DERIVE_BITS: 5, + WRAP_KEY: 6, + UNWRAP_KEY: 7 +}; +var Worker_Binding_CryptoKey_Algorithm_Which = { + NAME: 0, + JSON: 1 +}; +var Worker_Binding_CryptoKey_Algorithm = class extends Struct { + static NAME = Worker_Binding_CryptoKey_Algorithm_Which.NAME; + static JSON = Worker_Binding_CryptoKey_Algorithm_Which.JSON; + static _capnp = { + displayName: "algorithm", + id: "a1a040c5e00d7021", + size: new ObjectSize(8, 3) + }; + /** + * Just a name, like `AES-GCM`. + * */ + get name() { + utils.testWhich("name", utils.getUint16(2, this), 0, this); + return utils.getText(1, this); + } + get _isName() { + return utils.getUint16(2, this) === 0; + } + set name(value) { + utils.setUint16(2, 0, this); + utils.setText(1, value, this); + } + /** + * An object, encoded here as JSON. + * */ + get json() { + utils.testWhich("json", utils.getUint16(2, this), 1, this); + return utils.getText(1, this); + } + get _isJson() { + return utils.getUint16(2, this) === 1; + } + set json(value) { + utils.setUint16(2, 1, this); + utils.setText(1, value, this); + } + toString() { + return "Worker_Binding_CryptoKey_Algorithm_" + super.toString(); + } + which() { + return utils.getUint16( + 2, + this + ); + } +}; +var Worker_Binding_CryptoKey_Which = { + RAW: 0, + HEX: 1, + BASE64: 2, + PKCS8: 3, + SPKI: 4, + JWK: 5 +}; +var Worker_Binding_CryptoKey = class _Worker_Binding_CryptoKey extends Struct { + static RAW = Worker_Binding_CryptoKey_Which.RAW; + static HEX = Worker_Binding_CryptoKey_Which.HEX; + static BASE64 = Worker_Binding_CryptoKey_Which.BASE64; + static PKCS8 = Worker_Binding_CryptoKey_Which.PKCS8; + static SPKI = Worker_Binding_CryptoKey_Which.SPKI; + static JWK = Worker_Binding_CryptoKey_Which.JWK; + static Usage = Worker_Binding_CryptoKey_Usage; + static _capnp = { + displayName: "CryptoKey", + id: "b5e1bff0e57d6eb0", + size: new ObjectSize(8, 3), + defaultExtractable: getBitMask(false, 0) + }; + _adoptRaw(value) { + utils.setUint16(0, 0, this); + utils.adopt(value, utils.getPointer(0, this)); + } + _disownRaw() { + return utils.disown(this.raw); + } + get raw() { + utils.testWhich("raw", utils.getUint16(0, this), 0, this); + return utils.getData(0, this); + } + _hasRaw() { + return !utils.isNull(utils.getPointer(0, this)); + } + _initRaw(length) { + utils.setUint16(0, 0, this); + return utils.initData(0, length, this); + } + get _isRaw() { + return utils.getUint16(0, this) === 0; + } + set raw(value) { + utils.setUint16(0, 0, this); + utils.copyFrom(value, utils.getPointer(0, this)); + } + get hex() { + utils.testWhich("hex", utils.getUint16(0, this), 1, this); + return utils.getText(0, this); + } + get _isHex() { + return utils.getUint16(0, this) === 1; + } + set hex(value) { + utils.setUint16(0, 1, this); + utils.setText(0, value, this); + } + /** + * Raw key material, possibly hex or base64-encoded. Use this for symmetric keys. + * + * Hint: `raw` would typically be used with Cap'n Proto's `embed` syntax to embed an + * external binary key file. `hex` or `base64` could do that too but can also be specified + * inline. + * */ + get base64() { + utils.testWhich("base64", utils.getUint16(0, this), 2, this); + return utils.getText(0, this); + } + get _isBase64() { + return utils.getUint16(0, this) === 2; + } + set base64(value) { + utils.setUint16(0, 2, this); + utils.setText(0, value, this); + } + /** + * Private key in PEM-encoded PKCS#8 format. + * */ + get pkcs8() { + utils.testWhich("pkcs8", utils.getUint16(0, this), 3, this); + return utils.getText(0, this); + } + get _isPkcs8() { + return utils.getUint16(0, this) === 3; + } + set pkcs8(value) { + utils.setUint16(0, 3, this); + utils.setText(0, value, this); + } + /** + * Public key in PEM-encoded SPKI format. + * */ + get spki() { + utils.testWhich("spki", utils.getUint16(0, this), 4, this); + return utils.getText(0, this); + } + get _isSpki() { + return utils.getUint16(0, this) === 4; + } + set spki(value) { + utils.setUint16(0, 4, this); + utils.setText(0, value, this); + } + /** + * Key in JSON format. + * */ + get jwk() { + utils.testWhich("jwk", utils.getUint16(0, this), 5, this); + return utils.getText(0, this); + } + get _isJwk() { + return utils.getUint16(0, this) === 5; + } + set jwk(value) { + utils.setUint16(0, 5, this); + utils.setText(0, value, this); + } + /** + * Value for the `algorithm` parameter. + * */ + get algorithm() { + return utils.getAs(Worker_Binding_CryptoKey_Algorithm, this); + } + _initAlgorithm() { + return utils.getAs(Worker_Binding_CryptoKey_Algorithm, this); + } + /** + * Is the Worker allowed to export this key to obtain the underlying key material? Setting + * this false ensures that the key cannot be leaked by errant JavaScript code; the key can + * only be used in WebCrypto operations. + * */ + get extractable() { + return utils.getBit( + 32, + this, + _Worker_Binding_CryptoKey._capnp.defaultExtractable + ); + } + set extractable(value) { + utils.setBit( + 32, + value, + this, + _Worker_Binding_CryptoKey._capnp.defaultExtractable + ); + } + _adoptUsages(value) { + utils.adopt(value, utils.getPointer(2, this)); + } + _disownUsages() { + return utils.disown(this.usages); + } + /** + * What operations is this key permitted to be used for? + * */ + get usages() { + return utils.getList( + 2, + Uint16List, + this + ); + } + _hasUsages() { + return !utils.isNull(utils.getPointer(2, this)); + } + _initUsages(length) { + return utils.initList( + 2, + Uint16List, + length, + this + ); + } + set usages(value) { + utils.copyFrom(value, utils.getPointer(2, this)); + } + toString() { + return "Worker_Binding_CryptoKey_" + super.toString(); + } + which() { + return utils.getUint16(0, this); + } +}; +var Worker_Binding_MemoryCacheLimits = class extends Struct { + static _capnp = { + displayName: "MemoryCacheLimits", + id: "8d66725b0867e634", + size: new ObjectSize(16, 0) + }; + get maxKeys() { + return utils.getUint32(0, this); + } + set maxKeys(value) { + utils.setUint32(0, value, this); + } + get maxValueSize() { + return utils.getUint32(4, this); + } + set maxValueSize(value) { + utils.setUint32(4, value, this); + } + get maxTotalValueSize() { + return utils.getUint64(8, this); + } + set maxTotalValueSize(value) { + utils.setUint64(8, value, this); + } + toString() { + return "Worker_Binding_MemoryCacheLimits_" + super.toString(); + } +}; +var Worker_Binding_WrappedBinding = class _Worker_Binding_WrappedBinding extends Struct { + static _capnp = { + displayName: "WrappedBinding", + id: "e6f066b75f0ea113", + size: new ObjectSize(0, 3), + defaultEntrypoint: "default" + }; + static _InnerBindings; + /** + * Wrapper module name. + * The module must be an internal one (provided by extension or registered in the c++ code). + * Module will be instantitated during binding initialization phase. + * */ + get moduleName() { + return utils.getText(0, this); + } + set moduleName(value) { + utils.setText(0, value, this); + } + /** + * Module needs to export a function with a given name (default export gets "default" name). + * The function needs to accept a single `env` argument - a dictionary with inner bindings. + * Function will be invoked during initialization phase and its return value will be used as + * resulting binding value. + * */ + get entrypoint() { + return utils.getText( + 1, + this, + _Worker_Binding_WrappedBinding._capnp.defaultEntrypoint + ); + } + set entrypoint(value) { + utils.setText(1, value, this); + } + _adoptInnerBindings(value) { + utils.adopt(value, utils.getPointer(2, this)); + } + _disownInnerBindings() { + return utils.disown(this.innerBindings); + } + /** + * Inner bindings that will be created and passed in the env dictionary. + * These bindings shall be used to implement end-user api, and are not available to the + * binding consumers unless "re-exported" in wrapBindings function. + * */ + get innerBindings() { + return utils.getList( + 2, + _Worker_Binding_WrappedBinding._InnerBindings, + this + ); + } + _hasInnerBindings() { + return !utils.isNull(utils.getPointer(2, this)); + } + _initInnerBindings(length) { + return utils.initList( + 2, + _Worker_Binding_WrappedBinding._InnerBindings, + length, + this + ); + } + set innerBindings(value) { + utils.copyFrom(value, utils.getPointer(2, this)); + } + toString() { + return "Worker_Binding_WrappedBinding_" + super.toString(); + } +}; +var Worker_Binding_Parameter = class extends Struct { + static _capnp = { + displayName: "parameter", + id: "dc57e1258d26d152", + size: new ObjectSize(8, 6) + }; + _adoptType(value) { + utils.adopt(value, utils.getPointer(1, this)); + } + _disownType() { + return utils.disown(this.type); + } + /** + * Expected type of this parameter. + * */ + get type() { + return utils.getStruct(1, Worker_Binding_Type, this); + } + _hasType() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initType() { + return utils.initStructAt(1, Worker_Binding_Type, this); + } + set type(value) { + utils.copyFrom(value, utils.getPointer(1, this)); + } + /** + * If true, this binding is optional. Derived workers need not specify it, in which case + * the binding won't be present in the environment object passed to the worker. + * + * When a Worker has any non-optional parameters that haven't been filled in, then it can + * only be used for inheritance; it cannot be invoked directly. + * */ + get optional() { + return utils.getBit(16, this); + } + set optional(value) { + utils.setBit(16, value, this); + } + toString() { + return "Worker_Binding_Parameter_" + super.toString(); + } +}; +var Worker_Binding_Hyperdrive = class extends Struct { + static _capnp = { + displayName: "hyperdrive", + id: "ad6c391cd55f3134", + size: new ObjectSize(8, 6) + }; + _adoptDesignator(value) { + utils.adopt(value, utils.getPointer(1, this)); + } + _disownDesignator() { + return utils.disown(this.designator); + } + get designator() { + return utils.getStruct(1, ServiceDesignator, this); + } + _hasDesignator() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initDesignator() { + return utils.initStructAt(1, ServiceDesignator, this); + } + set designator(value) { + utils.copyFrom(value, utils.getPointer(1, this)); + } + get database() { + return utils.getText(2, this); + } + set database(value) { + utils.setText(2, value, this); + } + get user() { + return utils.getText(3, this); + } + set user(value) { + utils.setText(3, value, this); + } + get password() { + return utils.getText(4, this); + } + set password(value) { + utils.setText(4, value, this); + } + get scheme() { + return utils.getText(5, this); + } + set scheme(value) { + utils.setText(5, value, this); + } + toString() { + return "Worker_Binding_Hyperdrive_" + super.toString(); + } +}; +var Worker_Binding_MemoryCache = class extends Struct { + static _capnp = { + displayName: "memoryCache", + id: "aed5760c349869da", + size: new ObjectSize(8, 6) + }; + /** + * The identifier associated with this cache. Any number of isolates + * can access the same in-memory cache (within the same process), and + * each worker may use any number of in-memory caches. + * */ + get id() { + return utils.getText(1, this); + } + set id(value) { + utils.setText(1, value, this); + } + _adoptLimits(value) { + utils.adopt(value, utils.getPointer(2, this)); + } + _disownLimits() { + return utils.disown(this.limits); + } + get limits() { + return utils.getStruct(2, Worker_Binding_MemoryCacheLimits, this); + } + _hasLimits() { + return !utils.isNull(utils.getPointer(2, this)); + } + _initLimits() { + return utils.initStructAt(2, Worker_Binding_MemoryCacheLimits, this); + } + set limits(value) { + utils.copyFrom(value, utils.getPointer(2, this)); + } + toString() { + return "Worker_Binding_MemoryCache_" + super.toString(); + } +}; +var Worker_Binding_Which = { + UNSPECIFIED: 0, + PARAMETER: 1, + TEXT: 2, + DATA: 3, + JSON: 4, + WASM_MODULE: 5, + CRYPTO_KEY: 6, + SERVICE: 7, + DURABLE_OBJECT_NAMESPACE: 8, + KV_NAMESPACE: 9, + R2BUCKET: 10, + R2ADMIN: 11, + WRAPPED: 12, + QUEUE: 13, + FROM_ENVIRONMENT: 14, + ANALYTICS_ENGINE: 15, + HYPERDRIVE: 16, + UNSAFE_EVAL: 17, + MEMORY_CACHE: 18 +}; +var Worker_Binding = class extends Struct { + static UNSPECIFIED = Worker_Binding_Which.UNSPECIFIED; + static PARAMETER = Worker_Binding_Which.PARAMETER; + static TEXT = Worker_Binding_Which.TEXT; + static DATA = Worker_Binding_Which.DATA; + static JSON = Worker_Binding_Which.JSON; + static WASM_MODULE = Worker_Binding_Which.WASM_MODULE; + static CRYPTO_KEY = Worker_Binding_Which.CRYPTO_KEY; + static SERVICE = Worker_Binding_Which.SERVICE; + static DURABLE_OBJECT_NAMESPACE = Worker_Binding_Which.DURABLE_OBJECT_NAMESPACE; + static KV_NAMESPACE = Worker_Binding_Which.KV_NAMESPACE; + static R2BUCKET = Worker_Binding_Which.R2BUCKET; + static R2ADMIN = Worker_Binding_Which.R2ADMIN; + static WRAPPED = Worker_Binding_Which.WRAPPED; + static QUEUE = Worker_Binding_Which.QUEUE; + static FROM_ENVIRONMENT = Worker_Binding_Which.FROM_ENVIRONMENT; + static ANALYTICS_ENGINE = Worker_Binding_Which.ANALYTICS_ENGINE; + static HYPERDRIVE = Worker_Binding_Which.HYPERDRIVE; + static UNSAFE_EVAL = Worker_Binding_Which.UNSAFE_EVAL; + static MEMORY_CACHE = Worker_Binding_Which.MEMORY_CACHE; + static Type = Worker_Binding_Type; + static DurableObjectNamespaceDesignator = Worker_Binding_DurableObjectNamespaceDesignator; + static CryptoKey = Worker_Binding_CryptoKey; + static MemoryCacheLimits = Worker_Binding_MemoryCacheLimits; + static WrappedBinding = Worker_Binding_WrappedBinding; + static _capnp = { + displayName: "Binding", + id: "8e7e492fd7e35f3e", + size: new ObjectSize(8, 6) + }; + get name() { + return utils.getText(0, this); + } + set name(value) { + utils.setText(0, value, this); + } + get _isUnspecified() { + return utils.getUint16(0, this) === 0; + } + set unspecified(_) { + utils.setUint16(0, 0, this); + } + /** + * Indicates that the Worker requires a binding of the given type, but it won't be specified + * here. Another Worker can inherit this Worker and fill in this binding. + * */ + get parameter() { + utils.testWhich("parameter", utils.getUint16(0, this), 1, this); + return utils.getAs(Worker_Binding_Parameter, this); + } + _initParameter() { + utils.setUint16(0, 1, this); + return utils.getAs(Worker_Binding_Parameter, this); + } + get _isParameter() { + return utils.getUint16(0, this) === 1; + } + set parameter(_) { + utils.setUint16(0, 1, this); + } + /** + * A string. + * */ + get text() { + utils.testWhich("text", utils.getUint16(0, this), 2, this); + return utils.getText(1, this); + } + get _isText() { + return utils.getUint16(0, this) === 2; + } + set text(value) { + utils.setUint16(0, 2, this); + utils.setText(1, value, this); + } + _adoptData(value) { + utils.setUint16(0, 3, this); + utils.adopt(value, utils.getPointer(1, this)); + } + _disownData() { + return utils.disown(this.data); + } + /** + * An ArrayBuffer. + * */ + get data() { + utils.testWhich("data", utils.getUint16(0, this), 3, this); + return utils.getData(1, this); + } + _hasData() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initData(length) { + utils.setUint16(0, 3, this); + return utils.initData(1, length, this); + } + get _isData() { + return utils.getUint16(0, this) === 3; + } + set data(value) { + utils.setUint16(0, 3, this); + utils.copyFrom(value, utils.getPointer(1, this)); + } + /** + * A value parsed from JSON. + * */ + get json() { + utils.testWhich("json", utils.getUint16(0, this), 4, this); + return utils.getText(1, this); + } + get _isJson() { + return utils.getUint16(0, this) === 4; + } + set json(value) { + utils.setUint16(0, 4, this); + utils.setText(1, value, this); + } + _adoptWasmModule(value) { + utils.setUint16(0, 5, this); + utils.adopt(value, utils.getPointer(1, this)); + } + _disownWasmModule() { + return utils.disown(this.wasmModule); + } + /** + * A WebAssembly module. The binding will be an instance of `WebAssembly.Module`. Only + * supported when using Service Workers syntax. + * + * DEPRECATED: Please switch to ES modules syntax instead, and embed Wasm modules as modules. + * */ + get wasmModule() { + utils.testWhich("wasmModule", utils.getUint16(0, this), 5, this); + return utils.getData(1, this); + } + _hasWasmModule() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initWasmModule(length) { + utils.setUint16(0, 5, this); + return utils.initData(1, length, this); + } + get _isWasmModule() { + return utils.getUint16(0, this) === 5; + } + set wasmModule(value) { + utils.setUint16(0, 5, this); + utils.copyFrom(value, utils.getPointer(1, this)); + } + _adoptCryptoKey(value) { + utils.setUint16(0, 6, this); + utils.adopt(value, utils.getPointer(1, this)); + } + _disownCryptoKey() { + return utils.disown(this.cryptoKey); + } + /** + * A CryptoKey instance, for use with the WebCrypto API. + * + * Note that by setting `extractable = false`, you can prevent the Worker code from accessing + * or leaking the raw key material; it will only be able to use the key to perform WebCrypto + * operations. + * */ + get cryptoKey() { + utils.testWhich("cryptoKey", utils.getUint16(0, this), 6, this); + return utils.getStruct(1, Worker_Binding_CryptoKey, this); + } + _hasCryptoKey() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initCryptoKey() { + utils.setUint16(0, 6, this); + return utils.initStructAt(1, Worker_Binding_CryptoKey, this); + } + get _isCryptoKey() { + return utils.getUint16(0, this) === 6; + } + set cryptoKey(value) { + utils.setUint16(0, 6, this); + utils.copyFrom(value, utils.getPointer(1, this)); + } + _adoptService(value) { + utils.setUint16(0, 7, this); + utils.adopt(value, utils.getPointer(1, this)); + } + _disownService() { + return utils.disown(this.service); + } + /** + * Binding to a named service (possibly, a worker). + * */ + get service() { + utils.testWhich("service", utils.getUint16(0, this), 7, this); + return utils.getStruct(1, ServiceDesignator, this); + } + _hasService() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initService() { + utils.setUint16(0, 7, this); + return utils.initStructAt(1, ServiceDesignator, this); + } + get _isService() { + return utils.getUint16(0, this) === 7; + } + set service(value) { + utils.setUint16(0, 7, this); + utils.copyFrom(value, utils.getPointer(1, this)); + } + _adoptDurableObjectNamespace(value) { + utils.setUint16(0, 8, this); + utils.adopt(value, utils.getPointer(1, this)); + } + _disownDurableObjectNamespace() { + return utils.disown(this.durableObjectNamespace); + } + /** + * Binding to the durable object namespace implemented by the given class. + * + * In the common case that this refers to a class in the same Worker, you can specify just + * a string, like: + * + * durableObjectNamespace = "MyClass" + * */ + get durableObjectNamespace() { + utils.testWhich( + "durableObjectNamespace", + utils.getUint16(0, this), + 8, + this + ); + return utils.getStruct( + 1, + Worker_Binding_DurableObjectNamespaceDesignator, + this + ); + } + _hasDurableObjectNamespace() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initDurableObjectNamespace() { + utils.setUint16(0, 8, this); + return utils.initStructAt( + 1, + Worker_Binding_DurableObjectNamespaceDesignator, + this + ); + } + get _isDurableObjectNamespace() { + return utils.getUint16(0, this) === 8; + } + set durableObjectNamespace(value) { + utils.setUint16(0, 8, this); + utils.copyFrom(value, utils.getPointer(1, this)); + } + _adoptKvNamespace(value) { + utils.setUint16(0, 9, this); + utils.adopt(value, utils.getPointer(1, this)); + } + _disownKvNamespace() { + return utils.disown(this.kvNamespace); + } + /** + * A KV namespace, implemented by the named service. The Worker sees a KvNamespace-typed + * binding. Requests to the namespace will be converted into HTTP requests targeting the + * given service name. + * */ + get kvNamespace() { + utils.testWhich("kvNamespace", utils.getUint16(0, this), 9, this); + return utils.getStruct(1, ServiceDesignator, this); + } + _hasKvNamespace() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initKvNamespace() { + utils.setUint16(0, 9, this); + return utils.initStructAt(1, ServiceDesignator, this); + } + get _isKvNamespace() { + return utils.getUint16(0, this) === 9; + } + set kvNamespace(value) { + utils.setUint16(0, 9, this); + utils.copyFrom(value, utils.getPointer(1, this)); + } + _adoptR2Bucket(value) { + utils.setUint16(0, 10, this); + utils.adopt(value, utils.getPointer(1, this)); + } + _disownR2Bucket() { + return utils.disown(this.r2Bucket); + } + get r2Bucket() { + utils.testWhich("r2Bucket", utils.getUint16(0, this), 10, this); + return utils.getStruct(1, ServiceDesignator, this); + } + _hasR2Bucket() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initR2Bucket() { + utils.setUint16(0, 10, this); + return utils.initStructAt(1, ServiceDesignator, this); + } + get _isR2Bucket() { + return utils.getUint16(0, this) === 10; + } + set r2Bucket(value) { + utils.setUint16(0, 10, this); + utils.copyFrom(value, utils.getPointer(1, this)); + } + _adoptR2Admin(value) { + utils.setUint16(0, 11, this); + utils.adopt(value, utils.getPointer(1, this)); + } + _disownR2Admin() { + return utils.disown(this.r2Admin); + } + /** + * R2 bucket and admin API bindings. Similar to KV namespaces, these turn operations into + * HTTP requests aimed at the named service. + * */ + get r2Admin() { + utils.testWhich("r2Admin", utils.getUint16(0, this), 11, this); + return utils.getStruct(1, ServiceDesignator, this); + } + _hasR2Admin() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initR2Admin() { + utils.setUint16(0, 11, this); + return utils.initStructAt(1, ServiceDesignator, this); + } + get _isR2Admin() { + return utils.getUint16(0, this) === 11; + } + set r2Admin(value) { + utils.setUint16(0, 11, this); + utils.copyFrom(value, utils.getPointer(1, this)); + } + _adoptWrapped(value) { + utils.setUint16(0, 12, this); + utils.adopt(value, utils.getPointer(1, this)); + } + _disownWrapped() { + return utils.disown(this.wrapped); + } + /** + * Wraps a collection of inner bindings in a common api functionality. + * */ + get wrapped() { + utils.testWhich("wrapped", utils.getUint16(0, this), 12, this); + return utils.getStruct(1, Worker_Binding_WrappedBinding, this); + } + _hasWrapped() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initWrapped() { + utils.setUint16(0, 12, this); + return utils.initStructAt(1, Worker_Binding_WrappedBinding, this); + } + get _isWrapped() { + return utils.getUint16(0, this) === 12; + } + set wrapped(value) { + utils.setUint16(0, 12, this); + utils.copyFrom(value, utils.getPointer(1, this)); + } + _adoptQueue(value) { + utils.setUint16(0, 13, this); + utils.adopt(value, utils.getPointer(1, this)); + } + _disownQueue() { + return utils.disown(this.queue); + } + /** + * A Queue binding, implemented by the named service. Requests to the + * namespace will be converted into HTTP requests targeting the given + * service name. + * */ + get queue() { + utils.testWhich("queue", utils.getUint16(0, this), 13, this); + return utils.getStruct(1, ServiceDesignator, this); + } + _hasQueue() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initQueue() { + utils.setUint16(0, 13, this); + return utils.initStructAt(1, ServiceDesignator, this); + } + get _isQueue() { + return utils.getUint16(0, this) === 13; + } + set queue(value) { + utils.setUint16(0, 13, this); + utils.copyFrom(value, utils.getPointer(1, this)); + } + /** + * Takes the value of an environment variable from the system. The value specified here is + * the name of a system environment variable. The value of the binding is obtained by invoking + * `getenv()` with that name. If the environment variable isn't set, the binding value is + * `null`. + * */ + get fromEnvironment() { + utils.testWhich("fromEnvironment", utils.getUint16(0, this), 14, this); + return utils.getText(1, this); + } + get _isFromEnvironment() { + return utils.getUint16(0, this) === 14; + } + set fromEnvironment(value) { + utils.setUint16(0, 14, this); + utils.setText(1, value, this); + } + _adoptAnalyticsEngine(value) { + utils.setUint16(0, 15, this); + utils.adopt(value, utils.getPointer(1, this)); + } + _disownAnalyticsEngine() { + return utils.disown(this.analyticsEngine); + } + /** + * A binding for Analytics Engine. Allows workers to store information through Analytics Engine Events. + * workerd will forward AnalyticsEngineEvents to designated service in the body of HTTP requests + * This binding is subject to change and requires the `--experimental` flag + * */ + get analyticsEngine() { + utils.testWhich("analyticsEngine", utils.getUint16(0, this), 15, this); + return utils.getStruct(1, ServiceDesignator, this); + } + _hasAnalyticsEngine() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initAnalyticsEngine() { + utils.setUint16(0, 15, this); + return utils.initStructAt(1, ServiceDesignator, this); + } + get _isAnalyticsEngine() { + return utils.getUint16(0, this) === 15; + } + set analyticsEngine(value) { + utils.setUint16(0, 15, this); + utils.copyFrom(value, utils.getPointer(1, this)); + } + /** + * A binding for Hyperdrive. Allows workers to use Hyperdrive caching & pooling for Postgres + * databases. + * */ + get hyperdrive() { + utils.testWhich("hyperdrive", utils.getUint16(0, this), 16, this); + return utils.getAs(Worker_Binding_Hyperdrive, this); + } + _initHyperdrive() { + utils.setUint16(0, 16, this); + return utils.getAs(Worker_Binding_Hyperdrive, this); + } + get _isHyperdrive() { + return utils.getUint16(0, this) === 16; + } + set hyperdrive(_) { + utils.setUint16(0, 16, this); + } + get _isUnsafeEval() { + return utils.getUint16(0, this) === 17; + } + set unsafeEval(_) { + utils.setUint16(0, 17, this); + } + /** + * A binding representing access to an in-memory cache. + * */ + get memoryCache() { + utils.testWhich("memoryCache", utils.getUint16(0, this), 18, this); + return utils.getAs(Worker_Binding_MemoryCache, this); + } + _initMemoryCache() { + utils.setUint16(0, 18, this); + return utils.getAs(Worker_Binding_MemoryCache, this); + } + get _isMemoryCache() { + return utils.getUint16(0, this) === 18; + } + set memoryCache(_) { + utils.setUint16(0, 18, this); + } + toString() { + return "Worker_Binding_" + super.toString(); + } + which() { + return utils.getUint16(0, this); + } +}; +var Worker_DurableObjectNamespace_Which = { + UNIQUE_KEY: 0, + EPHEMERAL_LOCAL: 1 +}; +var Worker_DurableObjectNamespace = class extends Struct { + static UNIQUE_KEY = Worker_DurableObjectNamespace_Which.UNIQUE_KEY; + static EPHEMERAL_LOCAL = Worker_DurableObjectNamespace_Which.EPHEMERAL_LOCAL; + static _capnp = { + displayName: "DurableObjectNamespace", + id: "b429dd547d15747d", + size: new ObjectSize(8, 2) + }; + /** + * Exported class name that implements the Durable Object. + * + * Changing the class name will not break compatibility with existing storage, so long as + * `uniqueKey` stays the same. + * */ + get className() { + return utils.getText(0, this); + } + set className(value) { + utils.setText(0, value, this); + } + /** + * A unique, stable ID associated with this namespace. This could be a GUID, or any other + * string which does not appear anywhere else in the world. + * + * This string is used to ensure that objects of this class have unique identifiers distinct + * from objects of any other class. Object IDs are cryptographically derived from `uniqueKey` + * and validated against it. It is impossible to guess or forge a valid object ID without + * knowing the `uniqueKey`. Hence, if you keep the key secret, you can prevent anyone from + * forging IDs. However, if you don't care if users can forge valid IDs, then it's not a big + * deal if the key leaks. + * + * DO NOT LOSE this key, otherwise it may be difficult or impossible to recover stored data. + * */ + get uniqueKey() { + utils.testWhich("uniqueKey", utils.getUint16(0, this), 0, this); + return utils.getText(1, this); + } + get _isUniqueKey() { + return utils.getUint16(0, this) === 0; + } + set uniqueKey(value) { + utils.setUint16(0, 0, this); + utils.setText(1, value, this); + } + get _isEphemeralLocal() { + return utils.getUint16(0, this) === 1; + } + set ephemeralLocal(_) { + utils.setUint16(0, 1, this); + } + /** + * By default, Durable Objects are evicted after 10 seconds of inactivity, and expire 70 seconds + * after all clients have disconnected. Some applications may want to keep their Durable Objects + * pinned to memory forever, so we provide this flag to change the default behavior. + * + * Note that this is only supported in Workerd; production Durable Objects cannot toggle eviction. + * */ + get preventEviction() { + return utils.getBit(16, this); + } + set preventEviction(value) { + utils.setBit(16, value, this); + } + /** + * Whether or not Durable Objects in this namespace can use the `storage.sql` API to execute SQL + * queries. + * + * workerd uses SQLite to back all Durable Objects, but the SQL API is hidden by default to + * emulate behavior of traditional DO namespaces on Cloudflare that aren't SQLite-backed. This + * flag should be enabled when testing code that will run on a SQLite-backed namespace. + * */ + get enableSql() { + return utils.getBit(17, this); + } + set enableSql(value) { + utils.setBit(17, value, this); + } + toString() { + return "Worker_DurableObjectNamespace_" + super.toString(); + } + which() { + return utils.getUint16(0, this); + } +}; +var Worker_DurableObjectStorage_Which = { + NONE: 0, + IN_MEMORY: 1, + LOCAL_DISK: 2 +}; +var Worker_DurableObjectStorage = class extends Struct { + static NONE = Worker_DurableObjectStorage_Which.NONE; + static IN_MEMORY = Worker_DurableObjectStorage_Which.IN_MEMORY; + static LOCAL_DISK = Worker_DurableObjectStorage_Which.LOCAL_DISK; + static _capnp = { + displayName: "durableObjectStorage", + id: "cc72b3faa57827d4", + size: new ObjectSize(8, 11) + }; + get _isNone() { + return utils.getUint16(2, this) === 0; + } + set none(_) { + utils.setUint16(2, 0, this); + } + get _isInMemory() { + return utils.getUint16(2, this) === 1; + } + set inMemory(_) { + utils.setUint16(2, 1, this); + } + /** + * ** EXPERIMENTAL; SUBJECT TO BACKWARDS-INCOMPATIBLE CHANGE ** + * + * Durable Object data will be stored in a directory on local disk. This field is the name of + * a service, which must be a DiskDirectory service. For each Durable Object class, a + * subdirectory will be created using `uniqueKey` as the name. Within the directory, one or + * more files are created for each object, with names `.`, where `.` may be any of + * a number of different extensions depending on the storage mode. (Currently, the main storage + * is a file with the extension `.sqlite`, and in certain situations extra files with the + * extensions `.sqlite-wal`, and `.sqlite-shm` may also be present.) + * */ + get localDisk() { + utils.testWhich("localDisk", utils.getUint16(2, this), 2, this); + return utils.getText(8, this); + } + get _isLocalDisk() { + return utils.getUint16(2, this) === 2; + } + set localDisk(value) { + utils.setUint16(2, 2, this); + utils.setText(8, value, this); + } + toString() { + return "Worker_DurableObjectStorage_" + super.toString(); + } + which() { + return utils.getUint16(2, this); + } +}; +var Worker_Which = { + MODULES: 0, + SERVICE_WORKER_SCRIPT: 1, + INHERIT: 2 +}; +var Worker = class _Worker extends Struct { + static MODULES = Worker_Which.MODULES; + static SERVICE_WORKER_SCRIPT = Worker_Which.SERVICE_WORKER_SCRIPT; + static INHERIT = Worker_Which.INHERIT; + static Module = Worker_Module; + static Binding = Worker_Binding; + static DurableObjectNamespace = Worker_DurableObjectNamespace; + static _capnp = { + displayName: "Worker", + id: "acfa77e88fd97d1c", + size: new ObjectSize(8, 11), + defaultGlobalOutbound: readRawPointer( + new Uint8Array([ + 16, + 7, + 80, + 1, + 3, + 0, + 0, + 17, + 9, + 74, + 0, + 1, + 255, + 105, + 110, + 116, + 101, + 114, + 110, + 101, + 116, + 0, + 0, + 0 + ]).buffer + ) + }; + static _Modules; + static _Bindings; + static _DurableObjectNamespaces; + static _Tails; + _adoptModules(value) { + utils.setUint16(0, 0, this); + utils.adopt(value, utils.getPointer(0, this)); + } + _disownModules() { + return utils.disown(this.modules); + } + /** + * The Worker is composed of ES modules that may import each other. The first module in the list + * is the main module, which exports event handlers. + * */ + get modules() { + utils.testWhich("modules", utils.getUint16(0, this), 0, this); + return utils.getList(0, _Worker._Modules, this); + } + _hasModules() { + return !utils.isNull(utils.getPointer(0, this)); + } + _initModules(length) { + utils.setUint16(0, 0, this); + return utils.initList(0, _Worker._Modules, length, this); + } + get _isModules() { + return utils.getUint16(0, this) === 0; + } + set modules(value) { + utils.setUint16(0, 0, this); + utils.copyFrom(value, utils.getPointer(0, this)); + } + /** + * The Worker is composed of one big script that uses global `addEventListener()` to register + * event handlers. + * + * The value of this field is the raw source code. When using Cap'n Proto text format, use the + * `embed` directive to read the code from an external file: + * + * serviceWorkerScript = embed "worker.js" + * */ + get serviceWorkerScript() { + utils.testWhich( + "serviceWorkerScript", + utils.getUint16(0, this), + 1, + this + ); + return utils.getText(0, this); + } + get _isServiceWorkerScript() { + return utils.getUint16(0, this) === 1; + } + set serviceWorkerScript(value) { + utils.setUint16(0, 1, this); + utils.setText(0, value, this); + } + /** + * Inherit the configuration of some other Worker by its service name. This Worker is a clone + * of the other worker, but various settings can be modified: + * * `bindings`, if specified, overrides specific named bindings. (Each binding listed in the + * derived worker must match the name and type of some binding in the inherited worker.) + * * `globalOutbound`, if non-null, overrides the one specified in the inherited worker. + * * `compatibilityDate` and `compatibilityFlags` CANNOT be modified; they must be null. + * * If the inherited worker defines durable object namespaces, then the derived worker must + * specify `durableObjectStorage` to specify where its instances should be stored. Each + * devived worker receives its own namespace of objects. `durableObjectUniqueKeyModifier` + * must also be specified by derived workers. + * + * This can be useful when you want to run the same Worker in multiple configurations or hooked + * up to different back-ends. Note that all derived workers run in the same isolate as the + * base worker; they differ in the content of the `env` object passed to them, which contains + * the bindings. (When using service workers syntax, the global scope contains the bindings; + * in this case each derived worker runs in its own global scope, though still in the same + * isolate.) + * */ + get inherit() { + utils.testWhich("inherit", utils.getUint16(0, this), 2, this); + return utils.getText(0, this); + } + get _isInherit() { + return utils.getUint16(0, this) === 2; + } + set inherit(value) { + utils.setUint16(0, 2, this); + utils.setText(0, value, this); + } + get compatibilityDate() { + return utils.getText(1, this); + } + set compatibilityDate(value) { + utils.setText(1, value, this); + } + _adoptCompatibilityFlags(value) { + utils.adopt(value, utils.getPointer(2, this)); + } + _disownCompatibilityFlags() { + return utils.disown(this.compatibilityFlags); + } + /** + * See: https://developers.cloudflare.com/workers/platform/compatibility-dates/ + * + * `compatibilityDate` must be specified, unless the Worker inhits from another worker, in which + * case it must not be specified. `compatibilityFlags` can optionally be specified when + * `compatibilityDate` is specified. + * */ + get compatibilityFlags() { + return utils.getList(2, TextList, this); + } + _hasCompatibilityFlags() { + return !utils.isNull(utils.getPointer(2, this)); + } + _initCompatibilityFlags(length) { + return utils.initList(2, TextList, length, this); + } + set compatibilityFlags(value) { + utils.copyFrom(value, utils.getPointer(2, this)); + } + _adoptBindings(value) { + utils.adopt(value, utils.getPointer(3, this)); + } + _disownBindings() { + return utils.disown(this.bindings); + } + /** + * List of bindings, which give the Worker access to external resources and configuration + * settings. + * + * For Workers using ES modules syntax, the bindings are delivered via the `env` object. For + * service workers syntax, each binding shows up as a global variable. + * */ + get bindings() { + return utils.getList(3, _Worker._Bindings, this); + } + _hasBindings() { + return !utils.isNull(utils.getPointer(3, this)); + } + _initBindings(length) { + return utils.initList(3, _Worker._Bindings, length, this); + } + set bindings(value) { + utils.copyFrom(value, utils.getPointer(3, this)); + } + _adoptGlobalOutbound(value) { + utils.adopt(value, utils.getPointer(4, this)); + } + _disownGlobalOutbound() { + return utils.disown(this.globalOutbound); + } + /** + * Where should the global "fetch" go to? The default is the service called "internet", which + * should usually be configured to talk to the public internet. + * */ + get globalOutbound() { + return utils.getStruct( + 4, + ServiceDesignator, + this, + _Worker._capnp.defaultGlobalOutbound + ); + } + _hasGlobalOutbound() { + return !utils.isNull(utils.getPointer(4, this)); + } + _initGlobalOutbound() { + return utils.initStructAt(4, ServiceDesignator, this); + } + set globalOutbound(value) { + utils.copyFrom(value, utils.getPointer(4, this)); + } + _adoptCacheApiOutbound(value) { + utils.adopt(value, utils.getPointer(7, this)); + } + _disownCacheApiOutbound() { + return utils.disown(this.cacheApiOutbound); + } + /** + * List of durable object namespaces in this Worker. + * */ + get cacheApiOutbound() { + return utils.getStruct(7, ServiceDesignator, this); + } + _hasCacheApiOutbound() { + return !utils.isNull(utils.getPointer(7, this)); + } + _initCacheApiOutbound() { + return utils.initStructAt(7, ServiceDesignator, this); + } + set cacheApiOutbound(value) { + utils.copyFrom(value, utils.getPointer(7, this)); + } + _adoptDurableObjectNamespaces(value) { + utils.adopt(value, utils.getPointer(5, this)); + } + _disownDurableObjectNamespaces() { + return utils.disown(this.durableObjectNamespaces); + } + /** + * Additional text which is hashed together with `DurableObjectNamespace.uniqueKey`. When using + * worker inheritance, each derived worker must specify a unique modifier to ensure that its + * Durable Object instances have unique IDs from all other workers inheriting the same parent. + * + * DO NOT LOSE this value, otherwise it may be difficult or impossible to recover stored data. + * */ + get durableObjectNamespaces() { + return utils.getList(5, _Worker._DurableObjectNamespaces, this); + } + _hasDurableObjectNamespaces() { + return !utils.isNull(utils.getPointer(5, this)); + } + _initDurableObjectNamespaces(length) { + return utils.initList(5, _Worker._DurableObjectNamespaces, length, this); + } + set durableObjectNamespaces(value) { + utils.copyFrom(value, utils.getPointer(5, this)); + } + /** + * Specifies where this worker's Durable Objects are stored. + * */ + get durableObjectUniqueKeyModifier() { + return utils.getText(6, this); + } + set durableObjectUniqueKeyModifier(value) { + utils.setText(6, value, this); + } + /** + * Where should cache API (i.e. caches.default and caches.open(...)) requests go? + * */ + get durableObjectStorage() { + return utils.getAs(Worker_DurableObjectStorage, this); + } + _initDurableObjectStorage() { + return utils.getAs(Worker_DurableObjectStorage, this); + } + get moduleFallback() { + return utils.getText(9, this); + } + set moduleFallback(value) { + utils.setText(9, value, this); + } + _adoptTails(value) { + utils.adopt(value, utils.getPointer(10, this)); + } + _disownTails() { + return utils.disown(this.tails); + } + /** + * List of tail worker services that should receive tail events for this worker. + * See: https://developers.cloudflare.com/workers/observability/logs/tail-workers/ + * */ + get tails() { + return utils.getList(10, _Worker._Tails, this); + } + _hasTails() { + return !utils.isNull(utils.getPointer(10, this)); + } + _initTails(length) { + return utils.initList(10, _Worker._Tails, length, this); + } + set tails(value) { + utils.copyFrom(value, utils.getPointer(10, this)); + } + toString() { + return "Worker_" + super.toString(); + } + which() { + return utils.getUint16(0, this); + } +}; +var ExternalServer_Https = class extends Struct { + static _capnp = { + displayName: "https", + id: "ac37e02afd3dc6db", + size: new ObjectSize(8, 4) + }; + _adoptOptions(value) { + utils.adopt(value, utils.getPointer(1, this)); + } + _disownOptions() { + return utils.disown(this.options); + } + get options() { + return utils.getStruct(1, HttpOptions, this); + } + _hasOptions() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initOptions() { + return utils.initStructAt(1, HttpOptions, this); + } + set options(value) { + utils.copyFrom(value, utils.getPointer(1, this)); + } + _adoptTlsOptions(value) { + utils.adopt(value, utils.getPointer(2, this)); + } + _disownTlsOptions() { + return utils.disown(this.tlsOptions); + } + get tlsOptions() { + return utils.getStruct(2, TlsOptions, this); + } + _hasTlsOptions() { + return !utils.isNull(utils.getPointer(2, this)); + } + _initTlsOptions() { + return utils.initStructAt(2, TlsOptions, this); + } + set tlsOptions(value) { + utils.copyFrom(value, utils.getPointer(2, this)); + } + /** + * If present, expect the host to present a certificate authenticating it as this hostname. + * If `certificateHost` is not provided, then the certificate is checked against `address`. + * */ + get certificateHost() { + return utils.getText(3, this); + } + set certificateHost(value) { + utils.setText(3, value, this); + } + toString() { + return "ExternalServer_Https_" + super.toString(); + } +}; +var ExternalServer_Tcp = class extends Struct { + static _capnp = { + displayName: "tcp", + id: "d941637df0fb39f1", + size: new ObjectSize(8, 4) + }; + _adoptTlsOptions(value) { + utils.adopt(value, utils.getPointer(1, this)); + } + _disownTlsOptions() { + return utils.disown(this.tlsOptions); + } + get tlsOptions() { + return utils.getStruct(1, TlsOptions, this); + } + _hasTlsOptions() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initTlsOptions() { + return utils.initStructAt(1, TlsOptions, this); + } + set tlsOptions(value) { + utils.copyFrom(value, utils.getPointer(1, this)); + } + get certificateHost() { + return utils.getText(2, this); + } + set certificateHost(value) { + utils.setText(2, value, this); + } + toString() { + return "ExternalServer_Tcp_" + super.toString(); + } +}; +var ExternalServer_Which = { + HTTP: 0, + HTTPS: 1, + TCP: 2 +}; +var ExternalServer = class extends Struct { + static HTTP = ExternalServer_Which.HTTP; + static HTTPS = ExternalServer_Which.HTTPS; + static TCP = ExternalServer_Which.TCP; + static _capnp = { + displayName: "ExternalServer", + id: "ff209f9aa352f5a4", + size: new ObjectSize(8, 4) + }; + /** + * Address/port of the server. Optional; if not specified, then you will be required to specify + * the address on the command line with with `--external-addr =`. + * + * Examples: + * - "1.2.3.4": Connect to the given IPv4 address on the protocol's default port. + * - "1.2.3.4:80": Connect to the given IPv4 address and port. + * - "1234:5678::abcd": Connect to the given IPv6 address on the protocol's default port. + * - "[1234:5678::abcd]:80": Connect to the given IPv6 address and port. + * - "unix:/path/to/socket": Connect to the given Unix Domain socket by path. + * - "unix-abstract:name": On Linux, connect to the given "abstract" Unix socket name. + * - "example.com:80": Perform a DNS lookup to determine the address, and then connect to it. + * + * (These are the formats supported by KJ's parseAddress().) + * */ + get address() { + return utils.getText(0, this); + } + set address(value) { + utils.setText(0, value, this); + } + _adoptHttp(value) { + utils.setUint16(0, 0, this); + utils.adopt(value, utils.getPointer(1, this)); + } + _disownHttp() { + return utils.disown(this.http); + } + /** + * Talk to the server over unencrypted HTTP. + * */ + get http() { + utils.testWhich("http", utils.getUint16(0, this), 0, this); + return utils.getStruct(1, HttpOptions, this); + } + _hasHttp() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initHttp() { + utils.setUint16(0, 0, this); + return utils.initStructAt(1, HttpOptions, this); + } + get _isHttp() { + return utils.getUint16(0, this) === 0; + } + set http(value) { + utils.setUint16(0, 0, this); + utils.copyFrom(value, utils.getPointer(1, this)); + } + /** + * Talk to the server over encrypted HTTPS. + * */ + get https() { + utils.testWhich("https", utils.getUint16(0, this), 1, this); + return utils.getAs(ExternalServer_Https, this); + } + _initHttps() { + utils.setUint16(0, 1, this); + return utils.getAs(ExternalServer_Https, this); + } + get _isHttps() { + return utils.getUint16(0, this) === 1; + } + set https(_) { + utils.setUint16(0, 1, this); + } + /** + * Connect to the server over raw TCP. Bindings to this service will only support the + * `connect()` method; `fetch()` will throw an exception. + * */ + get tcp() { + utils.testWhich("tcp", utils.getUint16(0, this), 2, this); + return utils.getAs(ExternalServer_Tcp, this); + } + _initTcp() { + utils.setUint16(0, 2, this); + return utils.getAs(ExternalServer_Tcp, this); + } + get _isTcp() { + return utils.getUint16(0, this) === 2; + } + set tcp(_) { + utils.setUint16(0, 2, this); + } + toString() { + return "ExternalServer_" + super.toString(); + } + which() { + return utils.getUint16(0, this); + } +}; +var Network = class _Network extends Struct { + static _capnp = { + displayName: "Network", + id: "fa42244f950c9b9c", + size: new ObjectSize(0, 3), + defaultAllow: readRawPointer( + new Uint8Array([ + 16, + 3, + 17, + 1, + 14, + 17, + 1, + 58, + 63, + 112, + 117, + 98, + 108, + 105, + 99 + ]).buffer + ) + }; + _adoptAllow(value) { + utils.adopt(value, utils.getPointer(0, this)); + } + _disownAllow() { + return utils.disown(this.allow); + } + get allow() { + return utils.getList(0, TextList, this, _Network._capnp.defaultAllow); + } + _hasAllow() { + return !utils.isNull(utils.getPointer(0, this)); + } + _initAllow(length) { + return utils.initList(0, TextList, length, this); + } + set allow(value) { + utils.copyFrom(value, utils.getPointer(0, this)); + } + _adoptDeny(value) { + utils.adopt(value, utils.getPointer(1, this)); + } + _disownDeny() { + return utils.disown(this.deny); + } + /** + * Specifies which network addresses the Worker will be allowed to connect to, e.g. using fetch(). + * The default allows publicly-routable IP addresses only, in order to prevent SSRF attacks. + * + * The allow and deny lists specify network blocks in CIDR notation (IPv4 and IPv6), such as + * "192.0.2.0/24" or "2001:db8::/32". Traffic will be permitted as long as the address + * matches at least one entry in the allow list and none in the deny list. + * + * In addition to IPv4 and IPv6 CIDR notation, several special strings may be specified: + * - "private": Matches network addresses that are reserved by standards for private networks, + * such as "10.0.0.0/8" or "192.168.0.0/16". This is a superset of "local". + * - "public": Opposite of "private". + * - "local": Matches network addresses that are defined by standards to only be accessible from + * the local machine, such as "127.0.0.0/8" or Unix domain addresses. + * - "network": Opposite of "local". + * - "unix": Matches all Unix domain socket addresses. (In the future, we may support specifying a + * glob to narrow this to specific paths.) + * - "unix-abstract": Matches Linux's "abstract unix domain" addresses. (In the future, we may + * support specifying a glob.) + * + * In the case that the Worker specifies a DNS hostname rather than a raw address, these rules are + * used to filter the addresses returned by the lookup. If none of the returned addresses turn + * out to be permitted, then the system will behave as if the DNS entry did not exist. + * + * (The above is exactly the format supported by kj::Network::restrictPeers().) + * */ + get deny() { + return utils.getList(1, TextList, this); + } + _hasDeny() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initDeny(length) { + return utils.initList(1, TextList, length, this); + } + set deny(value) { + utils.copyFrom(value, utils.getPointer(1, this)); + } + _adoptTlsOptions(value) { + utils.adopt(value, utils.getPointer(2, this)); + } + _disownTlsOptions() { + return utils.disown(this.tlsOptions); + } + get tlsOptions() { + return utils.getStruct(2, TlsOptions, this); + } + _hasTlsOptions() { + return !utils.isNull(utils.getPointer(2, this)); + } + _initTlsOptions() { + return utils.initStructAt(2, TlsOptions, this); + } + set tlsOptions(value) { + utils.copyFrom(value, utils.getPointer(2, this)); + } + toString() { + return "Network_" + super.toString(); + } +}; +var DiskDirectory = class _DiskDirectory extends Struct { + static _capnp = { + displayName: "DiskDirectory", + id: "9048ab22835f51c3", + size: new ObjectSize(8, 1), + defaultWritable: getBitMask(false, 0), + defaultAllowDotfiles: getBitMask(false, 1) + }; + /** + * The filesystem path of the directory. If not specified, then it must be specified on the + * command line with `--directory-path =`. + * + * Relative paths are interpreted relative to the current directory where the server is executed, + * NOT relative to the config file. So, you should usually use absolute paths in the config file. + * */ + get path() { + return utils.getText(0, this); + } + set path(value) { + utils.setText(0, value, this); + } + /** + * Whether to support PUT requests for writing. A PUT will write to a temporary file which + * is atomically moved into place upon successful completion of the upload. Parent directories are + * created as needed. + * */ + get writable() { + return utils.getBit(0, this, _DiskDirectory._capnp.defaultWritable); + } + set writable(value) { + utils.setBit(0, value, this, _DiskDirectory._capnp.defaultWritable); + } + /** + * Whether to allow access to files and directories whose name starts with '.'. These are made + * inaccessible by default since they very often store metadata that is not meant to be served, + * e.g. a git repository or an `.htaccess` file. + * + * Note that the special links "." and ".." will never be accessible regardless of this setting. + * */ + get allowDotfiles() { + return utils.getBit(1, this, _DiskDirectory._capnp.defaultAllowDotfiles); + } + set allowDotfiles(value) { + utils.setBit(1, value, this, _DiskDirectory._capnp.defaultAllowDotfiles); + } + toString() { + return "DiskDirectory_" + super.toString(); + } +}; +var HttpOptions_Style = { + HOST: 0, + PROXY: 1 +}; +var HttpOptions_Header = class extends Struct { + static _capnp = { + displayName: "Header", + id: "dc0394b5a6f3417e", + size: new ObjectSize(0, 2) + }; + /** + * Case-insensitive. + * */ + get name() { + return utils.getText(0, this); + } + set name(value) { + utils.setText(0, value, this); + } + /** + * If null, the header will be removed. + * */ + get value() { + return utils.getText(1, this); + } + set value(value) { + utils.setText(1, value, this); + } + toString() { + return "HttpOptions_Header_" + super.toString(); + } +}; +var HttpOptions = class _HttpOptions extends Struct { + static Style = HttpOptions_Style; + static Header = HttpOptions_Header; + static _capnp = { + displayName: "HttpOptions", + id: "aa8dc6885da78f19", + size: new ObjectSize(8, 5), + defaultStyle: getUint16Mask(0) + }; + static _InjectRequestHeaders; + static _InjectResponseHeaders; + get style() { + return utils.getUint16( + 0, + this, + _HttpOptions._capnp.defaultStyle + ); + } + set style(value) { + utils.setUint16(0, value, this, _HttpOptions._capnp.defaultStyle); + } + /** + * If specified, then when the given header is present on a request, it specifies the protocol + * ("http" or "https") that was used by the original client. The request URL reported to the + * Worker will reflect this protocol. Otherwise, the URL will reflect the actual physical protocol + * used by the server in receiving the request. + * + * This option is useful when this server sits behind a reverse proxy that performs TLS + * termination. Typically such proxies forward the original protocol in a header named something + * like "X-Forwarded-Proto". + * + * This setting is ignored when `style` is `proxy`. + * */ + get forwardedProtoHeader() { + return utils.getText(0, this); + } + set forwardedProtoHeader(value) { + utils.setText(0, value, this); + } + /** + * If set, then the `request.cf` object will be encoded (as JSON) into / parsed from the header + * with this name. Otherwise, it will be discarded on send / `undefined` on receipt. + * */ + get cfBlobHeader() { + return utils.getText(1, this); + } + set cfBlobHeader(value) { + utils.setText(1, value, this); + } + _adoptInjectRequestHeaders(value) { + utils.adopt(value, utils.getPointer(2, this)); + } + _disownInjectRequestHeaders() { + return utils.disown(this.injectRequestHeaders); + } + /** + * List of headers which will be automatically injected into all requests. This can be used + * e.g. to add an authorization token to all requests when using `ExternalServer`. It can also + * apply to incoming requests received on a `Socket` to modify the headers that will be delivered + * to the app. Any existing header with the same name is removed. + * */ + get injectRequestHeaders() { + return utils.getList(2, _HttpOptions._InjectRequestHeaders, this); + } + _hasInjectRequestHeaders() { + return !utils.isNull(utils.getPointer(2, this)); + } + _initInjectRequestHeaders(length) { + return utils.initList(2, _HttpOptions._InjectRequestHeaders, length, this); + } + set injectRequestHeaders(value) { + utils.copyFrom(value, utils.getPointer(2, this)); + } + _adoptInjectResponseHeaders(value) { + utils.adopt(value, utils.getPointer(3, this)); + } + _disownInjectResponseHeaders() { + return utils.disown(this.injectResponseHeaders); + } + /** + * Same as `injectRequestHeaders` but for responses. + * */ + get injectResponseHeaders() { + return utils.getList(3, _HttpOptions._InjectResponseHeaders, this); + } + _hasInjectResponseHeaders() { + return !utils.isNull(utils.getPointer(3, this)); + } + _initInjectResponseHeaders(length) { + return utils.initList( + 3, + _HttpOptions._InjectResponseHeaders, + length, + this + ); + } + set injectResponseHeaders(value) { + utils.copyFrom(value, utils.getPointer(3, this)); + } + /** + * A CONNECT request for this host+port will be treated as a request to form a Cap'n Proto RPC + * connection. The server will expose a WorkerdBootstrap as the bootstrap interface, allowing + * events to be delivered to the target worker via capnp. Clients will use capnp for non-HTTP + * event types (especially JSRPC). + * */ + get capnpConnectHost() { + return utils.getText(4, this); + } + set capnpConnectHost(value) { + utils.setText(4, value, this); + } + toString() { + return "HttpOptions_" + super.toString(); + } +}; +var TlsOptions_Keypair = class extends Struct { + static _capnp = { + displayName: "Keypair", + id: "f546bf2d5d8bd13e", + size: new ObjectSize(0, 2) + }; + /** + * Private key in PEM format. Supports PKCS8 keys as well as "traditional format" RSA and DSA + * keys. + * + * Remember that you can use Cap'n Proto's `embed` syntax to reference an external file. + * */ + get privateKey() { + return utils.getText(0, this); + } + set privateKey(value) { + utils.setText(0, value, this); + } + /** + * Certificate chain in PEM format. A chain can be constructed by concatenating multiple + * PEM-encoded certificates, starting with the leaf certificate. + * */ + get certificateChain() { + return utils.getText(1, this); + } + set certificateChain(value) { + utils.setText(1, value, this); + } + toString() { + return "TlsOptions_Keypair_" + super.toString(); + } +}; +var TlsOptions_Version = { + GOOD_DEFAULT: 0, + SSL3: 1, + TLS1DOT0: 2, + TLS1DOT1: 3, + TLS1DOT2: 4, + TLS1DOT3: 5 +}; +var TlsOptions = class _TlsOptions extends Struct { + static Keypair = TlsOptions_Keypair; + static Version = TlsOptions_Version; + static _capnp = { + displayName: "TlsOptions", + id: "aabb3c3778ac4311", + size: new ObjectSize(8, 3), + defaultRequireClientCerts: getBitMask(false, 0), + defaultTrustBrowserCas: getBitMask(false, 1), + defaultMinVersion: getUint16Mask(0) + }; + _adoptKeypair(value) { + utils.adopt(value, utils.getPointer(0, this)); + } + _disownKeypair() { + return utils.disown(this.keypair); + } + /** + * The default private key and certificate to use. Optional when acting as a client. + * */ + get keypair() { + return utils.getStruct(0, TlsOptions_Keypair, this); + } + _hasKeypair() { + return !utils.isNull(utils.getPointer(0, this)); + } + _initKeypair() { + return utils.initStructAt(0, TlsOptions_Keypair, this); + } + set keypair(value) { + utils.copyFrom(value, utils.getPointer(0, this)); + } + /** + * If true, then when acting as a server, incoming connections will be rejected unless they bear + * a certificate signed by one of the trusted CAs. + * + * Typically, when using this, you'd set `trustBrowserCas = false` and list a specific private CA + * in `trustedCertificates`. + * */ + get requireClientCerts() { + return utils.getBit(0, this, _TlsOptions._capnp.defaultRequireClientCerts); + } + set requireClientCerts(value) { + utils.setBit(0, value, this, _TlsOptions._capnp.defaultRequireClientCerts); + } + /** + * If true, trust certificates which are signed by one of the CAs that browsers normally trust. + * You should typically set this true when talking to the public internet, but you may want to + * set it false when talking to servers on your internal network. + * */ + get trustBrowserCas() { + return utils.getBit(1, this, _TlsOptions._capnp.defaultTrustBrowserCas); + } + set trustBrowserCas(value) { + utils.setBit(1, value, this, _TlsOptions._capnp.defaultTrustBrowserCas); + } + _adoptTrustedCertificates(value) { + utils.adopt(value, utils.getPointer(1, this)); + } + _disownTrustedCertificates() { + return utils.disown(this.trustedCertificates); + } + /** + * Additional CA certificates to trust, in PEM format. Remember that you can use Cap'n Proto's + * `embed` syntax to read the certificates from other files. + * */ + get trustedCertificates() { + return utils.getList(1, TextList, this); + } + _hasTrustedCertificates() { + return !utils.isNull(utils.getPointer(1, this)); + } + _initTrustedCertificates(length) { + return utils.initList(1, TextList, length, this); + } + set trustedCertificates(value) { + utils.copyFrom(value, utils.getPointer(1, this)); + } + /** + * Minimum TLS version that will be allowed. Generally you should not override this unless you + * have unusual backwards-compatibility needs. + * */ + get minVersion() { + return utils.getUint16( + 2, + this, + _TlsOptions._capnp.defaultMinVersion + ); + } + set minVersion(value) { + utils.setUint16(2, value, this, _TlsOptions._capnp.defaultMinVersion); + } + /** + * OpenSSL cipher list string. The default is a curated list designed to be compatible with + * almost all software in current use (specifically, based on Mozilla's "intermediate" + * recommendations). The defaults will change in future versions of this software to account + * for the latest cryptanalysis. + * + * Generally you should only specify your own `cipherList` if: + * - You have extreme backwards-compatibility needs and wish to enable obsolete and/or broken + * algorithms. + * - You need quickly to disable an algorithm recently discovered to be broken. + * */ + get cipherList() { + return utils.getText(2, this); + } + set cipherList(value) { + utils.setText(2, value, this); + } + toString() { + return "TlsOptions_" + super.toString(); + } +}; +var Extension_Module = class _Extension_Module extends Struct { + static _capnp = { + displayName: "Module", + id: "d5d16e76fdedc37d", + size: new ObjectSize(8, 2), + defaultInternal: getBitMask(false, 0) + }; + /** + * Full js module name. + * */ + get name() { + return utils.getText(0, this); + } + set name(value) { + utils.setText(0, value, this); + } + /** + * Internal modules can be imported by other extension modules only and not the user code. + * */ + get internal() { + return utils.getBit(0, this, _Extension_Module._capnp.defaultInternal); + } + set internal(value) { + utils.setBit(0, value, this, _Extension_Module._capnp.defaultInternal); + } + /** + * Raw source code of ES module. + * */ + get esModule() { + return utils.getText(1, this); + } + set esModule(value) { + utils.setText(1, value, this); + } + toString() { + return "Extension_Module_" + super.toString(); + } +}; +var Extension = class _Extension extends Struct { + static Module = Extension_Module; + static _capnp = { + displayName: "Extension", + id: "e390128a861973a6", + size: new ObjectSize(0, 1) + }; + static _Modules; + _adoptModules(value) { + utils.adopt(value, utils.getPointer(0, this)); + } + _disownModules() { + return utils.disown(this.modules); + } + /** + * List of javascript modules provided by the extension. + * These modules can either be imported directly as user-level api (if not marked internal) + * or used to define more complicated workerd constructs such as wrapped bindings and events. + * */ + get modules() { + return utils.getList(0, _Extension._Modules, this); + } + _hasModules() { + return !utils.isNull(utils.getPointer(0, this)); + } + _initModules(length) { + return utils.initList(0, _Extension._Modules, length, this); + } + set modules(value) { + utils.copyFrom(value, utils.getPointer(0, this)); + } + toString() { + return "Extension_" + super.toString(); + } +}; +Config._Services = CompositeList(Service); +Config._Sockets = CompositeList(Socket); +Config._Extensions = CompositeList(Extension); +Worker_Binding_WrappedBinding._InnerBindings = CompositeList(Worker_Binding); +Worker._Modules = CompositeList(Worker_Module); +Worker._Bindings = CompositeList(Worker_Binding); +Worker._DurableObjectNamespaces = CompositeList( + Worker_DurableObjectNamespace +); +Worker._Tails = CompositeList(ServiceDesignator); +HttpOptions._InjectRequestHeaders = CompositeList(HttpOptions_Header); +HttpOptions._InjectResponseHeaders = CompositeList(HttpOptions_Header); +Extension._Modules = CompositeList(Extension_Module); + +// src/runtime/config/workerd.ts +var kVoid = Symbol("kVoid"); + +// src/runtime/config/index.ts +function capitalize(str) { + return str.length > 0 ? str[0].toUpperCase() + str.substring(1) : str; +} +function encodeCapnpStruct(obj, struct) { + const anyStruct = struct; + for (const [key, value] of Object.entries(obj)) { + const capitalized = capitalize(key); + const safeKey = key === "constructor" ? `$${key}` : key; + if (value instanceof Uint8Array) { + const newData = anyStruct[`_init${capitalized}`](value.byteLength); + newData.copyBuffer(value); + } else if (Array.isArray(value)) { + const newList = anyStruct[`_init${capitalized}`](value.length); + for (let i = 0; i < value.length; i++) { + if (typeof value[i] === "object") { + encodeCapnpStruct(value[i], newList.get(i)); + } else { + newList.set(i, value[i]); + } + } + } else if (typeof value === "object") { + const newStruct = anyStruct[`_init${capitalized}`](); + encodeCapnpStruct(value, newStruct); + } else if (value === kVoid) { + anyStruct[safeKey] = void 0; + } else if (value !== void 0) { + anyStruct[safeKey] = value; + } + } +} +function serializeConfig(config) { + const message = new Message(); + const struct = message.initRoot(Config); + encodeCapnpStruct(config, struct); + return Buffer.from(message.toArrayBuffer()); +} + +// src/runtime/index.ts +var ControlMessageSchema = import_zod8.z.discriminatedUnion("event", [ + import_zod8.z.object({ + event: import_zod8.z.literal("listen"), + socket: import_zod8.z.string(), + port: import_zod8.z.number() + }), + import_zod8.z.object({ + event: import_zod8.z.literal("listen-inspector"), + port: import_zod8.z.number() + }) +]); +var kInspectorSocket = Symbol("kInspectorSocket"); +async function waitForPorts(stream, options) { + if (options?.signal?.aborted) return; + const lines = import_readline.default.createInterface(stream); + const abortListener = () => lines.close(); + options?.signal?.addEventListener("abort", abortListener, { once: true }); + const requiredSockets = Array.from(options.requiredSockets); + const socketPorts = /* @__PURE__ */ new Map(); + try { + for await (const line of lines) { + const message = ControlMessageSchema.safeParse(JSON.parse(line)); + if (!message.success) continue; + const data = message.data; + const socket = data.event === "listen-inspector" ? kInspectorSocket : data.socket; + const index = requiredSockets.indexOf(socket); + if (index === -1) continue; + socketPorts.set(socket, data.port); + requiredSockets.splice(index, 1); + if (requiredSockets.length === 0) return socketPorts; + } + } finally { + options?.signal?.removeEventListener("abort", abortListener); + } +} +function waitForExit(process2) { + return new Promise((resolve2) => { + process2.once("exit", () => resolve2()); + }); +} +function pipeOutput(stdout, stderr) { + import_readline.default.createInterface(stdout).on("line", (data) => console.log(data)); + import_readline.default.createInterface(stderr).on("line", (data) => console.error(red(data))); +} +function getRuntimeCommand() { + return process.env.MINIFLARE_WORKERD_PATH ?? import_workerd2.default; +} +function getRuntimeArgs(options) { + const args = [ + "serve", + // Required to use binary capnp config + "--binary", + // Required to use compatibility flags without a default-on date, + // (e.g. "streams_enable_constructors"), see https://github.com/cloudflare/workerd/pull/21 + "--experimental", + `--socket-addr=${SOCKET_ENTRY}=${options.entryAddress}`, + `--external-addr=${SERVICE_LOOPBACK}=${options.loopbackAddress}`, + // Configure extra pipe for receiving control messages (e.g. when ready) + "--control-fd=3", + // Read config from stdin + "-" + ]; + if (options.inspectorAddress !== void 0) { + args.push(`--inspector-addr=${options.inspectorAddress}`); + } + if (options.verbose) { + args.push("--verbose"); + } + return args; +} +var Runtime = class { + #process; + #processExitPromise; + async updateConfig(configBuffer, options) { + await this.dispose(); + const command = getRuntimeCommand(); + const args = getRuntimeArgs(options); + const FORCE_COLOR2 = $.enabled ? "1" : "0"; + const runtimeProcess = import_child_process.default.spawn(command, args, { + stdio: ["pipe", "pipe", "pipe", "pipe"], + env: { ...process.env, FORCE_COLOR: FORCE_COLOR2 } + }); + this.#process = runtimeProcess; + this.#processExitPromise = waitForExit(runtimeProcess); + const handleRuntimeStdio = options.handleRuntimeStdio ?? pipeOutput; + handleRuntimeStdio(runtimeProcess.stdout, runtimeProcess.stderr); + const controlPipe = runtimeProcess.stdio[3]; + (0, import_assert4.default)(controlPipe instanceof import_stream.Readable); + runtimeProcess.stdin.write(configBuffer); + runtimeProcess.stdin.end(); + await (0, import_events2.once)(runtimeProcess.stdin, "finish"); + return waitForPorts(controlPipe, options); + } + dispose() { + this.#process?.kill("SIGKILL"); + return this.#processExitPromise; + } +}; + +// src/plugins/assets/constants.ts +var ASSETS_PLUGIN_NAME = "assets"; +var ASSETS_SERVICE_NAME = `${ASSETS_PLUGIN_NAME}:assets-service`; +var ROUTER_SERVICE_NAME = `${ASSETS_PLUGIN_NAME}:router`; +var RPC_PROXY_SERVICE_NAME = `${ASSETS_PLUGIN_NAME}:rpc-proxy`; +var ASSETS_KV_SERVICE_NAME = `${ASSETS_PLUGIN_NAME}:kv`; + +// src/plugins/cache/index.ts +var import_promises4 = __toESM(require("fs/promises")); + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/cache/cache.worker.ts +var import_fs13 = __toESM(require("fs")); +var import_path16 = __toESM(require("path")); +var import_url14 = __toESM(require("url")); +var contents12; +function cache_worker_default() { + if (contents12 !== void 0) return contents12; + const filePath = import_path16.default.join(__dirname, "workers", "cache/cache.worker.js"); + contents12 = import_fs13.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url14.default.pathToFileURL(filePath); + return contents12; +} + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/cache/cache-entry.worker.ts +var import_fs14 = __toESM(require("fs")); +var import_path17 = __toESM(require("path")); +var import_url15 = __toESM(require("url")); +var contents13; +function cache_entry_worker_default() { + if (contents13 !== void 0) return contents13; + const filePath = import_path17.default.join(__dirname, "workers", "cache/cache-entry.worker.js"); + contents13 = import_fs14.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url15.default.pathToFileURL(filePath); + return contents13; +} + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/cache/cache-entry-noop.worker.ts +var import_fs15 = __toESM(require("fs")); +var import_path18 = __toESM(require("path")); +var import_url16 = __toESM(require("url")); +var contents14; +function cache_entry_noop_worker_default() { + if (contents14 !== void 0) return contents14; + const filePath = import_path18.default.join(__dirname, "workers", "cache/cache-entry-noop.worker.js"); + contents14 = import_fs15.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url16.default.pathToFileURL(filePath); + return contents14; +} + +// src/plugins/cache/index.ts +var import_zod9 = require("zod"); +var CacheOptionsSchema = import_zod9.z.object({ + cache: import_zod9.z.boolean().optional(), + cacheWarnUsage: import_zod9.z.boolean().optional() +}); +var CacheSharedOptionsSchema = import_zod9.z.object({ + cachePersist: PersistenceSchema +}); +var CACHE_PLUGIN_NAME = "cache"; +var CACHE_STORAGE_SERVICE_NAME = `${CACHE_PLUGIN_NAME}:storage`; +var CACHE_SERVICE_PREFIX = `${CACHE_PLUGIN_NAME}:cache`; +var CACHE_OBJECT_CLASS_NAME = "CacheObject"; +var CACHE_OBJECT = { + serviceName: CACHE_SERVICE_PREFIX, + className: CACHE_OBJECT_CLASS_NAME +}; +function getCacheServiceName(workerIndex) { + return `${CACHE_PLUGIN_NAME}:${workerIndex}`; +} +var CACHE_PLUGIN = { + options: CacheOptionsSchema, + sharedOptions: CacheSharedOptionsSchema, + getBindings() { + return []; + }, + getNodeBindings() { + return {}; + }, + async getServices({ + sharedOptions, + options, + workerIndex, + tmpPath, + unsafeStickyBlobs + }) { + const cache = options.cache ?? true; + const cacheWarnUsage = options.cacheWarnUsage ?? false; + let entryWorker; + if (cache) { + entryWorker = { + compatibilityDate: "2023-07-24", + compatibilityFlags: ["nodejs_compat", "experimental"], + modules: [ + { name: "cache-entry.worker.js", esModule: cache_entry_worker_default() } + ], + bindings: [ + { + name: SharedBindings.DURABLE_OBJECT_NAMESPACE_OBJECT, + durableObjectNamespace: CACHE_OBJECT + }, + { + name: CacheBindings.MAYBE_JSON_CACHE_WARN_USAGE, + json: JSON.stringify(cacheWarnUsage) + } + ] + }; + } else { + entryWorker = { + compatibilityDate: "2023-07-24", + compatibilityFlags: ["nodejs_compat", "experimental"], + modules: [ + { + name: "cache-entry-noop.worker.js", + esModule: cache_entry_noop_worker_default() + } + ] + }; + } + const services = [ + { name: getCacheServiceName(workerIndex), worker: entryWorker } + ]; + if (cache) { + const uniqueKey = `miniflare-${CACHE_OBJECT_CLASS_NAME}`; + const persist = sharedOptions.cachePersist; + const persistPath = getPersistPath(CACHE_PLUGIN_NAME, tmpPath, persist); + await import_promises4.default.mkdir(persistPath, { recursive: true }); + const storageService = { + name: CACHE_STORAGE_SERVICE_NAME, + disk: { path: persistPath, writable: true } + }; + const objectService = { + name: CACHE_SERVICE_PREFIX, + worker: { + compatibilityDate: "2023-07-24", + compatibilityFlags: ["nodejs_compat", "experimental"], + modules: [ + { + name: "cache.worker.js", + esModule: cache_worker_default() + } + ], + durableObjectNamespaces: [ + { + className: CACHE_OBJECT_CLASS_NAME, + uniqueKey + } + ], + // Store Durable Object SQL databases in persist path + durableObjectStorage: { localDisk: CACHE_STORAGE_SERVICE_NAME }, + // Bind blob disk directory service to object + bindings: [ + { + name: SharedBindings.MAYBE_SERVICE_BLOBS, + service: { name: CACHE_STORAGE_SERVICE_NAME } + }, + { + name: SharedBindings.MAYBE_SERVICE_LOOPBACK, + service: { name: SERVICE_LOOPBACK } + }, + ...getMiniflareObjectBindings(unsafeStickyBlobs) + ] + } + }; + services.push(storageService, objectService); + } + return services; + }, + getPersistPath({ cachePersist }, tmpPath) { + return getPersistPath(CACHE_PLUGIN_NAME, tmpPath, cachePersist); + } +}; + +// src/plugins/do/index.ts +var import_promises5 = __toESM(require("fs/promises")); +var import_zod10 = require("zod"); +var DurableObjectsOptionsSchema = import_zod10.z.object({ + durableObjects: import_zod10.z.record( + import_zod10.z.union([ + import_zod10.z.string(), + import_zod10.z.object({ + className: import_zod10.z.string(), + scriptName: import_zod10.z.string().optional(), + useSQLite: import_zod10.z.boolean().optional(), + // Allow `uniqueKey` to be customised. We use in Wrangler when setting + // up stub Durable Objects that proxy requests to Durable Objects in + // another `workerd` process, to ensure the IDs created by the stub + // object can be used by the real object too. + unsafeUniqueKey: import_zod10.z.union([import_zod10.z.string(), import_zod10.z.literal(kUnsafeEphemeralUniqueKey)]).optional(), + // Prevents the Durable Object being evicted. + unsafePreventEviction: import_zod10.z.boolean().optional(), + mixedModeConnectionString: import_zod10.z.custom().optional() + }) + ]) + ).optional() +}); +var DurableObjectsSharedOptionsSchema = import_zod10.z.object({ + durableObjectsPersist: PersistenceSchema +}); +function normaliseDurableObject(designator) { + const isObject = typeof designator === "object"; + const className = isObject ? designator.className : designator; + const serviceName = isObject && designator.scriptName !== void 0 ? getUserServiceName(designator.scriptName) : void 0; + const enableSql = isObject ? designator.useSQLite : void 0; + const unsafeUniqueKey = isObject ? designator.unsafeUniqueKey : void 0; + const unsafePreventEviction = isObject ? designator.unsafePreventEviction : void 0; + return { + className, + serviceName, + enableSql, + unsafeUniqueKey, + unsafePreventEviction + }; +} +var DURABLE_OBJECTS_PLUGIN_NAME = "do"; +var DURABLE_OBJECTS_STORAGE_SERVICE_NAME = `${DURABLE_OBJECTS_PLUGIN_NAME}:storage`; +var DURABLE_OBJECTS_PLUGIN = { + options: DurableObjectsOptionsSchema, + sharedOptions: DurableObjectsSharedOptionsSchema, + getBindings(options) { + return Object.entries(options.durableObjects ?? {}).map( + ([name, klass]) => { + const { className, serviceName } = normaliseDurableObject(klass); + return { + name, + durableObjectNamespace: { className, serviceName } + }; + } + ); + }, + getNodeBindings(options) { + const objects = Object.keys(options.durableObjects ?? {}); + return Object.fromEntries( + objects.map((name) => [name, new ProxyNodeBinding()]) + ); + }, + async getServices({ + sharedOptions, + tmpPath, + durableObjectClassNames, + unsafeEphemeralDurableObjects + }) { + let hasDurableObjects = false; + for (const classNames of durableObjectClassNames.values()) { + if (classNames.size > 0) { + hasDurableObjects = true; + break; + } + } + if (!hasDurableObjects) return; + if (unsafeEphemeralDurableObjects) return; + const storagePath = getPersistPath( + DURABLE_OBJECTS_PLUGIN_NAME, + tmpPath, + sharedOptions.durableObjectsPersist + ); + await import_promises5.default.mkdir(storagePath, { recursive: true }); + return [ + { + // Note this service will be de-duped by name if multiple Workers create + // it. Each Worker will have the same `sharedOptions` though, so this + // isn't a problem. + name: DURABLE_OBJECTS_STORAGE_SERVICE_NAME, + disk: { path: storagePath, writable: true } + } + ]; + }, + getPersistPath({ durableObjectsPersist }, tmpPath) { + return getPersistPath( + DURABLE_OBJECTS_PLUGIN_NAME, + tmpPath, + durableObjectsPersist + ); + } +}; + +// src/plugins/core/constants.ts +var CORE_PLUGIN_NAME = "core"; +var SERVICE_ENTRY = `${CORE_PLUGIN_NAME}:entry`; +var SERVICE_USER_PREFIX = `${CORE_PLUGIN_NAME}:user`; +var SERVICE_BUILTIN_PREFIX = `${CORE_PLUGIN_NAME}:builtin`; +var SERVICE_CUSTOM_PREFIX = `${CORE_PLUGIN_NAME}:custom`; +function getUserServiceName(workerName = "") { + return `${SERVICE_USER_PREFIX}:${workerName}`; +} +var CUSTOM_SERVICE_KNOWN_OUTBOUND = "outbound"; +function getBuiltinServiceName(workerIndex, kind, bindingName) { + return `${SERVICE_BUILTIN_PREFIX}:${workerIndex}:${kind}${bindingName}`; +} +function getCustomServiceName(workerIndex, kind, bindingName) { + return `${SERVICE_CUSTOM_PREFIX}:${workerIndex}:${kind}${bindingName}`; +} + +// src/plugins/core/modules.ts +var import_assert5 = __toESM(require("assert")); +var import_fs16 = require("fs"); +var import_module = require("module"); +var import_path19 = __toESM(require("path")); +var import_url17 = require("url"); +var import_util = require("util"); +var import_acorn = require("acorn"); +var import_acorn_walk = require("acorn-walk"); +var import_zod11 = require("zod"); + +// src/plugins/core/node-compat.ts +function getNodeCompat(compatibilityDate = "2000-01-01", compatibilityFlags) { + const { + hasNodejsAlsFlag, + hasNodejsCompatFlag, + hasNodejsCompatV2Flag, + hasNoNodejsCompatV2Flag, + hasExperimentalNodejsCompatV2Flag + } = parseNodeCompatibilityFlags(compatibilityFlags); + const nodeCompatSwitchOverDate = "2024-09-23"; + let mode = null; + if (hasNodejsCompatV2Flag || hasNodejsCompatFlag && compatibilityDate >= nodeCompatSwitchOverDate && !hasNoNodejsCompatV2Flag) { + mode = "v2"; + } else if (hasNodejsCompatFlag) { + mode = "v1"; + } else if (hasNodejsAlsFlag) { + mode = "als"; + } + return { + mode, + hasNodejsAlsFlag, + hasNodejsCompatFlag, + hasNodejsCompatV2Flag, + hasNoNodejsCompatV2Flag, + hasExperimentalNodejsCompatV2Flag + }; +} +function parseNodeCompatibilityFlags(compatibilityFlags) { + return { + hasNodejsAlsFlag: compatibilityFlags.includes("nodejs_als"), + hasNodejsCompatFlag: compatibilityFlags.includes("nodejs_compat"), + hasNodejsCompatV2Flag: compatibilityFlags.includes("nodejs_compat_v2"), + hasNoNodejsCompatV2Flag: compatibilityFlags.includes("no_nodejs_compat_v2"), + hasExperimentalNodejsCompatV2Flag: compatibilityFlags.includes( + "experimental:nodejs_compat_v2" + ) + }; +} + +// src/plugins/core/modules.ts +var SUGGEST_BUNDLE = "If you're trying to import an npm package, you'll need to bundle your Worker first."; +var SUGGEST_NODE = "If you're trying to import a Node.js built-in module, or an npm package that uses Node.js built-ins, you'll either need to:\n- Bundle your Worker, configuring your bundler to polyfill Node.js built-ins\n- Configure your bundler to load Workers-compatible builds by changing the main fields/conditions\n- Enable the `nodejs_compat` compatibility flag\n- Find an alternative package that doesn't require Node.js built-ins"; +var builtinModulesWithPrefix = import_module.builtinModules.concat( + import_module.builtinModules.map((module2) => `node:${module2}`) +); +function buildStringScriptPath(workerIndex) { + return `script:${workerIndex}`; +} +var stringScriptRegexp = /^script:(\d+)$/; +function maybeGetStringScriptPathIndex(scriptPath) { + const match = stringScriptRegexp.exec(scriptPath); + return match === null ? void 0 : parseInt(match[1]); +} +var ModuleRuleTypeSchema = import_zod11.z.enum([ + "ESModule", + "CommonJS", + "Text", + "Data", + "CompiledWasm", + "PythonModule", + "PythonRequirement" +]); +var ModuleRuleSchema = import_zod11.z.object({ + type: ModuleRuleTypeSchema, + include: import_zod11.z.string().array(), + fallthrough: import_zod11.z.boolean().optional() +}); +var ModuleDefinitionSchema = import_zod11.z.object({ + type: ModuleRuleTypeSchema, + path: PathSchema, + contents: import_zod11.z.string().or(import_zod11.z.instanceof(Uint8Array)).optional() +}); +var SourceOptionsSchema = import_zod11.z.union([ + import_zod11.z.object({ + // Manually defined modules + // (used by Wrangler which has its own module collection code) + modules: import_zod11.z.array(ModuleDefinitionSchema), + // `modules` "name"s will be their paths relative to this value. + // This ensures file paths in stack traces are correct. + modulesRoot: PathSchema.optional() + }), + import_zod11.z.object({ + script: import_zod11.z.string(), + // Optional script path for resolving modules, and stack traces file names + scriptPath: PathSchema.optional(), + // Automatically collect modules by parsing `script` if `true`, or treat as + // service-worker if `false` + modules: import_zod11.z.boolean().optional(), + // How to interpret automatically collected modules + modulesRules: import_zod11.z.array(ModuleRuleSchema).optional(), + // `modules` "name"s will be their paths relative to this value. + // This ensures file paths in stack traces are correct. + modulesRoot: PathSchema.optional() + }), + import_zod11.z.object({ + scriptPath: PathSchema, + // Automatically collect modules by parsing `scriptPath` if `true`, or treat + // as service-worker if `false` + modules: import_zod11.z.boolean().optional(), + // How to interpret automatically collected modules + modulesRules: import_zod11.z.array(ModuleRuleSchema).optional(), + // `modules` "name"s will be their paths relative to this value. + // This ensures file paths in stack traces are correct. + modulesRoot: PathSchema.optional() + }) +]); +var DEFAULT_MODULE_RULES = [ + { type: "ESModule", include: ["**/*.mjs"] }, + { type: "CommonJS", include: ["**/*.js", "**/*.cjs"] } +]; +function compileModuleRules(rules) { + const compiledRules = []; + const finalisedTypes = /* @__PURE__ */ new Set(); + for (const rule of rules) { + if (finalisedTypes.has(rule.type)) continue; + compiledRules.push({ + type: rule.type, + include: globsToRegExps(rule.include) + }); + if (!rule.fallthrough) finalisedTypes.add(rule.type); + } + return compiledRules; +} +function moduleName(modulesRoot, modulePath) { + const name = import_path19.default.relative(modulesRoot, modulePath); + return import_path19.default.sep === "\\" ? name.replaceAll("\\", "/") : name; +} +function withSourceURL(script, scriptPath) { + if (script.lastIndexOf("//# sourceURL=") !== -1) return script; + let scriptURL = scriptPath; + if (maybeGetStringScriptPathIndex(scriptPath) === void 0) { + scriptURL = (0, import_url17.pathToFileURL)(scriptPath); + } + const sourceURL = ` +//# sourceURL=${scriptURL} +`; + return script + sourceURL; +} +function getResolveErrorPrefix(referencingPath) { + const relative2 = import_path19.default.relative("", referencingPath); + return `Unable to resolve "${relative2}" dependency`; +} +var ModuleLocator = class { + constructor(modulesRoot, additionalModuleNames, rules = [], compatibilityDate, compatibilityFlags) { + this.modulesRoot = modulesRoot; + this.additionalModuleNames = additionalModuleNames; + rules = rules.concat(DEFAULT_MODULE_RULES); + this.#compiledRules = compileModuleRules(rules); + this.#nodejsCompatMode = getNodeCompat( + compatibilityDate, + compatibilityFlags ?? [] + ).mode; + } + #compiledRules; + #nodejsCompatMode; + #visitedPaths = /* @__PURE__ */ new Set(); + modules = []; + visitEntrypoint(code, modulePath) { + if (this.#visitedPaths.has(modulePath)) return; + this.#visitedPaths.add(modulePath); + this.#visitJavaScriptModule(code, modulePath, "ESModule"); + } + #visitJavaScriptModule(code, modulePath, type) { + const name = moduleName(this.modulesRoot, modulePath); + const module2 = createJavaScriptModule(code, name, modulePath, type); + this.modules.push(module2); + const isESM = type === "ESModule"; + let root; + try { + root = (0, import_acorn.parse)(code, { + ecmaVersion: "latest", + sourceType: isESM ? "module" : "script", + locations: true + }); + } catch (e) { + let loc = ""; + if (e.loc?.line !== void 0) { + loc += `:${e.loc.line}`; + if (e.loc.column !== void 0) loc += `:${e.loc.column}`; + } + throw new MiniflareCoreError( + "ERR_MODULE_PARSE", + `Unable to parse "${name}": ${e.message ?? e} + at ${modulePath}${loc}` + ); + } + const visitors = { + ImportDeclaration: (node) => { + this.#visitModule(modulePath, name, type, node.source); + }, + ExportNamedDeclaration: (node) => { + if (node.source != null) { + this.#visitModule(modulePath, name, type, node.source); + } + }, + ExportAllDeclaration: (node) => { + this.#visitModule(modulePath, name, type, node.source); + }, + ImportExpression: (node) => { + this.#visitModule(modulePath, name, type, node.source); + }, + CallExpression: isESM ? void 0 : (node) => { + const argument = node.arguments[0]; + if (node.callee.type === "Identifier" && node.callee.name === "require" && argument !== void 0) { + this.#visitModule(modulePath, name, type, argument); + } + } + }; + (0, import_acorn_walk.simple)(root, visitors); + } + #visitModule(referencingPath, referencingName, referencingType, specExpression) { + if (specExpression.type !== "Literal" || typeof specExpression.value !== "string") { + const modules = this.modules.map((mod) => { + const def = convertWorkerModule(mod); + return ` { type: "${def.type}", path: "${def.path}" }`; + }); + const modulesConfig = ` new Miniflare({ + ..., + modules: [ +${modules.join(",\n")}, + ... + ] + })`; + const prefix = getResolveErrorPrefix(referencingPath); + let message = `${prefix}: dynamic module specifiers are unsupported. +You must manually define your modules when constructing Miniflare: +${dim(modulesConfig)}`; + if (specExpression.loc != null) { + const { line, column } = specExpression.loc.start; + message += ` + at ${referencingPath}:${line}:${column}`; + } + throw new MiniflareCoreError("ERR_MODULE_DYNAMIC_SPEC", message); + } + const spec = specExpression.value; + if ( + // `cloudflare:` and `workerd:` imports don't need to be included explicitly + spec.startsWith("cloudflare:") || spec.startsWith("workerd:") || // Node.js compat v1 requires imports to be prefixed with `node:` + this.#nodejsCompatMode === "v1" && spec.startsWith("node:") || // Node.js compat modules and v2 can also handle non-prefixed imports + this.#nodejsCompatMode === "v2" && builtinModulesWithPrefix.includes(spec) || // Async Local Storage mode (node_als) only deals with `node:async_hooks` imports + this.#nodejsCompatMode === "als" && spec === "node:async_hooks" || // Any "additional" external modules can be ignored + this.additionalModuleNames.includes(spec) + ) { + return; + } + if (maybeGetStringScriptPathIndex(referencingName) !== void 0) { + const prefix = getResolveErrorPrefix(referencingPath); + throw new MiniflareCoreError( + "ERR_MODULE_STRING_SCRIPT", + `${prefix}: imports are unsupported in string \`script\` without defined \`scriptPath\`` + ); + } + const identifier = import_path19.default.resolve(import_path19.default.dirname(referencingPath), spec); + const name = moduleName(this.modulesRoot, identifier); + if (this.#visitedPaths.has(identifier)) return; + this.#visitedPaths.add(identifier); + const rule = this.#compiledRules.find( + (rule2) => testRegExps(rule2.include, identifier) + ); + if (rule === void 0) { + const prefix = getResolveErrorPrefix(referencingPath); + const isBuiltin = builtinModulesWithPrefix.includes(spec); + const suggestion = isBuiltin ? SUGGEST_NODE : SUGGEST_BUNDLE; + throw new MiniflareCoreError( + "ERR_MODULE_RULE", + `${prefix} "${spec}": no matching module rules. +${suggestion}` + ); + } + const data = (0, import_fs16.readFileSync)(identifier); + switch (rule.type) { + case "ESModule": + case "CommonJS": + const code = data.toString("utf8"); + this.#visitJavaScriptModule(code, identifier, rule.type); + break; + case "Text": + this.modules.push({ name, text: data.toString("utf8") }); + break; + case "Data": + this.modules.push({ name, data }); + break; + case "CompiledWasm": + this.modules.push({ name, wasm: data }); + break; + case "PythonModule": + this.modules.push({ name, pythonModule: data.toString("utf-8") }); + break; + case "PythonRequirement": + this.modules.push({ name, pythonRequirement: data.toString("utf-8") }); + break; + default: + const exhaustive = rule.type; + import_assert5.default.fail(`Unreachable: ${exhaustive} modules are unsupported`); + } + } +}; +function createJavaScriptModule(code, name, modulePath, type) { + code = withSourceURL(code, modulePath); + if (type === "ESModule") { + return { name, esModule: code }; + } else if (type === "CommonJS") { + return { name, commonJsModule: code }; + } + const exhaustive = type; + import_assert5.default.fail(`Unreachable: ${exhaustive} JavaScript modules are unsupported`); +} +var encoder = new import_util.TextEncoder(); +var decoder = new import_util.TextDecoder(); +function contentsToString(contents27) { + return typeof contents27 === "string" ? contents27 : decoder.decode(contents27); +} +function contentsToArray(contents27) { + return typeof contents27 === "string" ? encoder.encode(contents27) : contents27; +} +function convertModuleDefinition(modulesRoot, def) { + const name = moduleName(modulesRoot, def.path); + const contents27 = def.contents ?? (0, import_fs16.readFileSync)(def.path); + switch (def.type) { + case "ESModule": + case "CommonJS": + return createJavaScriptModule( + contentsToString(contents27), + name, + import_path19.default.resolve(modulesRoot, def.path), + def.type + ); + case "Text": + return { name, text: contentsToString(contents27) }; + case "Data": + return { name, data: contentsToArray(contents27) }; + case "CompiledWasm": + return { name, wasm: contentsToArray(contents27) }; + case "PythonModule": + return { name, pythonModule: contentsToString(contents27) }; + case "PythonRequirement": + return { name, pythonRequirement: contentsToString(contents27) }; + default: + const exhaustive = def.type; + import_assert5.default.fail(`Unreachable: ${exhaustive} modules are unsupported`); + } +} +function convertWorkerModule(mod) { + const path37 = mod.name; + (0, import_assert5.default)(path37 !== void 0); + const m = mod; + if ("esModule" in m) return { path: path37, type: "ESModule" }; + else if ("commonJsModule" in m) return { path: path37, type: "CommonJS" }; + else if ("text" in m) return { path: path37, type: "Text" }; + else if ("data" in m) return { path: path37, type: "Data" }; + else if ("wasm" in m) return { path: path37, type: "CompiledWasm" }; + else if ("pythonModule" in m) return { path: path37, type: "PythonModule" }; + else if ("pythonRequirement" in m) return { path: path37, type: "PythonRequirement" }; + (0, import_assert5.default)( + !("json" in m || "fallbackService" in m), + "Unreachable: json or fallbackService modules aren't generated" + ); + const exhaustive = m; + import_assert5.default.fail( + `Unreachable: [${Object.keys(exhaustive).join( + ", " + )}] modules are unsupported` + ); +} + +// src/plugins/core/proxy/client.ts +var import_assert8 = __toESM(require("assert")); +var import_crypto2 = __toESM(require("crypto")); +var import_web4 = require("stream/web"); +var import_util2 = __toESM(require("util")); +var import_undici6 = require("undici"); + +// src/plugins/core/proxy/fetch-sync.ts +var import_assert7 = __toESM(require("assert")); +var import_web2 = require("stream/web"); +var import_worker_threads = require("worker_threads"); + +// src/plugins/core/errors/index.ts +var import_fs17 = __toESM(require("fs")); +var import_path20 = __toESM(require("path")); +var import_url18 = require("url"); +var import_zod12 = require("zod"); + +// src/plugins/core/errors/sourcemap.ts +var import_assert6 = __toESM(require("assert")); + +// src/plugins/core/errors/callsite.ts +function parseStack(stack) { + return stack.split("\n").slice(1).map(parseCallSite).filter((site) => site !== void 0); +} +function parseCallSite(line) { + const lineMatch = line.match( + /at (?:(.+?)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/ + ); + if (!lineMatch) { + return; + } + let object = null; + let method = null; + let functionName = null; + let typeName = null; + let methodName = null; + const isNative = lineMatch[5] === "native"; + if (lineMatch[1]) { + functionName = lineMatch[1]; + let methodStart = functionName.lastIndexOf("."); + if (functionName[methodStart - 1] == ".") methodStart--; + if (methodStart > 0) { + object = functionName.substring(0, methodStart); + method = functionName.substring(methodStart + 1); + const objectEnd = object.indexOf(".Module"); + if (objectEnd > 0) { + functionName = functionName.substring(objectEnd + 1); + object = object.substring(0, objectEnd); + } + } + } + if (method) { + typeName = object; + methodName = method; + } + if (method === "") { + methodName = null; + functionName = null; + } + return new CallSite({ + typeName, + functionName, + methodName, + fileName: lineMatch[2], + lineNumber: parseInt(lineMatch[3]) || null, + columnNumber: parseInt(lineMatch[4]) || null, + native: isNative + }); +} +var CallSite = class { + constructor(opts) { + this.opts = opts; + } + getScriptHash() { + throw new Error("Method not implemented."); + } + getEnclosingColumnNumber() { + throw new Error("Method not implemented."); + } + getEnclosingLineNumber() { + throw new Error("Method not implemented."); + } + getPosition() { + throw new Error("Method not implemented."); + } + toString() { + throw new Error("Method not implemented."); + } + getThis() { + return null; + } + getTypeName() { + return this.opts.typeName; + } + // eslint-disable-next-line @typescript-eslint/ban-types + getFunction() { + return void 0; + } + getFunctionName() { + return this.opts.functionName; + } + getMethodName() { + return this.opts.methodName; + } + getFileName() { + return this.opts.fileName ?? void 0; + } + getScriptNameOrSourceURL() { + return this.opts.fileName; + } + getLineNumber() { + return this.opts.lineNumber; + } + getColumnNumber() { + return this.opts.columnNumber; + } + getEvalOrigin() { + return void 0; + } + isToplevel() { + return false; + } + isEval() { + return false; + } + isNative() { + return this.opts.native; + } + isConstructor() { + return false; + } + isAsync() { + return false; + } + isPromiseAll() { + return false; + } + isPromiseAny() { + return false; + } + getPromiseIndex() { + return null; + } +}; + +// src/plugins/core/errors/sourcemap.ts +function getFreshSourceMapSupport() { + const resolvedSupportPath = require.resolve("@cspotcode/source-map-support"); + const originalSymbolFor = Symbol.for; + const originalSupport = require.cache[resolvedSupportPath]; + try { + Symbol.for = (key) => { + import_assert6.default.strictEqual(key, "source-map-support/sharedData"); + return Symbol(key); + }; + delete require.cache[resolvedSupportPath]; + return require(resolvedSupportPath); + } finally { + Symbol.for = originalSymbolFor; + require.cache[resolvedSupportPath] = originalSupport; + } +} +var sourceMapInstallBaseOptions = { + environment: "node", + // Don't add Node `uncaughtException` handler + handleUncaughtExceptions: false, + // Don't hook Node `require` function + hookRequire: false, + redirectConflictingLibrary: false, + // Make sure we're using fresh copies of files (i.e. between `setOptions()`) + emptyCacheBetweenOperations: true, + // Always remove existing retrievers when calling `install()`, we should be + // specifying them each time we want to source map + overrideRetrieveFile: true, + overrideRetrieveSourceMap: true +}; +var sourceMapper; +function getSourceMapper() { + if (sourceMapper !== void 0) return sourceMapper; + const support = getFreshSourceMapSupport(); + const originalPrepareStackTrace = Error.prepareStackTrace; + support.install(sourceMapInstallBaseOptions); + const prepareStackTrace = Error.prepareStackTrace; + (0, import_assert6.default)(prepareStackTrace !== void 0); + Error.prepareStackTrace = originalPrepareStackTrace; + sourceMapper = (retrieveSourceMap, error) => { + support.install({ + ...sourceMapInstallBaseOptions, + retrieveFile(_file) { + return ""; + }, + retrieveSourceMap + }); + const callSites = parseStack(error.stack ?? ""); + return prepareStackTrace(error, callSites); + }; + return sourceMapper; +} + +// src/plugins/core/errors/index.ts +function maybeGetDiskFile(filePath) { + try { + const contents27 = import_fs17.default.readFileSync(filePath, "utf8"); + return { path: filePath, contents: contents27 }; + } catch (e) { + if (e.code !== "ENOENT") throw e; + } +} +function maybeGetFile2(workerSrcOpts, fileSpecifier) { + const maybeUrl = maybeParseURL(fileSpecifier); + if (maybeUrl !== void 0 && maybeUrl.protocol === "file:") { + const filePath = (0, import_url18.fileURLToPath)(maybeUrl); + for (const srcOpts of workerSrcOpts) { + if (Array.isArray(srcOpts.modules)) { + const modulesRoot = srcOpts.modulesRoot ?? ""; + for (const module2 of srcOpts.modules) { + if (module2.contents !== void 0 && import_path20.default.resolve(modulesRoot, module2.path) === filePath) { + const contents27 = contentsToString(module2.contents); + return { path: filePath, contents: contents27 }; + } + } + } else if ("script" in srcOpts && "scriptPath" in srcOpts && srcOpts.script !== void 0 && srcOpts.scriptPath !== void 0) { + const modulesRoot = srcOpts.modules && srcOpts.modulesRoot || ""; + if (import_path20.default.resolve(modulesRoot, srcOpts.scriptPath) === filePath) { + return { path: filePath, contents: srcOpts.script }; + } + } + } + return maybeGetDiskFile(filePath); + } + const workerIndex = maybeGetStringScriptPathIndex(fileSpecifier); + if (workerIndex !== void 0) { + const srcOpts = workerSrcOpts[workerIndex]; + if ("script" in srcOpts && srcOpts.script !== void 0) { + return { contents: srcOpts.script }; + } + } +} +function getSourceMappedStack(workerSrcOpts, error) { + function retrieveSourceMap(fileSpecifier) { + const sourceFile = maybeGetFile2(workerSrcOpts, fileSpecifier); + if (sourceFile?.path === void 0) return null; + const sourceMapRegexp = /# sourceMappingURL=(.+)/g; + const matches = [...sourceFile.contents.matchAll(sourceMapRegexp)]; + if (matches.length === 0) return null; + const sourceMapMatch = matches[matches.length - 1]; + const root = import_path20.default.dirname(sourceFile.path); + const sourceMapPath = import_path20.default.resolve(root, sourceMapMatch[1]); + const sourceMapFile = maybeGetDiskFile(sourceMapPath); + if (sourceMapFile === void 0) return null; + return { map: sourceMapFile.contents, url: sourceMapFile.path }; + } + return getSourceMapper()(retrieveSourceMap, error); +} +var JsonErrorSchema = import_zod12.z.lazy( + () => import_zod12.z.object({ + message: import_zod12.z.string().optional(), + name: import_zod12.z.string().optional(), + stack: import_zod12.z.string().optional(), + cause: JsonErrorSchema.optional() + }) +); +var ALLOWED_ERROR_SUBCLASS_CONSTRUCTORS = [ + EvalError, + RangeError, + ReferenceError, + SyntaxError, + TypeError, + URIError +]; +function reviveError(workerSrcOpts, jsonError) { + let cause; + if (jsonError.cause !== void 0) { + cause = reviveError(workerSrcOpts, jsonError.cause); + } + let ctor = Error; + if (jsonError.name !== void 0 && jsonError.name in globalThis) { + const maybeCtor = globalThis[jsonError.name]; + if (ALLOWED_ERROR_SUBCLASS_CONSTRUCTORS.includes(maybeCtor)) { + ctor = maybeCtor; + } + } + const error = new ctor(jsonError.message, { cause }); + if (jsonError.name !== void 0) error.name = jsonError.name; + error.stack = jsonError.stack; + error.stack = getSourceMappedStack(workerSrcOpts, error); + return error; +} +async function handlePrettyErrorRequest(log, workerSrcOpts, request) { + const caught = JsonErrorSchema.parse(await request.json()); + const error = reviveError(workerSrcOpts, caught); + log.error(error); + const accept = request.headers.get("Accept")?.toLowerCase() ?? ""; + const userAgent = request.headers.get("User-Agent")?.toLowerCase() ?? ""; + const acceptsPrettyError = !userAgent.includes("curl/") && (accept.includes("text/html") || accept.includes("*/*") || accept.includes("text/*")); + if (!acceptsPrettyError) { + return new Response2(error.stack, { status: 500 }); + } + const Youch = require("youch"); + const youch = new Youch(error.cause ?? error, { + url: request.cf?.prettyErrorOriginalUrl ?? request.url, + method: request.method, + headers: Object.fromEntries(request.headers) + }); + youch.addLink(() => { + return [ + '\u{1F4DA} Workers Docs', + '\u{1F4AC} Workers Discord' + ].join(""); + }); + return new Response2(await youch.toHTML(), { + status: 500, + headers: { "Content-Type": "text/html;charset=utf-8" } + }); +} + +// src/plugins/core/proxy/fetch-sync.ts +var DECODER = new TextDecoder(); +var WORKER_SCRIPT = ( + /* javascript */ + ` +const { createRequire } = require("module"); +const { workerData } = require("worker_threads"); + +// Not using parentPort here so we can call receiveMessageOnPort() in host +const { notifyHandle, port, filename } = workerData; + +// When running Miniflare from Jest, regular 'require("undici")' will fail here +// with "Error: Cannot find module 'undici'". Instead we need to create a +// 'require' using the '__filename' of the host... :( +const actualRequire = createRequire(filename); +const { Pool, fetch } = actualRequire("undici"); + +let dispatcherUrl; +let dispatcher; + +port.addEventListener("message", async (event) => { + const { id, method, url, headers, body } = event.data; + if (dispatcherUrl !== url) { + dispatcherUrl = url; + dispatcher = new Pool(url, { + connect: { rejectUnauthorized: false }, + }); + } + headers["${CoreHeaders.OP_SYNC}"] = "true"; + try { + // body cannot be a ReadableStream, so no need to specify duplex + const response = await fetch(url, { method, headers, body, dispatcher }); + const responseBody = response.headers.get("${CoreHeaders.OP_RESULT_TYPE}") === "ReadableStream" + ? response.body + : await response.arrayBuffer(); + const transferList = responseBody === null ? undefined : [responseBody]; + port.postMessage( + { + id, + response: { + status: response.status, + headers: Object.fromEntries(response.headers), + body: responseBody, + } + }, + transferList + ); + } catch (error) { + try { + port.postMessage({ id, error }); + } catch { + // If error failed to serialise, post simplified version + port.postMessage({ id, error: new Error(String(error)) }); + } + } + Atomics.store(notifyHandle, /* index */ 0, /* value */ 1); + Atomics.notify(notifyHandle, /* index */ 0); +}); + +port.start(); +` +); +var SynchronousFetcher = class { + #channel; + #notifyHandle; + #worker; + #nextId = 0; + constructor() { + this.#channel = new import_worker_threads.MessageChannel(); + this.#notifyHandle = new Int32Array(new SharedArrayBuffer(4)); + } + #ensureWorker() { + if (this.#worker !== void 0) return; + this.#worker = new import_worker_threads.Worker(WORKER_SCRIPT, { + eval: true, + workerData: { + notifyHandle: this.#notifyHandle, + port: this.#channel.port2, + filename: __filename + }, + transferList: [this.#channel.port2] + }); + } + fetch(url27, init2) { + this.#ensureWorker(); + Atomics.store( + this.#notifyHandle, + /* index */ + 0, + /* value */ + 0 + ); + const id = this.#nextId++; + this.#channel.port1.postMessage({ + id, + method: init2.method, + url: url27.toString(), + headers: init2.headers, + body: init2.body + }); + Atomics.wait( + this.#notifyHandle, + /* index */ + 0, + /* value */ + 0 + ); + const message = (0, import_worker_threads.receiveMessageOnPort)( + this.#channel.port1 + )?.message; + (0, import_assert7.default)(message?.id === id); + if ("response" in message) { + const { status, headers: rawHeaders, body } = message.response; + const headers = new import_undici4.Headers(rawHeaders); + const stack = headers.get(CoreHeaders.ERROR_STACK); + if (status === 500 && stack !== null && body !== null) { + (0, import_assert7.default)(!(body instanceof import_web2.ReadableStream)); + const caught = JsonErrorSchema.parse(JSON.parse(DECODER.decode(body))); + throw reviveError([], caught); + } + return { status, headers, body }; + } else { + throw message.error; + } + } + async dispose() { + await this.#worker?.terminate(); + } +}; + +// src/plugins/core/proxy/types.ts +var import_buffer = require("buffer"); +var import_consumers = require("stream/consumers"); +var import_web3 = require("stream/web"); +var import_undici5 = require("undici"); +var NODE_PLATFORM_IMPL = { + // Node's implementation of these classes don't quite match Workers', + // but they're close enough for us + Blob: import_buffer.Blob, + File: import_undici5.File, + Headers: import_undici5.Headers, + Request, + Response: Response2, + isReadableStream(value) { + return value instanceof import_web3.ReadableStream; + }, + bufferReadableStream(stream) { + return (0, import_consumers.arrayBuffer)(stream); + }, + unbufferReadableStream(buffer) { + return new import_buffer.Blob([new Uint8Array(buffer)]).stream(); + } +}; + +// src/plugins/core/proxy/client.ts +var kAddress = Symbol("kAddress"); +var kName = Symbol("kName"); +var kIsFunction = Symbol("kIsFunction"); +function isNativeTarget(value) { + return typeof value === "object" && value !== null && kAddress in value && kIsFunction in value; +} +var TARGET_GLOBAL = { + [kAddress]: ProxyAddresses.GLOBAL, + [kName]: "global", + [kIsFunction]: false +}; +var TARGET_ENV = { + [kAddress]: ProxyAddresses.ENV, + [kName]: "env", + [kIsFunction]: false +}; +var reducers = { + ...structuredSerializableReducers, + ...createHTTPReducers(NODE_PLATFORM_IMPL), + Native(value) { + if (isNativeTarget(value)) + return [value[kAddress], value[kName], value[kIsFunction]]; + } +}; +var revivers = { + ...structuredSerializableRevivers, + ...createHTTPRevivers(NODE_PLATFORM_IMPL) + // `Native` reviver depends on `ProxyStubHandler` methods +}; +var PROXY_SECRET = import_crypto2.default.randomBytes(16); +var PROXY_SECRET_HEX = PROXY_SECRET.toString("hex"); +function isClientError(status) { + return 400 <= status && status < 500; +} +var ProxyClient = class { + #bridge; + constructor(runtimeEntryURL, dispatchFetch) { + this.#bridge = new ProxyClientBridge(runtimeEntryURL, dispatchFetch); + } + // Lazily initialise proxies as required + #globalProxy; + #envProxy; + get global() { + return this.#globalProxy ??= this.#bridge.getProxy(TARGET_GLOBAL); + } + get env() { + return this.#envProxy ??= this.#bridge.getProxy(TARGET_ENV); + } + poisonProxies() { + this.#bridge.poisonProxies(); + this.#globalProxy = void 0; + this.#envProxy = void 0; + } + setRuntimeEntryURL(runtimeEntryURL) { + this.#bridge.url = runtimeEntryURL; + } + dispose() { + return this.#bridge.dispose(); + } +}; +var ProxyClientBridge = class { + constructor(url27, dispatchFetch) { + this.url = url27; + this.dispatchFetch = dispatchFetch; + this.#finalizationRegistry = new FinalizationRegistry(this.#finalizeProxy); + } + // Each proxy stub is initialised with the version stored here. Whenever + // `poisonProxies()` is called, this version is incremented. Before the + // proxy makes any request to `workerd`, it checks the version number here + // matches its own internal version, and throws if not. + #version = 0; + // Whenever the `ProxyServer` returns a native target, it adds a strong + // reference to the "heap" in the singleton object. This prevents the object + // being garbage collected. To solve this, we register the native target + // proxies on the client in a `FinalizationRegistry`. When the proxies get + // garbage collected, we let the `ProxyServer` know it can release the strong + // "heap" reference, as we'll never be able to access it again. Importantly, + // we need to unregister all proxies from the registry when we poison them, + // as the references will be invalid, and a new object with the same address + // may be added to the "heap". + #finalizationRegistry; + // Garbage collection passes will free lots of objects at once. Rather than + // sending a `DELETE` request for each address, we batch finalisations within + // 100ms of each other into one request. This ensures we don't create *lots* + // of TCP connections to `workerd` in `dispatchFetch()` for all the concurrent + // requests. + #finalizeBatch = []; + #finalizeBatchTimeout; + sync = new SynchronousFetcher(); + get version() { + return this.#version; + } + #finalizeProxy = (held) => { + this.#finalizeBatch.push(held); + clearTimeout(this.#finalizeBatchTimeout); + this.#finalizeBatchTimeout = setTimeout(this.#finalizeProxyBatch, 100); + }; + #finalizeProxyBatch = async () => { + const addresses = []; + for (const held of this.#finalizeBatch.splice(0)) { + if (held.version === this.#version) addresses.push(held.address); + } + if (addresses.length === 0) return; + try { + await this.dispatchFetch(this.url, { + method: "DELETE", + headers: { + [CoreHeaders.OP_SECRET]: PROXY_SECRET_HEX, + [CoreHeaders.OP]: ProxyOps.FREE, + [CoreHeaders.OP_TARGET]: addresses.join(",") + } + }); + } catch { + } + }; + getProxy(target) { + const handler = new ProxyStubHandler(this, target); + let proxyTarget; + if (target[kIsFunction]) { + proxyTarget = new Function(); + } else { + proxyTarget = {}; + } + proxyTarget[import_util2.default.inspect.custom] = handler.inspect; + const proxy = new Proxy(proxyTarget, handler); + const held = { + address: target[kAddress], + version: this.#version + }; + this.#finalizationRegistry.register(proxy, held, this); + return proxy; + } + poisonProxies() { + this.#version++; + this.#finalizationRegistry.unregister(this); + } + dispose() { + this.poisonProxies(); + return this.sync.dispose(); + } +}; +var ProxyStubHandler = class extends Function { + constructor(bridge, target) { + super(); + this.bridge = bridge; + this.target = target; + this.#version = bridge.version; + this.#stringifiedTarget = stringify(this.target, reducers); + } + #version; + #stringifiedTarget; + #knownValues = /* @__PURE__ */ new Map(); + #knownDescriptors = /* @__PURE__ */ new Map(); + #knownOwnKeys; + revivers = { + ...revivers, + Native: (value) => { + (0, import_assert8.default)(Array.isArray(value)); + const [address, name, isFunction] = value; + (0, import_assert8.default)(typeof address === "number"); + (0, import_assert8.default)(typeof name === "string"); + (0, import_assert8.default)(typeof isFunction === "boolean"); + const target = { + [kAddress]: address, + [kName]: name, + [kIsFunction]: isFunction + }; + if (name === "Promise") { + const resPromise = this.bridge.dispatchFetch(this.bridge.url, { + method: "POST", + headers: { + [CoreHeaders.OP_SECRET]: PROXY_SECRET_HEX, + [CoreHeaders.OP]: ProxyOps.GET, + // GET without key just gets target + [CoreHeaders.OP_TARGET]: stringify(target, reducers) + } + }); + return this.#parseAsyncResponse(resPromise); + } else { + return this.bridge.getProxy(target); + } + } + }; + get #poisoned() { + return this.#version !== this.bridge.version; + } + #assertSafe() { + if (this.#poisoned) { + throw new Error( + "Attempted to use poisoned stub. Stubs to runtime objects must be re-created after calling `Miniflare#setOptions()` or `Miniflare#dispose()`." + ); + } + } + inspect = (depth, options) => { + const details = { name: this.target[kName], poisoned: this.#poisoned }; + return `ProxyStub ${import_util2.default.inspect(details, options)}`; + }; + #maybeThrow(res, result, caller) { + if (res.status === 500) { + if (typeof result === "object" && result !== null) { + Error.captureStackTrace(result, caller); + } + throw result; + } else { + (0, import_assert8.default)(res.status === 200); + return result; + } + } + async #parseAsyncResponse(resPromise) { + const res = await resPromise; + (0, import_assert8.default)(!isClientError(res.status)); + const typeHeader = res.headers.get(CoreHeaders.OP_RESULT_TYPE); + if (typeHeader === "Promise, ReadableStream") return res.body; + (0, import_assert8.default)(typeHeader === "Promise"); + let stringifiedResult; + let unbufferedStream; + const stringifiedSizeHeader = res.headers.get( + CoreHeaders.OP_STRINGIFIED_SIZE + ); + if (stringifiedSizeHeader === null) { + stringifiedResult = await res.text(); + } else { + const stringifiedSize = parseInt(stringifiedSizeHeader); + (0, import_assert8.default)(!Number.isNaN(stringifiedSize)); + (0, import_assert8.default)(res.body !== null); + const [buffer, rest] = await readPrefix(res.body, stringifiedSize); + stringifiedResult = buffer.toString(); + unbufferedStream = rest.pipeThrough(new import_web4.TransformStream()); + } + const result = parseWithReadableStreams( + NODE_PLATFORM_IMPL, + { value: stringifiedResult, unbufferedStream }, + this.revivers + ); + return this.#maybeThrow(res, result, this.#parseAsyncResponse); + } + #parseSyncResponse(syncRes, caller) { + (0, import_assert8.default)(!isClientError(syncRes.status)); + (0, import_assert8.default)(syncRes.body !== null); + (0, import_assert8.default)(syncRes.headers.get(CoreHeaders.OP_STRINGIFIED_SIZE) === null); + if (syncRes.body instanceof import_web4.ReadableStream) return syncRes.body; + const stringifiedResult = DECODER.decode(syncRes.body); + const result = parseWithReadableStreams( + NODE_PLATFORM_IMPL, + { value: stringifiedResult }, + this.revivers + ); + return this.#maybeThrow(syncRes, result, caller); + } + #thisFnKnownAsync = false; + apply(_target, ...args) { + const result = this.#call( + "__miniflareWrappedFunction", + this.#thisFnKnownAsync, + args[1], + this + ); + if (!this.#thisFnKnownAsync && result instanceof Promise) { + this.#thisFnKnownAsync = true; + } + return result; + } + get(_target, key, _receiver) { + this.#assertSafe(); + if (key === kAddress) return this.target[kAddress]; + if (key === kName) return this.target[kName]; + if (key === kIsFunction) return this.target[kIsFunction]; + if (typeof key === "symbol" || key === "then") return void 0; + const maybeKnown = this.#knownValues.get(key); + if (maybeKnown !== void 0) return maybeKnown; + const syncRes = this.bridge.sync.fetch(this.bridge.url, { + method: "POST", + headers: { + [CoreHeaders.OP_SECRET]: PROXY_SECRET_HEX, + [CoreHeaders.OP]: ProxyOps.GET, + [CoreHeaders.OP_TARGET]: this.#stringifiedTarget, + [CoreHeaders.OP_KEY]: key + } + }); + let result; + if (syncRes.headers.get(CoreHeaders.OP_RESULT_TYPE) === "Function") { + result = this.#createFunction(key); + } else { + result = this.#parseSyncResponse(syncRes, this.get); + } + if ( + // Optimisation: if this property is a function, we assume constant + // prototypes of proxied objects, so it's never going to change + typeof result === "function" || // Optimisation: if this property is a reference, we assume it's never + // going to change. This allows us to reuse the known cache of nested + // objects on multiple access (e.g. reusing `env["..."]` proxy if + // `getR2Bucket()` is called on the same bucket multiple times). + isNativeTarget(result) || // Once a `ReadableStream` sent across proxy, we won't be able to read it + // again in the server, so reuse the same stream for future accesses + // (e.g. accessing `R2ObjectBody#body` multiple times) + result instanceof import_web4.ReadableStream + ) { + this.#knownValues.set(key, result); + } + return result; + } + has(target, key) { + return this.get(target, key, void 0) !== void 0; + } + getOwnPropertyDescriptor(target, key) { + this.#assertSafe(); + if (typeof key === "symbol") return void 0; + const maybeKnown = this.#knownDescriptors.get(key); + if (maybeKnown !== void 0) return maybeKnown; + const syncRes = this.bridge.sync.fetch(this.bridge.url, { + method: "POST", + headers: { + [CoreHeaders.OP_SECRET]: PROXY_SECRET_HEX, + [CoreHeaders.OP]: ProxyOps.GET_OWN_DESCRIPTOR, + [CoreHeaders.OP_KEY]: key, + [CoreHeaders.OP_TARGET]: this.#stringifiedTarget + } + }); + const result = this.#parseSyncResponse( + syncRes, + this.getOwnPropertyDescriptor + ); + this.#knownDescriptors.set(key, result); + return result; + } + ownKeys(_target) { + this.#assertSafe(); + if (this.#knownOwnKeys !== void 0) return this.#knownOwnKeys; + const syncRes = this.bridge.sync.fetch(this.bridge.url, { + method: "POST", + headers: { + [CoreHeaders.OP_SECRET]: PROXY_SECRET_HEX, + [CoreHeaders.OP]: ProxyOps.GET_OWN_KEYS, + [CoreHeaders.OP_TARGET]: this.#stringifiedTarget + } + }); + const result = this.#parseSyncResponse(syncRes, this.ownKeys); + this.#knownOwnKeys = result; + return result; + } + getPrototypeOf(_target) { + this.#assertSafe(); + return null; + } + #createFunction(key) { + let knownAsync = false; + const func = { + [key]: (...args) => { + const result = this.#call(key, knownAsync, args, func); + if (!knownAsync && result instanceof Promise) knownAsync = true; + return result; + } + }[key]; + return func; + } + #call(key, knownAsync, args, caller) { + this.#assertSafe(); + const targetName = this.target[kName]; + if (isFetcherFetch(targetName, key)) return this.#fetcherFetchCall(args); + const stringified = stringifyWithStreams( + NODE_PLATFORM_IMPL, + args, + reducers, + /* allowUnbufferedStream */ + true + ); + if (knownAsync || // We assume every call with `ReadableStream`/`Blob` arguments is async. + // Note that you can't consume `ReadableStream`/`Blob` synchronously: if + // you tried a similar trick to `SynchronousFetcher`, blocking the main + // thread with `Atomics.wait()` would prevent chunks being read. This + // assumption doesn't hold for `Blob`s and `FormData#{append,set}()`, but + // we should never expose proxies for those APIs to users. + stringified instanceof Promise || // (instanceof Promise if buffered `ReadableStream`/`Blob`s) + stringified.unbufferedStream !== void 0) { + return this.#asyncCall(key, stringified); + } else { + const result = this.#syncCall(key, stringified.value, caller); + if (isR2ObjectWriteHttpMetadata(targetName, key)) { + const arg = args[0]; + (0, import_assert8.default)(arg instanceof import_undici6.Headers); + (0, import_assert8.default)(result instanceof import_undici6.Headers); + for (const [key2, value] of result) arg.set(key2, value); + return; + } + return result; + } + } + #syncCall(key, stringifiedValue, caller) { + const argsSize = Buffer.byteLength(stringifiedValue).toString(); + const syncRes = this.bridge.sync.fetch(this.bridge.url, { + method: "POST", + headers: { + [CoreHeaders.OP_SECRET]: PROXY_SECRET_HEX, + [CoreHeaders.OP]: ProxyOps.CALL, + [CoreHeaders.OP_TARGET]: this.#stringifiedTarget, + [CoreHeaders.OP_KEY]: key, + [CoreHeaders.OP_STRINGIFIED_SIZE]: argsSize, + "Content-Length": argsSize + }, + body: stringifiedValue + }); + return this.#parseSyncResponse(syncRes, caller); + } + async #asyncCall(key, stringifiedAwaitable) { + const stringified = await stringifiedAwaitable; + let resPromise; + if (stringified.unbufferedStream === void 0) { + const argsSize = Buffer.byteLength(stringified.value).toString(); + resPromise = this.bridge.dispatchFetch(this.bridge.url, { + method: "POST", + headers: { + [CoreHeaders.OP_SECRET]: PROXY_SECRET_HEX, + [CoreHeaders.OP]: ProxyOps.CALL, + [CoreHeaders.OP_TARGET]: this.#stringifiedTarget, + [CoreHeaders.OP_KEY]: key, + [CoreHeaders.OP_STRINGIFIED_SIZE]: argsSize, + "Content-Length": argsSize + }, + body: stringified.value + }); + } else { + const encodedArgs = Buffer.from(stringified.value); + const argsSize = encodedArgs.byteLength.toString(); + const body = prefixStream(encodedArgs, stringified.unbufferedStream); + resPromise = this.bridge.dispatchFetch(this.bridge.url, { + method: "POST", + headers: { + [CoreHeaders.OP_SECRET]: PROXY_SECRET_HEX, + [CoreHeaders.OP]: ProxyOps.CALL, + [CoreHeaders.OP_TARGET]: this.#stringifiedTarget, + [CoreHeaders.OP_KEY]: key, + [CoreHeaders.OP_STRINGIFIED_SIZE]: argsSize + }, + duplex: "half", + body + }); + } + return this.#parseAsyncResponse(resPromise); + } + #fetcherFetchCall(args) { + const request = new Request(...args); + request.headers.set(CoreHeaders.OP_SECRET, PROXY_SECRET_HEX); + request.headers.set(CoreHeaders.OP, ProxyOps.CALL); + request.headers.set(CoreHeaders.OP_TARGET, this.#stringifiedTarget); + request.headers.set(CoreHeaders.OP_KEY, "fetch"); + return this.bridge.dispatchFetch(request); + } +}; + +// src/plugins/core/services.ts +var import_zod13 = require("zod"); +var kCurrentWorker = Symbol.for("miniflare.kCurrentWorker"); +var HttpOptionsHeaderSchema = import_zod13.z.object({ + name: import_zod13.z.string(), + // name should be required + value: import_zod13.z.ostring() + // If omitted, the header will be removed +}); +var HttpOptionsSchema = import_zod13.z.object({ + style: import_zod13.z.nativeEnum(HttpOptions_Style).optional(), + forwardedProtoHeader: import_zod13.z.ostring(), + cfBlobHeader: import_zod13.z.ostring(), + injectRequestHeaders: HttpOptionsHeaderSchema.array().optional(), + injectResponseHeaders: HttpOptionsHeaderSchema.array().optional() +}).transform((options) => ({ + ...options, + capnpConnectHost: HOST_CAPNP_CONNECT +})); +var TlsOptionsKeypairSchema = import_zod13.z.object({ + privateKey: import_zod13.z.ostring(), + certificateChain: import_zod13.z.ostring() +}); +var TlsOptionsSchema = import_zod13.z.object({ + keypair: TlsOptionsKeypairSchema.optional(), + requireClientCerts: import_zod13.z.oboolean(), + trustBrowserCas: import_zod13.z.oboolean(), + trustedCertificates: import_zod13.z.string().array().optional(), + minVersion: import_zod13.z.nativeEnum(TlsOptions_Version).optional(), + cipherList: import_zod13.z.ostring() +}); +var NetworkSchema = import_zod13.z.object({ + allow: import_zod13.z.string().array().optional(), + deny: import_zod13.z.string().array().optional(), + tlsOptions: TlsOptionsSchema.optional() +}); +var ExternalServerSchema = import_zod13.z.intersection( + import_zod13.z.object({ address: import_zod13.z.string() }), + // address should be required + import_zod13.z.union([ + import_zod13.z.object({ http: import_zod13.z.optional(HttpOptionsSchema) }), + import_zod13.z.object({ + https: import_zod13.z.optional( + import_zod13.z.object({ + options: HttpOptionsSchema.optional(), + tlsOptions: TlsOptionsSchema.optional(), + certificateHost: import_zod13.z.ostring() + }) + ) + }) + ]) +); +var DiskDirectorySchema = import_zod13.z.object({ + path: import_zod13.z.string(), + // path should be required + writable: import_zod13.z.oboolean() +}); +var ServiceFetchSchema = import_zod13.z.custom((v) => typeof v === "function"); +var ServiceDesignatorSchema = import_zod13.z.union([ + import_zod13.z.string(), + import_zod13.z.literal(kCurrentWorker), + import_zod13.z.object({ + name: import_zod13.z.union([import_zod13.z.string(), import_zod13.z.literal(kCurrentWorker)]), + entrypoint: import_zod13.z.ostring(), + props: import_zod13.z.record(import_zod13.z.unknown()).optional(), + mixedModeConnectionString: import_zod13.z.custom().optional() + }), + import_zod13.z.object({ network: NetworkSchema }), + import_zod13.z.object({ external: ExternalServerSchema }), + import_zod13.z.object({ disk: DiskDirectorySchema }), + ServiceFetchSchema +]); + +// src/plugins/core/index.ts +var trustedCertificates = process.platform === "win32" ? Array.from(import_tls.default.rootCertificates) : []; +if (process.env.NODE_EXTRA_CA_CERTS !== void 0) { + try { + const extra = (0, import_fs18.readFileSync)(process.env.NODE_EXTRA_CA_CERTS, "utf8"); + const certs = extra.match( + /-----BEGIN CERTIFICATE-----[\s\S]+?-----END CERTIFICATE-----/g + ); + if (certs !== null) { + trustedCertificates.push(...certs); + } + } catch { + } +} +var encoder2 = new import_util3.TextEncoder(); +var numericCompare = new Intl.Collator(void 0, { numeric: true }).compare; +function createFetchMock() { + return new import_undici7.MockAgent(); +} +var WrappedBindingSchema = import_zod14.z.object({ + scriptName: import_zod14.z.string(), + entrypoint: import_zod14.z.string().optional(), + bindings: import_zod14.z.record(JsonSchema).optional() +}); +var UnusableStringSchema = import_zod14.z.string().transform(() => void 0); +var UnsafeDirectSocketSchema = import_zod14.z.object({ + host: import_zod14.z.ostring(), + port: import_zod14.z.onumber(), + entrypoint: import_zod14.z.ostring(), + proxy: import_zod14.z.oboolean() +}); +var CoreOptionsSchemaInput = import_zod14.z.intersection( + SourceOptionsSchema, + import_zod14.z.object({ + name: import_zod14.z.string().optional(), + rootPath: UnusableStringSchema.optional(), + compatibilityDate: import_zod14.z.string().optional(), + compatibilityFlags: import_zod14.z.string().array().optional(), + unsafeInspectorProxy: import_zod14.z.boolean().optional(), + routes: import_zod14.z.string().array().optional(), + bindings: import_zod14.z.record(JsonSchema).optional(), + wasmBindings: import_zod14.z.record(import_zod14.z.union([PathSchema, import_zod14.z.instanceof(Uint8Array)])).optional(), + textBlobBindings: import_zod14.z.record(PathSchema).optional(), + dataBlobBindings: import_zod14.z.record(import_zod14.z.union([PathSchema, import_zod14.z.instanceof(Uint8Array)])).optional(), + serviceBindings: import_zod14.z.record(ServiceDesignatorSchema).optional(), + wrappedBindings: import_zod14.z.record(import_zod14.z.union([import_zod14.z.string(), WrappedBindingSchema])).optional(), + outboundService: ServiceDesignatorSchema.optional(), + fetchMock: import_zod14.z.instanceof(import_undici7.MockAgent).optional(), + // TODO(soon): remove this in favour of per-object `unsafeUniqueKey: kEphemeralUniqueKey` + unsafeEphemeralDurableObjects: import_zod14.z.boolean().optional(), + unsafeDirectSockets: UnsafeDirectSocketSchema.array().optional(), + unsafeEvalBinding: import_zod14.z.string().optional(), + unsafeUseModuleFallbackService: import_zod14.z.boolean().optional(), + /** Used to set the vitest pool worker SELF binding to point to the Router Worker if there are assets. + (If there are assets but we're not using vitest, the miniflare entry worker can point directly to + Router Worker) + */ + hasAssetsAndIsVitest: import_zod14.z.boolean().optional(), + tails: import_zod14.z.array(ServiceDesignatorSchema).optional(), + // Strip the CF-Connecting-IP header from outbound fetches + // There is an issue with the connect() API and the globalOutbound workerd setting that impacts TCP ingress + // We should default it to true once https://github.com/cloudflare/workerd/pull/4145 is resolved + stripCfConnectingIp: import_zod14.z.boolean().default(false) + }) +); +var CoreOptionsSchema = CoreOptionsSchemaInput.transform((value) => { + const fetchMock = value.fetchMock; + if (fetchMock !== void 0) { + if (value.outboundService !== void 0) { + throw new MiniflareCoreError( + "ERR_MULTIPLE_OUTBOUNDS", + "Only one of `outboundService` or `fetchMock` may be specified per worker" + ); + } + value.fetchMock = void 0; + value.outboundService = (req) => fetch4(req, { dispatcher: fetchMock }); + } + return value; +}); +var CoreSharedOptionsSchema = import_zod14.z.object({ + rootPath: UnusableStringSchema.optional(), + host: import_zod14.z.string().optional(), + port: import_zod14.z.number().optional(), + https: import_zod14.z.boolean().optional(), + httpsKey: import_zod14.z.string().optional(), + httpsKeyPath: import_zod14.z.string().optional(), + httpsCert: import_zod14.z.string().optional(), + httpsCertPath: import_zod14.z.string().optional(), + inspectorPort: import_zod14.z.number().optional(), + verbose: import_zod14.z.boolean().optional(), + log: import_zod14.z.instanceof(Log).optional(), + handleRuntimeStdio: import_zod14.z.function(import_zod14.z.tuple([import_zod14.z.instanceof(import_stream2.Readable), import_zod14.z.instanceof(import_stream2.Readable)])).optional(), + upstream: import_zod14.z.string().optional(), + // TODO: add back validation of cf object + cf: import_zod14.z.union([import_zod14.z.boolean(), import_zod14.z.string(), import_zod14.z.record(import_zod14.z.any())]).optional(), + liveReload: import_zod14.z.boolean().optional(), + // This is a shared secret between a proxy server and miniflare that can be + // passed in a header to prove that the request came from the proxy and not + // some malicious attacker. + unsafeProxySharedSecret: import_zod14.z.string().optional(), + unsafeModuleFallbackService: ServiceFetchSchema.optional(), + // Keep blobs when deleting/overwriting keys, required for stacked storage + unsafeStickyBlobs: import_zod14.z.boolean().optional(), + // Enable directly triggering user Worker handlers with paths like `/cdn-cgi/handler/scheduled` + unsafeTriggerHandlers: import_zod14.z.boolean().optional(), + // Enable logging requests + logRequests: import_zod14.z.boolean().default(true) +}); +var CORE_PLUGIN_NAME2 = "core"; +var LIVE_RELOAD_SCRIPT_TEMPLATE = (port) => ``; +var SCRIPT_CUSTOM_SERVICE = `addEventListener("fetch", (event) => { + const request = new Request(event.request); + request.headers.set("${CoreHeaders.CUSTOM_SERVICE}", ${CoreBindings.TEXT_CUSTOM_SERVICE}); + request.headers.set("${CoreHeaders.ORIGINAL_URL}", request.url); + event.respondWith(${CoreBindings.SERVICE_LOOPBACK}.fetch(request)); +})`; +function getCustomServiceDesignator(refererName, workerIndex, kind, name, service, hasAssetsAndIsVitest = false) { + let serviceName; + let entrypoint; + let props; + if (typeof service === "function") { + serviceName = getCustomServiceName(workerIndex, kind, name); + } else if (typeof service === "object") { + if ("mixedModeConnectionString" in service) { + (0, import_assert9.default)("name" in service && typeof service.name === "string"); + serviceName = `${CORE_PLUGIN_NAME2}:mixed-mode-service:${workerIndex}:${name}`; + } else if ("name" in service) { + if (service.name === kCurrentWorker) { + serviceName = getUserServiceName(refererName); + } else { + serviceName = getUserServiceName(service.name); + } + entrypoint = service.entrypoint; + if (service.props) { + props = { json: JSON.stringify(service.props) }; + } + } else { + serviceName = getBuiltinServiceName(workerIndex, kind, name); + } + } else if (service === kCurrentWorker) { + serviceName = hasAssetsAndIsVitest ? `${RPC_PROXY_SERVICE_NAME}:${refererName}` : getUserServiceName(refererName); + } else { + serviceName = getUserServiceName(service); + } + return { name: serviceName, entrypoint, props }; +} +function maybeGetCustomServiceService(workerIndex, kind, name, service) { + if (typeof service === "function") { + return { + name: getCustomServiceName(workerIndex, kind, name), + worker: { + serviceWorkerScript: SCRIPT_CUSTOM_SERVICE, + compatibilityDate: "2022-09-01", + bindings: [ + { + name: CoreBindings.TEXT_CUSTOM_SERVICE, + text: `${workerIndex}/${kind}${name}` + }, + WORKER_BINDING_SERVICE_LOOPBACK + ] + } + }; + } else if (typeof service === "object" && !("name" in service)) { + return { + name: getBuiltinServiceName(workerIndex, kind, name), + ...service + }; + } else if (typeof service === "object" && service.mixedModeConnectionString !== void 0) { + (0, import_assert9.default)( + service.mixedModeConnectionString && service.name && typeof service.name === "string" + ); + return { + name: `${CORE_PLUGIN_NAME2}:mixed-mode-service:${workerIndex}:${name}`, + worker: mixedModeClientWorker(service.mixedModeConnectionString, name) + }; + } +} +var FALLBACK_COMPATIBILITY_DATE = "2000-01-01"; +function getCurrentCompatibilityDate() { + const now = (/* @__PURE__ */ new Date()).toISOString(); + return now.substring(0, now.indexOf("T")); +} +function validateCompatibilityDate(log, compatibilityDate) { + if (numericCompare(compatibilityDate, getCurrentCompatibilityDate()) > 0) { + throw new MiniflareCoreError( + "ERR_FUTURE_COMPATIBILITY_DATE", + `Compatibility date "${compatibilityDate}" is in the future and unsupported` + ); + } else if (numericCompare(compatibilityDate, import_workerd2.compatibilityDate) > 0) { + log.warn( + [ + "The latest compatibility date supported by the installed Cloudflare Workers Runtime is ", + bold(`"${import_workerd2.compatibilityDate}"`), + ",\nbut you've requested ", + bold(`"${compatibilityDate}"`), + ". Falling back to ", + bold(`"${import_workerd2.compatibilityDate}"`), + "..." + ].join("") + ); + return import_workerd2.compatibilityDate; + } + return compatibilityDate; +} +function buildBindings(bindings) { + return Object.entries(bindings).map(([name, value]) => { + if (typeof value === "string") { + return { + name, + text: value + }; + } else { + return { + name, + json: JSON.stringify(value) + }; + } + }); +} +var WRAPPED_MODULE_PREFIX = "miniflare-internal:wrapped:"; +function workerNameToWrappedModule(workerName) { + return WRAPPED_MODULE_PREFIX + workerName; +} +function maybeWrappedModuleToWorkerName(name) { + if (name.startsWith(WRAPPED_MODULE_PREFIX)) { + return name.substring(WRAPPED_MODULE_PREFIX.length); + } +} +function getStripCfConnectingIpName(workerIndex) { + return `strip-cf-connecting-ip:${workerIndex}`; +} +function getGlobalOutbound(workerIndex, options) { + return options.outboundService === void 0 ? void 0 : getCustomServiceDesignator( + /* referrer */ + options.name, + workerIndex, + "$" /* KNOWN */, + CUSTOM_SERVICE_KNOWN_OUTBOUND, + options.outboundService, + options.hasAssetsAndIsVitest + ); +} +var CORE_PLUGIN = { + options: CoreOptionsSchema, + sharedOptions: CoreSharedOptionsSchema, + getBindings(options, workerIndex) { + const bindings = []; + if (options.bindings !== void 0) { + bindings.push(...buildBindings(options.bindings)); + } + if (options.wasmBindings !== void 0) { + bindings.push( + ...Object.entries(options.wasmBindings).map( + ([name, value]) => typeof value === "string" ? import_promises6.default.readFile(value).then((wasmModule) => ({ name, wasmModule })) : { name, wasmModule: value } + ) + ); + } + if (options.textBlobBindings !== void 0) { + bindings.push( + ...Object.entries(options.textBlobBindings).map( + ([name, path37]) => import_promises6.default.readFile(path37, "utf8").then((text) => ({ name, text })) + ) + ); + } + if (options.dataBlobBindings !== void 0) { + bindings.push( + ...Object.entries(options.dataBlobBindings).map( + ([name, value]) => typeof value === "string" ? import_promises6.default.readFile(value).then((data) => ({ name, data })) : { name, data: value } + ) + ); + } + if (options.serviceBindings !== void 0) { + bindings.push( + ...Object.entries(options.serviceBindings).map(([name, service]) => { + return { + name, + service: getCustomServiceDesignator( + /* referrer */ + options.name, + workerIndex, + "#" /* UNKNOWN */, + name, + service, + options.hasAssetsAndIsVitest + ) + }; + }) + ); + } + if (options.wrappedBindings !== void 0) { + bindings.push( + ...Object.entries(options.wrappedBindings).map(([name, designator]) => { + const isObject = typeof designator === "object"; + const scriptName = isObject ? designator.scriptName : designator; + const entrypoint = isObject ? designator.entrypoint : void 0; + const bindings2 = isObject ? designator.bindings : void 0; + const moduleName2 = workerNameToWrappedModule(scriptName); + const innerBindings = bindings2 === void 0 ? [] : buildBindings(bindings2); + return { + name, + wrapped: { moduleName: moduleName2, entrypoint, innerBindings } + }; + }) + ); + } + if (options.unsafeEvalBinding !== void 0) { + bindings.push({ + name: options.unsafeEvalBinding, + unsafeEval: kVoid + }); + } + return Promise.all(bindings); + }, + async getNodeBindings(options) { + const bindingEntries3 = []; + if (options.bindings !== void 0) { + bindingEntries3.push( + ...Object.entries(options.bindings).map(([name, value]) => [ + name, + JSON.parse(JSON.stringify(value)) + ]) + ); + } + if (options.wasmBindings !== void 0) { + bindingEntries3.push( + ...Object.entries(options.wasmBindings).map( + ([name, value]) => typeof value === "string" ? import_promises6.default.readFile(value).then((buffer) => [name, new WebAssembly.Module(buffer)]) : [name, new WebAssembly.Module(value)] + ) + ); + } + if (options.textBlobBindings !== void 0) { + bindingEntries3.push( + ...Object.entries(options.textBlobBindings).map( + ([name, path37]) => import_promises6.default.readFile(path37, "utf8").then((text) => [name, text]) + ) + ); + } + if (options.dataBlobBindings !== void 0) { + bindingEntries3.push( + ...Object.entries(options.dataBlobBindings).map( + ([name, value]) => typeof value === "string" ? import_promises6.default.readFile(value).then((buffer) => [name, viewToBuffer(buffer)]) : [name, viewToBuffer(value)] + ) + ); + } + if (options.serviceBindings !== void 0) { + bindingEntries3.push( + ...Object.keys(options.serviceBindings).map((name) => [ + name, + new ProxyNodeBinding() + ]) + ); + } + if (options.wrappedBindings !== void 0) { + bindingEntries3.push( + ...Object.keys(options.wrappedBindings).map((name) => [ + name, + new ProxyNodeBinding() + ]) + ); + } + return Object.fromEntries(await Promise.all(bindingEntries3)); + }, + async getServices({ + log, + options, + sharedOptions, + workerBindings, + workerIndex, + wrappedBindingNames, + durableObjectClassNames, + additionalModules, + loopbackPort + }) { + const additionalModuleNames = additionalModules.map(({ name: name2 }) => name2); + const workerScript = getWorkerScript( + options, + workerIndex, + additionalModuleNames + ); + if ("modules" in workerScript) { + const subDirs = new Set( + workerScript.modules.map(({ name: name2 }) => import_path21.default.posix.dirname(name2)) + ); + subDirs.delete("."); + for (const module2 of additionalModules) { + workerScript.modules.push(module2); + for (const subDir of subDirs) { + const relativePath = import_path21.default.posix.relative(subDir, module2.name); + const relativePathString = JSON.stringify(relativePath); + workerScript.modules.push({ + name: import_path21.default.posix.join(subDir, module2.name), + // TODO(someday): if we ever have additional modules without + // default exports, this may be a problem. For now, our only + // additional module is `__STATIC_CONTENT_MANIFEST` so it's fine. + // If needed, we could look for instances of `export default` or + // `as default` in the module's code as a heuristic. + esModule: `export * from ${relativePathString}; export { default } from ${relativePathString};` + }); + } + } + } + const name = options.name ?? ""; + const serviceName = getUserServiceName(options.name); + const classNames = durableObjectClassNames.get(serviceName); + const classNamesEntries = Array.from(classNames ?? []); + const compatibilityDate = validateCompatibilityDate( + log, + options.compatibilityDate ?? FALLBACK_COMPATIBILITY_DATE + ); + const isWrappedBinding = wrappedBindingNames.has(name); + const services = []; + const extensions = []; + if (isWrappedBinding) { + let invalidWrapped2 = function(reason) { + const message = `Cannot use ${stringName} for wrapped binding because ${reason}`; + throw new MiniflareCoreError("ERR_INVALID_WRAPPED", message); + }; + var invalidWrapped = invalidWrapped2; + const stringName = JSON.stringify(name); + if (workerIndex === 0) { + invalidWrapped2( + `it's the entrypoint. +Ensure ${stringName} isn't the first entry in the \`workers\` array.` + ); + } + if (!("modules" in workerScript)) { + invalidWrapped2( + `it's a service worker. +Ensure ${stringName} sets \`modules\` to \`true\` or an array of modules` + ); + } + if (workerScript.modules.length !== 1) { + invalidWrapped2( + `it isn't a single module. +Ensure ${stringName} doesn't include unbundled \`import\`s.` + ); + } + const firstModule = workerScript.modules[0]; + if (!("esModule" in firstModule)) { + invalidWrapped2("it isn't a single ES module"); + } + if (options.compatibilityDate !== void 0) { + invalidWrapped2( + "it defines a compatibility date.\nWrapped bindings use the compatibility date of the worker with the binding." + ); + } + if (options.compatibilityFlags?.length) { + invalidWrapped2( + "it defines compatibility flags.\nWrapped bindings use the compatibility flags of the worker with the binding." + ); + } + if (options.outboundService !== void 0) { + invalidWrapped2( + "it defines an outbound service.\nWrapped bindings use the outbound service of the worker with the binding." + ); + } + extensions.push({ + modules: [ + { + name: workerNameToWrappedModule(name), + esModule: firstModule.esModule, + internal: true + } + ] + }); + } else { + services.push({ + name: serviceName, + worker: { + ...workerScript, + compatibilityDate, + compatibilityFlags: options.compatibilityFlags, + bindings: workerBindings, + durableObjectNamespaces: classNamesEntries.map( + ([ + className, + { enableSql, unsafeUniqueKey, unsafePreventEviction } + ]) => { + if (unsafeUniqueKey === kUnsafeEphemeralUniqueKey) { + return { + className, + enableSql, + ephemeralLocal: kVoid, + preventEviction: unsafePreventEviction + }; + } else { + return { + className, + enableSql, + // This `uniqueKey` will (among other things) be used as part of the + // path when persisting to the file-system. `-` is invalid in + // JavaScript class names, but safe on filesystems (incl. Windows). + uniqueKey: unsafeUniqueKey ?? `${options.name ?? ""}-${className}`, + preventEviction: unsafePreventEviction + }; + } + } + ), + durableObjectStorage: classNamesEntries.length === 0 ? void 0 : options.unsafeEphemeralDurableObjects ? { inMemory: kVoid } : { localDisk: DURABLE_OBJECTS_STORAGE_SERVICE_NAME }, + globalOutbound: options.stripCfConnectingIp ? { name: getStripCfConnectingIpName(workerIndex) } : getGlobalOutbound(workerIndex, options), + cacheApiOutbound: { name: getCacheServiceName(workerIndex) }, + moduleFallback: options.unsafeUseModuleFallbackService && sharedOptions.unsafeModuleFallbackService !== void 0 ? `localhost:${loopbackPort}` : void 0, + tails: options.tails === void 0 ? void 0 : options.tails.map((service) => { + return getCustomServiceDesignator( + /* referrer */ + options.name, + workerIndex, + "#" /* UNKNOWN */, + name, + service, + options.hasAssetsAndIsVitest + ); + }) + } + }); + } + if (options.serviceBindings !== void 0) { + for (const [name2, service] of Object.entries(options.serviceBindings)) { + const maybeService = maybeGetCustomServiceService( + workerIndex, + "#" /* UNKNOWN */, + name2, + service + ); + if (maybeService !== void 0) services.push(maybeService); + } + } + if (options.tails !== void 0) { + for (const service of options.tails) { + const maybeService = maybeGetCustomServiceService( + workerIndex, + "#" /* UNKNOWN */, + name, + service + ); + if (maybeService !== void 0) services.push(maybeService); + } + } + if (options.outboundService !== void 0) { + const maybeService = maybeGetCustomServiceService( + workerIndex, + "$" /* KNOWN */, + CUSTOM_SERVICE_KNOWN_OUTBOUND, + options.outboundService + ); + if (maybeService !== void 0) services.push(maybeService); + } + if (options.stripCfConnectingIp) { + services.push({ + name: getStripCfConnectingIpName(workerIndex), + worker: { + modules: [ + { + name: "index.js", + esModule: strip_cf_connecting_ip_worker_default() + } + ], + compatibilityDate: "2025-01-01", + globalOutbound: getGlobalOutbound(workerIndex, options) + } + }); + } + return { services, extensions }; + } +}; +function getGlobalServices({ + sharedOptions, + allWorkerRoutes, + fallbackWorkerName, + loopbackPort, + log, + proxyBindings +}) { + const workerNames = [...allWorkerRoutes.keys()]; + const routes = parseRoutes(allWorkerRoutes); + const serviceEntryBindings = [ + WORKER_BINDING_SERVICE_LOOPBACK, + // For converting stack-traces to pretty-error pages + { name: CoreBindings.JSON_ROUTES, json: JSON.stringify(routes) }, + { + name: CoreBindings.TRIGGER_HANDLERS, + json: JSON.stringify(!!sharedOptions.unsafeTriggerHandlers) + }, + { + name: CoreBindings.LOG_REQUESTS, + json: JSON.stringify(!!sharedOptions.logRequests) + }, + { name: CoreBindings.JSON_CF_BLOB, json: JSON.stringify(sharedOptions.cf) }, + { name: CoreBindings.JSON_LOG_LEVEL, json: JSON.stringify(log.level) }, + { + name: CoreBindings.SERVICE_USER_FALLBACK, + service: { name: fallbackWorkerName } + }, + ...workerNames.map((name) => ({ + name: CoreBindings.SERVICE_USER_ROUTE_PREFIX + name, + service: { name: getUserServiceName(name) } + })), + { + name: CoreBindings.DURABLE_OBJECT_NAMESPACE_PROXY, + durableObjectNamespace: { className: "ProxyServer" } + }, + { + name: CoreBindings.DATA_PROXY_SECRET, + data: PROXY_SECRET + }, + // Add `proxyBindings` here, they'll be added to the `ProxyServer` `env` + ...proxyBindings + ]; + if (sharedOptions.upstream !== void 0) { + serviceEntryBindings.push({ + name: CoreBindings.TEXT_UPSTREAM_URL, + text: sharedOptions.upstream + }); + } + if (sharedOptions.unsafeProxySharedSecret !== void 0) { + serviceEntryBindings.push({ + name: CoreBindings.DATA_PROXY_SHARED_SECRET, + data: encoder2.encode(sharedOptions.unsafeProxySharedSecret) + }); + } + if (sharedOptions.liveReload) { + const liveReloadScript = LIVE_RELOAD_SCRIPT_TEMPLATE(loopbackPort); + serviceEntryBindings.push({ + name: CoreBindings.DATA_LIVE_RELOAD_SCRIPT, + data: encoder2.encode(liveReloadScript) + }); + } + return [ + { + name: SERVICE_LOOPBACK, + external: { http: { cfBlobHeader: CoreHeaders.CF_BLOB } } + }, + { + name: SERVICE_ENTRY, + worker: { + modules: [{ name: "entry.worker.js", esModule: entry_worker_default() }], + compatibilityDate: "2025-03-17", + compatibilityFlags: ["nodejs_compat", "service_binding_extra_handlers"], + bindings: serviceEntryBindings, + durableObjectNamespaces: [ + { + className: "ProxyServer", + uniqueKey: `${SERVICE_ENTRY}-ProxyServer`, + // `ProxyServer` relies on a singleton object containing of "heap" + // mapping addresses to native references. If the singleton object + // were evicted, addresses would be invalidated. Therefore, we + // prevent eviction to ensure heap addresses stay valid for the + // lifetime of the `workerd` process + preventEviction: true + } + ], + // `ProxyServer` doesn't make use of Durable Object storage + durableObjectStorage: { inMemory: kVoid }, + // Always use the entrypoints cache implementation for proxying. This + // means if the entrypoint disables caching, proxied cache operations + // will be no-ops. Note we always require at least one worker to be set. + cacheApiOutbound: { name: "cache:0" } + } + }, + { + name: "internet", + network: { + // Allow access to private/public addresses: + // https://github.com/cloudflare/miniflare/issues/412 + allow: ["public", "private", "240.0.0.0/4"], + deny: [], + tlsOptions: { + trustBrowserCas: true, + trustedCertificates + } + } + } + ]; +} +function getWorkerScript(options, workerIndex, additionalModuleNames) { + const modulesRoot = import_path21.default.resolve( + ("modulesRoot" in options ? options.modulesRoot : void 0) ?? "" + ); + if (Array.isArray(options.modules)) { + return { + modules: options.modules.map( + (module2) => convertModuleDefinition(modulesRoot, module2) + ) + }; + } + let code; + if ("script" in options && options.script !== void 0) { + code = options.script; + } else if ("scriptPath" in options && options.scriptPath !== void 0) { + code = (0, import_fs18.readFileSync)(options.scriptPath, "utf8"); + } else { + import_assert9.default.fail("Unreachable: Workers must have code"); + } + const scriptPath = options.scriptPath ?? buildStringScriptPath(workerIndex); + if (options.modules) { + const locator = new ModuleLocator( + modulesRoot, + additionalModuleNames, + options.modulesRules, + options.compatibilityDate, + options.compatibilityFlags + ); + locator.visitEntrypoint(code, scriptPath); + return { modules: locator.modules }; + } else { + code = withSourceURL(code, scriptPath); + return { serviceWorkerScript: code }; + } +} + +// src/plugins/assets/schema.ts +var import_zod15 = require("zod"); +var AssetsOptionsSchema = import_zod15.z.object({ + assets: import_zod15.z.object({ + // User Worker name or vitest runner - this is only ever set inside miniflare + // The assets plugin needs access to the worker name to create the router worker - user worker binding + workerName: import_zod15.z.string().optional(), + directory: PathSchema, + binding: import_zod15.z.string().optional(), + routerConfig: RouterConfigSchema.optional(), + assetConfig: AssetConfigSchema.omit({ + compatibility_date: true, + compatibility_flags: true + }).optional() + }).optional(), + compatibilityDate: import_zod15.z.string().optional(), + compatibilityFlags: import_zod15.z.string().array().optional() +}); + +// src/plugins/assets/index.ts +var ASSETS_PLUGIN = { + options: AssetsOptionsSchema, + async getBindings(options) { + if (!options.assets?.binding) { + return []; + } + return [ + { + // binding between User Worker and Asset Worker + name: options.assets.binding, + service: { + name: `${ASSETS_SERVICE_NAME}:${options.assets.workerName}` + } + } + ]; + }, + async getNodeBindings(options) { + if (!options.assets?.binding) { + return {}; + } + return { + [options.assets.binding]: new ProxyNodeBinding() + }; + }, + async getServices({ options }) { + if (!options.assets) { + return []; + } + const storageServiceName = `${ASSETS_PLUGIN_NAME}:storage`; + const storageService = { + name: storageServiceName, + disk: { + path: options.assets.directory, + writable: true, + allowDotfiles: true + } + }; + const { encodedAssetManifest, assetsReverseMap } = await buildAssetManifest( + options.assets.directory + ); + const redirectsFile = (0, import_node_path3.join)(options.assets.directory, REDIRECTS_FILENAME); + const headersFile = (0, import_node_path3.join)(options.assets.directory, HEADERS_FILENAME); + const redirectsContents = maybeGetFile(redirectsFile); + const headersContents = maybeGetFile(headersFile); + const logger = new Log(); + const assetParserLogger = { + debug: (message) => logger.debug(message), + log: (message) => logger.info(message), + info: (message) => logger.info(message), + warn: (message) => logger.warn(message), + error: (error) => logger.error(error) + }; + let parsedRedirects; + if (redirectsContents !== void 0) { + const redirects = parseRedirects(redirectsContents); + parsedRedirects = RedirectsSchema.parse( + constructRedirects({ + redirects, + redirectsFile, + logger: assetParserLogger + }).redirects + ); + } + let parsedHeaders; + if (headersContents !== void 0) { + const headers = parseHeaders(headersContents); + parsedHeaders = HeadersSchema.parse( + constructHeaders({ + headers, + headersFile, + logger: assetParserLogger + }).headers + ); + } + const assetConfig = { + compatibility_date: options.compatibilityDate, + compatibility_flags: options.compatibilityFlags, + ...options.assets.assetConfig, + redirects: parsedRedirects, + headers: parsedHeaders, + debug: true + }; + const id = options.assets.workerName; + const namespaceService = { + name: `${ASSETS_KV_SERVICE_NAME}:${id}`, + worker: { + compatibilityDate: "2023-07-24", + compatibilityFlags: ["nodejs_compat"], + modules: [ + { + name: "assets-kv-worker.mjs", + esModule: assets_kv_worker_default() + } + ], + bindings: [ + { + name: SharedBindings.MAYBE_SERVICE_BLOBS, + service: { name: storageServiceName } + }, + { + name: "ASSETS_REVERSE_MAP", + json: JSON.stringify(assetsReverseMap) + } + ] + } + }; + const assetService = { + name: `${ASSETS_SERVICE_NAME}:${id}`, + worker: { + // TODO: read these from the wrangler.toml + compatibilityDate: "2024-07-31", + compatibilityFlags: ["nodejs_compat"], + modules: [ + { + name: "asset-worker.mjs", + esModule: assets_worker_default() + } + ], + bindings: [ + { + name: "ASSETS_KV_NAMESPACE", + kvNamespace: { + name: `${ASSETS_KV_SERVICE_NAME}:${id}` + } + }, + { + name: "ASSETS_MANIFEST", + data: encodedAssetManifest + }, + { + name: "CONFIG", + json: JSON.stringify(assetConfig) + } + ] + } + }; + const routerService = { + name: `${ROUTER_SERVICE_NAME}:${id}`, + worker: { + // TODO: read these from the wrangler.toml + compatibilityDate: "2024-07-31", + compatibilityFlags: ["nodejs_compat", "no_nodejs_compat_v2"], + modules: [ + { + name: "router-worker.mjs", + esModule: router_worker_default() + } + ], + bindings: [ + { + name: "ASSET_WORKER", + service: { + name: `${ASSETS_SERVICE_NAME}:${id}` + } + }, + { + name: "USER_WORKER", + service: { name: getUserServiceName(id) } + }, + { + name: "CONFIG", + json: JSON.stringify(options.assets.routerConfig ?? {}) + } + ] + } + }; + const assetsProxyService = { + name: `${RPC_PROXY_SERVICE_NAME}:${id}`, + worker: { + compatibilityDate: "2024-08-01", + modules: [ + { + name: "assets-proxy-worker.mjs", + esModule: rpc_proxy_worker_default() + } + ], + bindings: [ + { + name: "ROUTER_WORKER", + service: { + name: `${ROUTER_SERVICE_NAME}:${id}` + } + }, + { + name: "USER_WORKER", + service: { + name: getUserServiceName(id) + } + } + ] + } + }; + return [ + storageService, + namespaceService, + assetService, + routerService, + assetsProxyService + ]; + } +}; +var buildAssetManifest = async (dir) => { + const { manifest, assetsReverseMap } = await walk(dir); + const sortedAssetManifest = sortManifest(manifest); + const encodedAssetManifest = encodeManifest(sortedAssetManifest); + return { encodedAssetManifest, assetsReverseMap }; +}; +var walk = async (dir) => { + const files = await import_promises7.default.readdir(dir, { recursive: true }); + const manifest = []; + const assetsReverseMap = {}; + const { assetsIgnoreFunction } = await createAssetsIgnoreFunction(dir); + let counter = 0; + await Promise.all( + files.map(async (file) => { + if (assetsIgnoreFunction(file)) { + return; + } + const filepath = import_node_path3.default.join(dir, file); + const relativeFilepath = import_node_path3.default.relative(dir, filepath); + const filestat = await import_promises7.default.stat(filepath); + if (filestat.isSymbolicLink() || filestat.isDirectory()) { + return; + } else { + if (filestat.size > MAX_ASSET_SIZE) { + throw new Error( + `Asset too large. +Cloudflare Workers supports assets with sizes of up to ${prettyBytes( + MAX_ASSET_SIZE, + { + binary: true + } + )}. We found a file ${filepath} with a size of ${prettyBytes( + filestat.size, + { + binary: true + } + )}. +Ensure all assets in your assets directory "${dir}" conform with the Workers maximum size requirement.` + ); + } + const [pathHash, contentHash] = await Promise.all([ + hashPath(normalizeFilePath(relativeFilepath)), + // used absolute filepath here so that changes to the enclosing asset folder will be registered + hashPath(filepath + filestat.mtimeMs.toString()) + ]); + manifest.push({ + pathHash, + contentHash + }); + assetsReverseMap[bytesToHex(contentHash)] = { + filePath: relativeFilepath, + contentType: getContentType(filepath) + }; + counter++; + } + }) + ); + if (counter > MAX_ASSET_COUNT) { + throw new Error( + `Maximum number of assets exceeded. +Cloudflare Workers supports up to ${MAX_ASSET_COUNT.toLocaleString()} assets in a version. We found ${counter.toLocaleString()} files in the specified assets directory "${dir}". +Ensure your assets directory contains a maximum of ${MAX_ASSET_COUNT.toLocaleString()} files, and that you have specified your assets directory correctly.` + ); + } + return { manifest, assetsReverseMap }; +}; +var sortManifest = (manifest) => { + return manifest.sort(comparisonFn); +}; +var comparisonFn = (a, b) => { + if (a.pathHash.length < b.pathHash.length) { + return -1; + } + if (a.pathHash.length > b.pathHash.length) { + return 1; + } + for (const [i, v] of a.pathHash.entries()) { + if (v < b.pathHash[i]) { + return -1; + } + if (v > b.pathHash[i]) { + return 1; + } + } + return 1; +}; +var encodeManifest = (manifest) => { + const assetManifestBytes = new Uint8Array( + HEADER_SIZE + manifest.length * ENTRY_SIZE + ); + for (const [i, entry] of manifest.entries()) { + const entryOffset = HEADER_SIZE + i * ENTRY_SIZE; + assetManifestBytes.set(entry.pathHash, entryOffset + PATH_HASH_OFFSET); + assetManifestBytes.set( + entry.contentHash, + entryOffset + CONTENT_HASH_OFFSET + ); + } + return assetManifestBytes; +}; +var bytesToHex = (buffer) => { + return [...new Uint8Array(buffer)].map((b) => b.toString(16).padStart(2, "0")).join(""); +}; +var hashPath = async (path37) => { + const encoder3 = new TextEncoder(); + const data = encoder3.encode(path37); + const hashBuffer = await import_node_crypto.default.subtle.digest( + "SHA-256", + data.buffer + ); + return new Uint8Array(hashBuffer, 0, PATH_HASH_SIZE); +}; + +// src/plugins/browser-rendering/index.ts +var import_node_assert4 = __toESM(require("node:assert")); +var import_zod16 = require("zod"); +var BrowserRenderingSchema = import_zod16.z.object({ + binding: import_zod16.z.string(), + mixedModeConnectionString: import_zod16.z.custom() +}); +var BrowserRenderingOptionsSchema = import_zod16.z.object({ + browserRendering: BrowserRenderingSchema.optional() +}); +var BROWSER_RENDERING_PLUGIN_NAME = "browser-rendering"; +var BROWSER_RENDERING_PLUGIN = { + options: BrowserRenderingOptionsSchema, + async getBindings(options) { + if (!options.browserRendering) { + return []; + } + (0, import_node_assert4.default)( + options.browserRendering.mixedModeConnectionString, + "Workers Browser Rendering only supports Mixed Mode" + ); + return [ + { + name: options.browserRendering.binding, + service: { + name: `${BROWSER_RENDERING_PLUGIN_NAME}:${options.browserRendering.binding}` + } + } + ]; + }, + getNodeBindings(options) { + if (!options.browserRendering) { + return {}; + } + return { + [options.browserRendering.binding]: new ProxyNodeBinding() + }; + }, + async getServices({ options }) { + if (!options.browserRendering) { + return []; + } + return [ + { + name: `${BROWSER_RENDERING_PLUGIN_NAME}:${options.browserRendering.binding}`, + worker: mixedModeClientWorker( + options.browserRendering.mixedModeConnectionString, + options.browserRendering.binding + ) + } + ]; + } +}; + +// src/plugins/d1/index.ts +var import_assert10 = __toESM(require("assert")); +var import_promises8 = __toESM(require("fs/promises")); + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/d1/database.worker.ts +var import_fs19 = __toESM(require("fs")); +var import_path22 = __toESM(require("path")); +var import_url19 = __toESM(require("url")); +var contents15; +function database_worker_default() { + if (contents15 !== void 0) return contents15; + const filePath = import_path22.default.join(__dirname, "workers", "d1/database.worker.js"); + contents15 = import_fs19.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url19.default.pathToFileURL(filePath); + return contents15; +} + +// src/plugins/d1/index.ts +var import_zod17 = require("zod"); +var D1OptionsSchema = import_zod17.z.object({ + d1Databases: import_zod17.z.union([ + import_zod17.z.record(import_zod17.z.string()), + import_zod17.z.record( + import_zod17.z.object({ + id: import_zod17.z.string(), + mixedModeConnectionString: import_zod17.z.custom().optional() + }) + ), + import_zod17.z.string().array() + ]).optional() +}); +var D1SharedOptionsSchema = import_zod17.z.object({ + d1Persist: PersistenceSchema +}); +var D1_PLUGIN_NAME = "d1"; +var D1_STORAGE_SERVICE_NAME = `${D1_PLUGIN_NAME}:storage`; +var D1_DATABASE_SERVICE_PREFIX = `${D1_PLUGIN_NAME}:db`; +var D1_DATABASE_OBJECT_CLASS_NAME = "D1DatabaseObject"; +var D1_DATABASE_OBJECT = { + serviceName: D1_DATABASE_SERVICE_PREFIX, + className: D1_DATABASE_OBJECT_CLASS_NAME +}; +var D1_PLUGIN = { + options: D1OptionsSchema, + sharedOptions: D1SharedOptionsSchema, + getBindings(options) { + const databases = namespaceEntries(options.d1Databases); + return databases.map( + ([name, { id, mixedModeConnectionString }]) => { + (0, import_assert10.default)( + !(name.startsWith("__D1_BETA__") && mixedModeConnectionString), + "Mixed Mode cannot be used with Alpha D1 Databases" + ); + const binding = name.startsWith("__D1_BETA__") ? ( + // Used before Wrangler 3.3 + { + service: { name: `${D1_DATABASE_SERVICE_PREFIX}:${id}` } + } + ) : ( + // Used after Wrangler 3.3 + { + wrapped: { + moduleName: "cloudflare-internal:d1-api", + innerBindings: [ + { + name: "fetcher", + service: { name: `${D1_DATABASE_SERVICE_PREFIX}:${id}` } + } + ] + } + } + ); + return { name, ...binding }; + } + ); + }, + getNodeBindings(options) { + const databases = namespaceKeys(options.d1Databases); + return Object.fromEntries( + databases.map((name) => [name, new ProxyNodeBinding()]) + ); + }, + async getServices({ + options, + sharedOptions, + tmpPath, + log, + unsafeStickyBlobs + }) { + const persist = sharedOptions.d1Persist; + const databases = namespaceEntries(options.d1Databases); + const services = databases.map( + ([name, { id, mixedModeConnectionString }]) => ({ + name: `${D1_DATABASE_SERVICE_PREFIX}:${id}`, + worker: mixedModeConnectionString ? mixedModeClientWorker(mixedModeConnectionString, name) : objectEntryWorker(D1_DATABASE_OBJECT, id) + }) + ); + if (databases.length > 0) { + const uniqueKey = `miniflare-${D1_DATABASE_OBJECT_CLASS_NAME}`; + const persistPath = getPersistPath(D1_PLUGIN_NAME, tmpPath, persist); + await import_promises8.default.mkdir(persistPath, { recursive: true }); + const storageService = { + name: D1_STORAGE_SERVICE_NAME, + disk: { path: persistPath, writable: true } + }; + const objectService = { + name: D1_DATABASE_SERVICE_PREFIX, + worker: { + compatibilityDate: "2023-07-24", + compatibilityFlags: ["nodejs_compat", "experimental"], + modules: [ + { + name: "database.worker.js", + esModule: database_worker_default() + } + ], + durableObjectNamespaces: [ + { + className: D1_DATABASE_OBJECT_CLASS_NAME, + uniqueKey + } + ], + // Store Durable Object SQL databases in persist path + durableObjectStorage: { localDisk: D1_STORAGE_SERVICE_NAME }, + // Bind blob disk directory service to object + bindings: [ + { + name: SharedBindings.MAYBE_SERVICE_BLOBS, + service: { name: D1_STORAGE_SERVICE_NAME } + }, + { + name: SharedBindings.MAYBE_SERVICE_LOOPBACK, + service: { name: SERVICE_LOOPBACK } + }, + ...getMiniflareObjectBindings(unsafeStickyBlobs) + ] + } + }; + services.push(storageService, objectService); + for (const database of databases) { + await migrateDatabase(log, uniqueKey, persistPath, database[1].id); + } + } + return services; + }, + getPersistPath({ d1Persist }, tmpPath) { + return getPersistPath(D1_PLUGIN_NAME, tmpPath, d1Persist); + } +}; + +// src/plugins/dispatch-namespace/index.ts +var import_node_assert5 = __toESM(require("node:assert")); + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/dispatch-namespace/dispatch-namespace.worker.ts +var import_fs20 = __toESM(require("fs")); +var import_path23 = __toESM(require("path")); +var import_url20 = __toESM(require("url")); +var contents16; +function dispatch_namespace_worker_default() { + if (contents16 !== void 0) return contents16; + const filePath = import_path23.default.join(__dirname, "workers", "dispatch-namespace/dispatch-namespace.worker.js"); + contents16 = import_fs20.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url20.default.pathToFileURL(filePath); + return contents16; +} + +// src/plugins/dispatch-namespace/index.ts +var import_zod18 = require("zod"); +var DispatchNamespaceOptionsSchema = import_zod18.z.object({ + dispatchNamespaces: import_zod18.z.record( + import_zod18.z.object({ + namespace: import_zod18.z.string(), + mixedModeConnectionString: import_zod18.z.custom().optional() + }) + ).optional() +}); +var DISPATCH_NAMESPACE_PLUGIN_NAME = "dispatch-namespace"; +var DISPATCH_NAMESPACE_PLUGIN = { + options: DispatchNamespaceOptionsSchema, + async getBindings(options) { + if (!options.dispatchNamespaces) { + return []; + } + const bindings = Object.entries( + options.dispatchNamespaces + ).map(([name, config]) => { + return { + name, + wrapped: { + moduleName: `${DISPATCH_NAMESPACE_PLUGIN_NAME}:local-dispatch-namespace`, + innerBindings: [ + { + name: "fetcher", + service: { + name: `${DISPATCH_NAMESPACE_PLUGIN_NAME}:ns:${config.namespace}` + } + } + ] + } + }; + }); + return bindings; + }, + getNodeBindings(options) { + if (!options.dispatchNamespaces) { + return {}; + } + return Object.fromEntries( + Object.keys(options.dispatchNamespaces).map((name) => [ + name, + new ProxyNodeBinding() + ]) + ); + }, + async getServices({ options }) { + if (!options.dispatchNamespaces) { + return []; + } + return { + services: Object.entries(options.dispatchNamespaces).map( + ([name, config]) => { + (0, import_node_assert5.default)( + config.mixedModeConnectionString, + "Dispatch Namespace bindings only support Mixed Mode" + ); + return { + name: `${DISPATCH_NAMESPACE_PLUGIN_NAME}:ns:${config.namespace}`, + worker: mixedModeClientWorker( + config.mixedModeConnectionString, + name + ) + }; + } + ), + extensions: [ + { + modules: [ + { + name: `${DISPATCH_NAMESPACE_PLUGIN_NAME}:local-dispatch-namespace`, + esModule: dispatch_namespace_worker_default(), + internal: true + } + ] + } + ] + }; + } +}; + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/email/email.worker.ts +var import_fs21 = __toESM(require("fs")); +var import_path24 = __toESM(require("path")); +var import_url21 = __toESM(require("url")); +var contents17; +function email_worker_default() { + if (contents17 !== void 0) return contents17; + const filePath = import_path24.default.join(__dirname, "workers", "email/email.worker.js"); + contents17 = import_fs21.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url21.default.pathToFileURL(filePath); + return contents17; +} + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/email/send_email.worker.ts +var import_fs22 = __toESM(require("fs")); +var import_path25 = __toESM(require("path")); +var import_url22 = __toESM(require("url")); +var contents18; +function send_email_worker_default() { + if (contents18 !== void 0) return contents18; + const filePath = import_path25.default.join(__dirname, "workers", "email/send_email.worker.js"); + contents18 = import_fs22.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url22.default.pathToFileURL(filePath); + return contents18; +} + +// src/plugins/email/index.ts +var import_zod19 = require("zod"); +var EmailBindingOptionsSchema = import_zod19.z.object({ + name: import_zod19.z.string() +}).and( + import_zod19.z.union([ + import_zod19.z.object({ + destination_address: import_zod19.z.string().optional(), + allowed_destination_addresses: import_zod19.z.never().optional() + }), + import_zod19.z.object({ + allowed_destination_addresses: import_zod19.z.array(import_zod19.z.string()).optional(), + destination_address: import_zod19.z.never().optional() + }) + ]) +); +var EmailOptionsSchema = import_zod19.z.object({ + email: import_zod19.z.object({ + send_email: import_zod19.z.array(EmailBindingOptionsSchema).optional() + }).optional() +}); +var EMAIL_PLUGIN_NAME = "email"; +var SERVICE_SEND_EMAIL_WORKER_PREFIX = `SEND-EMAIL-WORKER`; +function buildJsonBindings(bindings) { + return Object.entries(bindings).map(([name, value]) => ({ + name, + json: JSON.stringify(value) + })); +} +var EMAIL_PLUGIN = { + options: EmailOptionsSchema, + getBindings(options) { + if (!options.email?.send_email) { + return []; + } + const sendEmailBindings = options.email.send_email; + return sendEmailBindings.map(({ name }) => ({ + name, + service: { + entrypoint: "SendEmailBinding", + name: `${SERVICE_SEND_EMAIL_WORKER_PREFIX}:${name}` + } + })); + }, + getNodeBindings(_options) { + return {}; + }, + async getServices(args) { + const extensions = []; + const services = []; + if (args.workerIndex === 0) { + extensions.push({ + modules: [ + { + name: "cloudflare-internal:email", + esModule: email_worker_default(), + internal: true + } + ] + }); + } + for (const { name, ...config } of args.options.email?.send_email ?? []) { + services.push({ + name: `${SERVICE_SEND_EMAIL_WORKER_PREFIX}:${name}`, + worker: { + compatibilityDate: "2025-03-17", + modules: [ + { + name: "send_email.mjs", + esModule: send_email_worker_default() + } + ], + bindings: [ + ...buildJsonBindings(config), + WORKER_BINDING_SERVICE_LOOPBACK + ] + } + }); + } + return { + services, + extensions + }; + } +}; + +// src/plugins/hyperdrive/index.ts +var import_node_assert6 = __toESM(require("node:assert")); +var import_zod20 = require("zod"); +var HYPERDRIVE_PLUGIN_NAME = "hyperdrive"; +function hasPostgresProtocol(url27) { + return url27.protocol === "postgresql:" || url27.protocol === "postgres:"; +} +function hasMysqlProtocol(url27) { + return url27.protocol === "mysql:"; +} +function getPort(url27) { + if (url27.port !== "") return url27.port; + if (hasPostgresProtocol(url27)) return "5432"; + if (hasMysqlProtocol(url27)) return "3306"; + import_node_assert6.default.fail(`Expected known protocol, got ${url27.protocol}`); +} +var HyperdriveSchema = import_zod20.z.union([import_zod20.z.string().url(), import_zod20.z.instanceof(URL)]).transform((url27, ctx) => { + if (typeof url27 === "string") url27 = new URL(url27); + if (url27.protocol === "") { + ctx.addIssue({ + code: import_zod20.z.ZodIssueCode.custom, + message: "You must specify the database protocol - e.g. 'postgresql'/'mysql'." + }); + } else if (!hasPostgresProtocol(url27) && !hasMysqlProtocol(url27)) { + ctx.addIssue({ + code: import_zod20.z.ZodIssueCode.custom, + message: "Only PostgreSQL-compatible or MySQL-compatible databases are currently supported." + }); + } + if (url27.host === "") { + ctx.addIssue({ + code: import_zod20.z.ZodIssueCode.custom, + message: "You must provide a hostname or IP address in your connection string - e.g. 'user:password@database-hostname.example.com:5432/databasename" + }); + } + if (url27.pathname === "") { + ctx.addIssue({ + code: import_zod20.z.ZodIssueCode.custom, + message: "You must provide a database name as the path component - e.g. /postgres" + }); + } + if (url27.username === "") { + ctx.addIssue({ + code: import_zod20.z.ZodIssueCode.custom, + message: "You must provide a username - e.g. 'user:password@database.example.com:port/databasename'" + }); + } + if (url27.password === "") { + ctx.addIssue({ + code: import_zod20.z.ZodIssueCode.custom, + message: "You must provide a password - e.g. 'user:password@database.example.com:port/databasename' " + }); + } + return url27; +}); +var HyperdriveInputOptionsSchema = import_zod20.z.object({ + hyperdrives: import_zod20.z.record(import_zod20.z.string(), HyperdriveSchema).optional() +}); +var HYPERDRIVE_PLUGIN = { + options: HyperdriveInputOptionsSchema, + getBindings(options) { + return Object.entries(options.hyperdrives ?? {}).map( + ([name, url27]) => { + const database = url27.pathname.replace("/", ""); + const scheme = url27.protocol.replace(":", ""); + return { + name, + hyperdrive: { + designator: { + name: `${HYPERDRIVE_PLUGIN_NAME}:${name}` + }, + database: decodeURIComponent(database), + user: decodeURIComponent(url27.username), + password: decodeURIComponent(url27.password), + scheme + } + }; + } + ); + }, + getNodeBindings(options) { + return Object.fromEntries( + Object.entries(options.hyperdrives ?? {}).map(([name, url27]) => { + const connectionOverrides = { + connectionString: `${url27}`, + port: Number.parseInt(url27.port), + host: url27.hostname + }; + const proxyNodeBinding = new ProxyNodeBinding({ + get(target, prop) { + return prop in connectionOverrides ? connectionOverrides[prop] : target[prop]; + } + }); + return [name, proxyNodeBinding]; + }) + ); + }, + async getServices({ options }) { + return Object.entries(options.hyperdrives ?? {}).map( + ([name, url27]) => ({ + name: `${HYPERDRIVE_PLUGIN_NAME}:${name}`, + external: { + address: `${url27.hostname}:${getPort(url27)}`, + tcp: {} + } + }) + ); + } +}; + +// src/plugins/images/index.ts +var import_zod21 = require("zod"); +var IMAGES_LOCAL_FETCHER = ( + /* javascript */ + ` + export default { + fetch(req, env) { + const request = new Request(req); + request.headers.set("${CoreHeaders.CUSTOM_SERVICE}", "${CoreBindings.IMAGES_SERVICE}"); + request.headers.set("${CoreHeaders.ORIGINAL_URL}", request.url); + return env.${CoreBindings.SERVICE_LOOPBACK}.fetch(request) + } + } +` +); +var ImagesSchema = import_zod21.z.object({ + binding: import_zod21.z.string(), + mixedModeConnectionString: import_zod21.z.custom().optional() +}); +var ImagesOptionsSchema = import_zod21.z.object({ + images: ImagesSchema.optional() +}); +var IMAGES_PLUGIN_NAME = "images"; +var IMAGES_PLUGIN = { + options: ImagesOptionsSchema, + async getBindings(options) { + if (!options.images) { + return []; + } + return [ + { + name: options.images.binding, + wrapped: { + moduleName: "cloudflare-internal:images-api", + innerBindings: [ + { + name: "fetcher", + service: { + name: `${IMAGES_PLUGIN_NAME}:${options.images.binding}` + } + } + ] + } + } + ]; + }, + getNodeBindings(options) { + if (!options.images) { + return {}; + } + return { + [options.images.binding]: new ProxyNodeBinding() + }; + }, + async getServices({ options }) { + if (!options.images) { + return []; + } + return [ + { + name: `${IMAGES_PLUGIN_NAME}:${options.images.binding}`, + worker: options.images.mixedModeConnectionString ? mixedModeClientWorker( + options.images.mixedModeConnectionString, + options.images.binding + ) : { + modules: [ + { + name: "index.worker.js", + esModule: IMAGES_LOCAL_FETCHER + } + ], + compatibilityDate: "2025-04-01", + bindings: [WORKER_BINDING_SERVICE_LOOPBACK] + } + } + ]; + } +}; + +// src/plugins/kv/index.ts +var import_promises10 = __toESM(require("fs/promises")); + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/kv/namespace.worker.ts +var import_fs23 = __toESM(require("fs")); +var import_path26 = __toESM(require("path")); +var import_url23 = __toESM(require("url")); +var contents19; +function namespace_worker_default() { + if (contents19 !== void 0) return contents19; + const filePath = import_path26.default.join(__dirname, "workers", "kv/namespace.worker.js"); + contents19 = import_fs23.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url23.default.pathToFileURL(filePath); + return contents19; +} + +// src/plugins/kv/index.ts +var import_zod22 = require("zod"); + +// src/plugins/kv/constants.ts +var KV_PLUGIN_NAME = "kv"; + +// src/plugins/kv/sites.ts +var import_assert11 = __toESM(require("assert")); +var import_promises9 = __toESM(require("fs/promises")); +var import_path28 = __toESM(require("path")); + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/kv/sites.worker.ts +var import_fs24 = __toESM(require("fs")); +var import_path27 = __toESM(require("path")); +var import_url24 = __toESM(require("url")); +var contents20; +function sites_worker_default() { + if (contents20 !== void 0) return contents20; + const filePath = import_path27.default.join(__dirname, "workers", "kv/sites.worker.js"); + contents20 = import_fs24.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url24.default.pathToFileURL(filePath); + return contents20; +} + +// src/plugins/kv/sites.ts +async function* listKeysInDirectoryInner(rootPath2, currentPath) { + const fileEntries = await import_promises9.default.readdir(currentPath, { withFileTypes: true }); + for (const fileEntry of fileEntries) { + const filePath = import_path28.default.posix.join(currentPath, fileEntry.name); + if (fileEntry.isDirectory()) { + yield* listKeysInDirectoryInner(rootPath2, filePath); + } else { + yield filePath.substring(rootPath2.length + 1); + } + } +} +function listKeysInDirectory(rootPath2) { + rootPath2 = import_path28.default.resolve(rootPath2); + return listKeysInDirectoryInner(rootPath2, rootPath2); +} +var sitesRegExpsCache = /* @__PURE__ */ new WeakMap(); +var SERVICE_NAMESPACE_SITE = `${KV_PLUGIN_NAME}:site`; +async function buildStaticContentManifest(sitePath, siteRegExps) { + const staticContentManifest = {}; + for await (const key of listKeysInDirectory(sitePath)) { + if (testSiteRegExps(siteRegExps, key)) { + staticContentManifest[key] = encodeSitesKey(key); + } + } + return staticContentManifest; +} +async function getSitesBindings(options) { + const siteRegExps = { + include: options.siteInclude && globsToRegExps(options.siteInclude), + exclude: options.siteExclude && globsToRegExps(options.siteExclude) + }; + sitesRegExpsCache.set(options, siteRegExps); + const __STATIC_CONTENT_MANIFEST = await buildStaticContentManifest( + options.sitePath, + siteRegExps + ); + return [ + { + name: SiteBindings.KV_NAMESPACE_SITE, + kvNamespace: { name: SERVICE_NAMESPACE_SITE } + }, + { + name: SiteBindings.JSON_SITE_MANIFEST, + json: JSON.stringify(__STATIC_CONTENT_MANIFEST) + } + ]; +} +async function getSitesNodeBindings(options) { + const siteRegExps = sitesRegExpsCache.get(options); + (0, import_assert11.default)(siteRegExps !== void 0); + const __STATIC_CONTENT_MANIFEST = await buildStaticContentManifest( + options.sitePath, + siteRegExps + ); + return { + [SiteBindings.KV_NAMESPACE_SITE]: new ProxyNodeBinding(), + [SiteBindings.JSON_SITE_MANIFEST]: __STATIC_CONTENT_MANIFEST + }; +} +function getSitesServices(options) { + const siteRegExps = sitesRegExpsCache.get(options); + (0, import_assert11.default)(siteRegExps !== void 0); + const serialisedSiteRegExps = serialiseSiteRegExps(siteRegExps); + const persist = import_path28.default.resolve(options.sitePath); + const storageServiceName = `${SERVICE_NAMESPACE_SITE}:storage`; + const storageService = { + name: storageServiceName, + disk: { path: persist, writable: true } + }; + const namespaceService = { + name: SERVICE_NAMESPACE_SITE, + worker: { + compatibilityDate: "2023-07-24", + compatibilityFlags: ["nodejs_compat"], + modules: [ + { + name: "site.worker.js", + esModule: sites_worker_default() + } + ], + bindings: [ + { + name: SharedBindings.MAYBE_SERVICE_BLOBS, + service: { name: storageServiceName } + }, + { + name: SiteBindings.JSON_SITE_FILTER, + json: JSON.stringify(serialisedSiteRegExps) + } + ] + } + }; + return [storageService, namespaceService]; +} + +// src/plugins/kv/index.ts +var KVOptionsSchema = import_zod22.z.object({ + kvNamespaces: import_zod22.z.union([ + import_zod22.z.record(import_zod22.z.string()), + import_zod22.z.record( + import_zod22.z.object({ + id: import_zod22.z.string(), + mixedModeConnectionString: import_zod22.z.custom().optional() + }) + ), + import_zod22.z.string().array() + ]).optional(), + // Workers Sites + sitePath: PathSchema.optional(), + siteInclude: import_zod22.z.string().array().optional(), + siteExclude: import_zod22.z.string().array().optional() +}); +var KVSharedOptionsSchema = import_zod22.z.object({ + kvPersist: PersistenceSchema +}); +var SERVICE_NAMESPACE_PREFIX = `${KV_PLUGIN_NAME}:ns`; +var KV_STORAGE_SERVICE_NAME = `${KV_PLUGIN_NAME}:storage`; +var KV_NAMESPACE_OBJECT_CLASS_NAME = "KVNamespaceObject"; +var KV_NAMESPACE_OBJECT = { + serviceName: SERVICE_NAMESPACE_PREFIX, + className: KV_NAMESPACE_OBJECT_CLASS_NAME +}; +function isWorkersSitesEnabled(options) { + return options.sitePath !== void 0; +} +var KV_PLUGIN = { + options: KVOptionsSchema, + sharedOptions: KVSharedOptionsSchema, + async getBindings(options) { + const namespaces = namespaceEntries(options.kvNamespaces); + const bindings = namespaces.map(([name, { id }]) => ({ + name, + kvNamespace: { name: `${SERVICE_NAMESPACE_PREFIX}:${id}` } + })); + if (isWorkersSitesEnabled(options)) { + bindings.push(...await getSitesBindings(options)); + } + return bindings; + }, + async getNodeBindings(options) { + const namespaces = namespaceKeys(options.kvNamespaces); + const bindings = Object.fromEntries( + namespaces.map((name) => [name, new ProxyNodeBinding()]) + ); + if (isWorkersSitesEnabled(options)) { + Object.assign(bindings, await getSitesNodeBindings(options)); + } + return bindings; + }, + async getServices({ + options, + sharedOptions, + tmpPath, + log, + unsafeStickyBlobs + }) { + const persist = sharedOptions.kvPersist; + const namespaces = namespaceEntries(options.kvNamespaces); + const services = namespaces.map( + ([name, { id, mixedModeConnectionString }]) => ({ + name: `${SERVICE_NAMESPACE_PREFIX}:${id}`, + worker: mixedModeConnectionString ? mixedModeClientWorker(mixedModeConnectionString, name) : objectEntryWorker(KV_NAMESPACE_OBJECT, id) + }) + ); + if (services.length > 0) { + const uniqueKey = `miniflare-${KV_NAMESPACE_OBJECT_CLASS_NAME}`; + const persistPath = getPersistPath(KV_PLUGIN_NAME, tmpPath, persist); + await import_promises10.default.mkdir(persistPath, { recursive: true }); + const storageService = { + name: KV_STORAGE_SERVICE_NAME, + disk: { path: persistPath, writable: true } + }; + const objectService = { + name: SERVICE_NAMESPACE_PREFIX, + worker: { + compatibilityDate: "2023-07-24", + compatibilityFlags: ["nodejs_compat", "experimental"], + modules: [ + { + name: "namespace.worker.js", + esModule: namespace_worker_default() + } + ], + durableObjectNamespaces: [ + { className: KV_NAMESPACE_OBJECT_CLASS_NAME, uniqueKey } + ], + // Store Durable Object SQL databases in persist path + durableObjectStorage: { localDisk: KV_STORAGE_SERVICE_NAME }, + // Bind blob disk directory service to object + bindings: [ + { + name: SharedBindings.MAYBE_SERVICE_BLOBS, + service: { name: KV_STORAGE_SERVICE_NAME } + }, + { + name: SharedBindings.MAYBE_SERVICE_LOOPBACK, + service: { name: SERVICE_LOOPBACK } + }, + ...getMiniflareObjectBindings(unsafeStickyBlobs) + ] + } + }; + services.push(storageService, objectService); + for (const namespace of namespaces) { + await migrateDatabase(log, uniqueKey, persistPath, namespace[1].id); + } + } + if (isWorkersSitesEnabled(options)) { + services.push(...getSitesServices(options)); + } + return services; + }, + getPersistPath({ kvPersist }, tmpPath) { + return getPersistPath(KV_PLUGIN_NAME, tmpPath, kvPersist); + } +}; + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/pipelines/pipeline.worker.ts +var import_fs25 = __toESM(require("fs")); +var import_path29 = __toESM(require("path")); +var import_url25 = __toESM(require("url")); +var contents21; +function pipeline_worker_default() { + if (contents21 !== void 0) return contents21; + const filePath = import_path29.default.join(__dirname, "workers", "pipelines/pipeline.worker.js"); + contents21 = import_fs25.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url25.default.pathToFileURL(filePath); + return contents21; +} + +// src/plugins/pipelines/index.ts +var import_zod23 = require("zod"); +var PipelineOptionsSchema = import_zod23.z.object({ + pipelines: import_zod23.z.union([import_zod23.z.record(import_zod23.z.string()), import_zod23.z.string().array()]).optional() +}); +var PIPELINES_PLUGIN_NAME = "pipelines"; +var SERVICE_PIPELINE_PREFIX = `${PIPELINES_PLUGIN_NAME}:pipeline`; +var PIPELINE_PLUGIN = { + options: PipelineOptionsSchema, + getBindings(options) { + const pipelines = bindingEntries(options.pipelines); + return pipelines.map(([name, id]) => ({ + name, + service: { name: `${SERVICE_PIPELINE_PREFIX}:${id}` } + })); + }, + getNodeBindings(options) { + const buckets = namespaceKeys(options.pipelines); + return Object.fromEntries( + buckets.map((name) => [name, new ProxyNodeBinding()]) + ); + }, + async getServices({ options }) { + const pipelines = bindingEntries(options.pipelines); + const services = []; + for (const pipeline of pipelines) { + services.push({ + name: `${SERVICE_PIPELINE_PREFIX}:${pipeline[1]}`, + worker: { + compatibilityDate: "2024-12-30", + modules: [ + { + name: "pipeline.worker.js", + esModule: pipeline_worker_default() + } + ] + } + }); + } + return services; + } +}; +function bindingEntries(namespaces) { + if (Array.isArray(namespaces)) { + return namespaces.map((bindingName) => [bindingName, bindingName]); + } else if (namespaces !== void 0) { + return Object.entries(namespaces).map(([name, opts]) => [ + name, + typeof opts === "string" ? opts : opts.pipelineName + ]); + } else { + return []; + } +} + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/queues/broker.worker.ts +var import_fs26 = __toESM(require("fs")); +var import_path30 = __toESM(require("path")); +var import_url26 = __toESM(require("url")); +var contents22; +function broker_worker_default() { + if (contents22 !== void 0) return contents22; + const filePath = import_path30.default.join(__dirname, "workers", "queues/broker.worker.js"); + contents22 = import_fs26.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url26.default.pathToFileURL(filePath); + return contents22; +} + +// src/plugins/queues/index.ts +var import_zod24 = require("zod"); + +// src/plugins/queues/errors.ts +var QueuesError = class extends MiniflareError { +}; + +// src/plugins/queues/index.ts +var QueuesOptionsSchema = import_zod24.z.object({ + queueProducers: import_zod24.z.union([ + import_zod24.z.record( + QueueProducerOptionsSchema.merge( + import_zod24.z.object({ + mixedModeConnectionString: import_zod24.z.custom().optional() + }) + ) + ), + import_zod24.z.string().array(), + import_zod24.z.record(import_zod24.z.string()) + ]).optional(), + queueConsumers: import_zod24.z.union([import_zod24.z.record(QueueConsumerOptionsSchema), import_zod24.z.string().array()]).optional() +}); +var QUEUES_PLUGIN_NAME = "queues"; +var SERVICE_QUEUE_PREFIX = `${QUEUES_PLUGIN_NAME}:queue`; +var QUEUE_BROKER_OBJECT_CLASS_NAME = "QueueBrokerObject"; +var QUEUE_BROKER_OBJECT = { + serviceName: SERVICE_QUEUE_PREFIX, + className: QUEUE_BROKER_OBJECT_CLASS_NAME +}; +var QUEUES_PLUGIN = { + options: QueuesOptionsSchema, + getBindings(options) { + const queues = bindingEntries2(options.queueProducers); + return queues.map(([name, id]) => ({ + name, + queue: { name: `${SERVICE_QUEUE_PREFIX}:${id}` } + })); + }, + getNodeBindings(options) { + const queues = bindingKeys(options.queueProducers); + return Object.fromEntries( + queues.map((name) => [name, new ProxyNodeBinding()]) + ); + }, + async getServices({ + options, + workerNames, + queueProducers: allQueueProducers, + queueConsumers: allQueueConsumers, + unsafeStickyBlobs + }) { + const queues = bindingEntries2(options.queueProducers); + if (queues.length === 0) return []; + const services = queues.map(([_, id]) => ({ + name: `${SERVICE_QUEUE_PREFIX}:${id}`, + worker: objectEntryWorker(QUEUE_BROKER_OBJECT, id) + })); + const uniqueKey = `miniflare-${QUEUE_BROKER_OBJECT_CLASS_NAME}`; + const objectService = { + name: SERVICE_QUEUE_PREFIX, + worker: { + compatibilityDate: "2023-07-24", + compatibilityFlags: [ + "nodejs_compat", + "experimental", + "service_binding_extra_handlers" + ], + modules: [ + { name: "broker.worker.js", esModule: broker_worker_default() } + ], + durableObjectNamespaces: [ + { + className: QUEUE_BROKER_OBJECT_CLASS_NAME, + uniqueKey, + preventEviction: true + } + ], + // Miniflare's Queue broker is in-memory only at the moment + durableObjectStorage: { inMemory: kVoid }, + bindings: [ + { + name: SharedBindings.MAYBE_SERVICE_LOOPBACK, + service: { name: SERVICE_LOOPBACK } + }, + ...getMiniflareObjectBindings(unsafeStickyBlobs), + { + name: SharedBindings.DURABLE_OBJECT_NAMESPACE_OBJECT, + durableObjectNamespace: { + className: QUEUE_BROKER_OBJECT_CLASS_NAME + } + }, + { + name: QueueBindings.MAYBE_JSON_QUEUE_PRODUCERS, + json: JSON.stringify(Object.fromEntries(allQueueProducers)) + }, + { + name: QueueBindings.MAYBE_JSON_QUEUE_CONSUMERS, + json: JSON.stringify(Object.fromEntries(allQueueConsumers)) + }, + ...workerNames.map((name) => ({ + name: QueueBindings.SERVICE_WORKER_PREFIX + name, + service: { name: getUserServiceName(name) } + })) + ] + } + }; + services.push(objectService); + return services; + } +}; +function bindingEntries2(namespaces) { + if (Array.isArray(namespaces)) { + return namespaces.map((bindingName) => [bindingName, bindingName]); + } else if (namespaces !== void 0) { + return Object.entries(namespaces).map(([name, opts]) => [ + name, + typeof opts === "string" ? opts : opts.queueName + ]); + } else { + return []; + } +} +function bindingKeys(namespaces) { + if (Array.isArray(namespaces)) { + return namespaces; + } else if (namespaces !== void 0) { + return Object.keys(namespaces); + } else { + return []; + } +} + +// src/plugins/r2/index.ts +var import_promises11 = __toESM(require("fs/promises")); + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/r2/bucket.worker.ts +var import_fs27 = __toESM(require("fs")); +var import_path31 = __toESM(require("path")); +var import_url27 = __toESM(require("url")); +var contents23; +function bucket_worker_default() { + if (contents23 !== void 0) return contents23; + const filePath = import_path31.default.join(__dirname, "workers", "r2/bucket.worker.js"); + contents23 = import_fs27.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url27.default.pathToFileURL(filePath); + return contents23; +} + +// src/plugins/r2/index.ts +var import_zod25 = require("zod"); +var R2OptionsSchema = import_zod25.z.object({ + r2Buckets: import_zod25.z.union([ + import_zod25.z.record(import_zod25.z.string()), + import_zod25.z.record( + import_zod25.z.object({ + id: import_zod25.z.string(), + mixedModeConnectionString: import_zod25.z.custom().optional() + }) + ), + import_zod25.z.string().array() + ]).optional() +}); +var R2SharedOptionsSchema = import_zod25.z.object({ + r2Persist: PersistenceSchema +}); +var R2_PLUGIN_NAME = "r2"; +var R2_STORAGE_SERVICE_NAME = `${R2_PLUGIN_NAME}:storage`; +var R2_BUCKET_SERVICE_PREFIX = `${R2_PLUGIN_NAME}:bucket`; +var R2_BUCKET_OBJECT_CLASS_NAME = "R2BucketObject"; +var R2_BUCKET_OBJECT = { + serviceName: R2_BUCKET_SERVICE_PREFIX, + className: R2_BUCKET_OBJECT_CLASS_NAME +}; +var R2_PLUGIN = { + options: R2OptionsSchema, + sharedOptions: R2SharedOptionsSchema, + getBindings(options) { + const buckets = namespaceEntries(options.r2Buckets); + return buckets.map(([name, { id }]) => ({ + name, + r2Bucket: { name: `${R2_BUCKET_SERVICE_PREFIX}:${id}` } + })); + }, + getNodeBindings(options) { + const buckets = namespaceKeys(options.r2Buckets); + return Object.fromEntries( + buckets.map((name) => [name, new ProxyNodeBinding()]) + ); + }, + async getServices({ + options, + sharedOptions, + tmpPath, + log, + unsafeStickyBlobs + }) { + const persist = sharedOptions.r2Persist; + const buckets = namespaceEntries(options.r2Buckets); + const services = buckets.map( + ([name, { id, mixedModeConnectionString }]) => ({ + name: `${R2_BUCKET_SERVICE_PREFIX}:${id}`, + worker: mixedModeConnectionString ? mixedModeClientWorker(mixedModeConnectionString, name) : objectEntryWorker(R2_BUCKET_OBJECT, id) + }) + ); + if (buckets.length > 0) { + const uniqueKey = `miniflare-${R2_BUCKET_OBJECT_CLASS_NAME}`; + const persistPath = getPersistPath(R2_PLUGIN_NAME, tmpPath, persist); + await import_promises11.default.mkdir(persistPath, { recursive: true }); + const storageService = { + name: R2_STORAGE_SERVICE_NAME, + disk: { path: persistPath, writable: true } + }; + const objectService = { + name: R2_BUCKET_SERVICE_PREFIX, + worker: { + compatibilityDate: "2023-07-24", + compatibilityFlags: ["nodejs_compat", "experimental"], + modules: [ + { + name: "bucket.worker.js", + esModule: bucket_worker_default() + } + ], + durableObjectNamespaces: [ + { + className: R2_BUCKET_OBJECT_CLASS_NAME, + uniqueKey + } + ], + // Store Durable Object SQL databases in persist path + durableObjectStorage: { localDisk: R2_STORAGE_SERVICE_NAME }, + // Bind blob disk directory service to object + bindings: [ + { + name: SharedBindings.MAYBE_SERVICE_BLOBS, + service: { name: R2_STORAGE_SERVICE_NAME } + }, + { + name: SharedBindings.MAYBE_SERVICE_LOOPBACK, + service: { name: SERVICE_LOOPBACK } + }, + ...getMiniflareObjectBindings(unsafeStickyBlobs) + ] + } + }; + services.push(storageService, objectService); + for (const bucket of buckets) { + await migrateDatabase(log, uniqueKey, persistPath, bucket[1].id); + } + } + return services; + }, + getPersistPath({ r2Persist }, tmpPath) { + return getPersistPath(R2_PLUGIN_NAME, tmpPath, r2Persist); + } +}; + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/ratelimit/ratelimit.worker.ts +var import_fs28 = __toESM(require("fs")); +var import_path32 = __toESM(require("path")); +var import_url28 = __toESM(require("url")); +var contents24; +function ratelimit_worker_default() { + if (contents24 !== void 0) return contents24; + const filePath = import_path32.default.join(__dirname, "workers", "ratelimit/ratelimit.worker.js"); + contents24 = import_fs28.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url28.default.pathToFileURL(filePath); + return contents24; +} + +// src/plugins/ratelimit/index.ts +var import_zod26 = require("zod"); +var PeriodType = /* @__PURE__ */ ((PeriodType2) => { + PeriodType2[PeriodType2["TENSECONDS"] = 10] = "TENSECONDS"; + PeriodType2[PeriodType2["MINUTE"] = 60] = "MINUTE"; + return PeriodType2; +})(PeriodType || {}); +var RatelimitConfigSchema = import_zod26.z.object({ + simple: import_zod26.z.object({ + limit: import_zod26.z.number().gt(0), + // may relax this to be any number in the future + period: import_zod26.z.nativeEnum(PeriodType).optional() + }) +}); +var RatelimitOptionsSchema = import_zod26.z.object({ + ratelimits: import_zod26.z.record(RatelimitConfigSchema).optional() +}); +var RATELIMIT_PLUGIN_NAME = "ratelimit"; +var SERVICE_RATELIMIT_PREFIX = `${RATELIMIT_PLUGIN_NAME}`; +var SERVICE_RATELIMIT_MODULE = `cloudflare-internal:${SERVICE_RATELIMIT_PREFIX}:module`; +function buildJsonBindings2(bindings) { + return Object.entries(bindings).map(([name, value]) => ({ + name, + json: JSON.stringify(value) + })); +} +var RATELIMIT_PLUGIN = { + options: RatelimitOptionsSchema, + getBindings(options) { + if (!options.ratelimits) { + return []; + } + const bindings = Object.entries(options.ratelimits).map( + ([name, config]) => ({ + name, + wrapped: { + moduleName: SERVICE_RATELIMIT_MODULE, + innerBindings: buildJsonBindings2({ + namespaceId: name, + limit: config.simple.limit, + period: config.simple.period + }) + } + }) + ); + return bindings; + }, + getNodeBindings(options) { + if (!options.ratelimits) { + return {}; + } + return Object.fromEntries( + Object.keys(options.ratelimits).map((name) => [ + name, + new ProxyNodeBinding() + ]) + ); + }, + async getServices({ options }) { + if (!options.ratelimits) { + return []; + } + return { + services: [], + extensions: [ + { + modules: [ + { + name: SERVICE_RATELIMIT_MODULE, + esModule: ratelimit_worker_default(), + internal: true + } + ] + } + ] + }; + } +}; + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/secrets-store/secret.worker.ts +var import_fs29 = __toESM(require("fs")); +var import_path33 = __toESM(require("path")); +var import_url29 = __toESM(require("url")); +var contents25; +function secret_worker_default() { + if (contents25 !== void 0) return contents25; + const filePath = import_path33.default.join(__dirname, "workers", "secrets-store/secret.worker.js"); + contents25 = import_fs29.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url29.default.pathToFileURL(filePath); + return contents25; +} + +// src/plugins/secret-store/index.ts +var import_zod27 = require("zod"); +var SecretsStoreSecretsSchema = import_zod27.z.record( + import_zod27.z.object({ + store_id: import_zod27.z.string(), + secret_name: import_zod27.z.string() + }) +); +var SecretsStoreSecretsOptionsSchema = import_zod27.z.object({ + secretsStoreSecrets: SecretsStoreSecretsSchema.optional() +}); +var SecretsStoreSecretsSharedOptionsSchema = import_zod27.z.object({ + secretsStorePersist: PersistenceSchema +}); +var SECRET_STORE_PLUGIN_NAME = "secrets-store"; +function getkvNamespacesOptions(secretsStoreSecrets) { + const storeIds = new Set( + Object.values(secretsStoreSecrets).map((store) => store.store_id) + ); + const storeIdKvNamespaceEntries = Array.from(storeIds).map((storeId) => [ + storeId, + `${SECRET_STORE_PLUGIN_NAME}:${storeId}` + ]); + return { + kvNamespaces: Object.fromEntries(storeIdKvNamespaceEntries) + }; +} +function isKvBinding(binding) { + return "kvNamespace" in binding; +} +var SECRET_STORE_PLUGIN = { + options: SecretsStoreSecretsOptionsSchema, + sharedOptions: SecretsStoreSecretsSharedOptionsSchema, + async getBindings(options) { + if (!options.secretsStoreSecrets) { + return []; + } + const bindings = Object.entries( + options.secretsStoreSecrets + ).map(([name, config]) => { + return { + name, + service: { + name: `${SECRET_STORE_PLUGIN_NAME}:${config.store_id}:${config.secret_name}`, + entrypoint: "SecretsStoreSecret" + } + }; + }); + return bindings; + }, + getNodeBindings(options) { + if (!options.secretsStoreSecrets) { + return {}; + } + return Object.fromEntries( + Object.keys(options.secretsStoreSecrets).map((name) => [ + name, + new ProxyNodeBinding() + ]) + ); + }, + async getServices({ options, sharedOptions, ...restOptions }) { + if (!options.secretsStoreSecrets) { + return []; + } + const kvServices = await KV_PLUGIN.getServices({ + options: getkvNamespacesOptions(options.secretsStoreSecrets), + sharedOptions: { + kvPersist: sharedOptions.secretsStorePersist + }, + ...restOptions + }); + const kvBindings = await KV_PLUGIN.getBindings( + getkvNamespacesOptions(options.secretsStoreSecrets), + restOptions.workerIndex + ); + if (!kvBindings || !kvBindings.every(isKvBinding)) { + throw new Error( + "Expected KV plugin to return bindings with kvNamespace defined" + ); + } + if (!Array.isArray(kvServices)) { + throw new Error("Expected KV plugin to return an array of services"); + } + return [ + ...kvServices, + ...Object.entries(options.secretsStoreSecrets).map( + ([_, config]) => { + return { + name: `${SECRET_STORE_PLUGIN_NAME}:${config.store_id}:${config.secret_name}`, + worker: { + compatibilityDate: "2025-01-01", + modules: [ + { + name: "secret.worker.js", + esModule: secret_worker_default() + } + ], + bindings: [ + { + name: "store", + kvNamespace: kvBindings.find( + // Look up the corresponding KV namespace for the store id + (binding) => binding.name === config.store_id + )?.kvNamespace + }, + { + name: "secret_name", + json: JSON.stringify(config.secret_name) + } + ] + } + }; + } + ) + ]; + } +}; + +// src/plugins/vectorize/index.ts +var import_node_assert7 = __toESM(require("node:assert")); +var import_zod28 = require("zod"); +var VectorizeSchema = import_zod28.z.object({ + index_name: import_zod28.z.string(), + mixedModeConnectionString: import_zod28.z.custom() +}); +var VectorizeOptionsSchema = import_zod28.z.object({ + vectorize: import_zod28.z.record(VectorizeSchema).optional() +}); +var VECTORIZE_PLUGIN_NAME = "vectorize"; +var VECTORIZE_PLUGIN = { + options: VectorizeOptionsSchema, + async getBindings(options) { + if (!options.vectorize) { + return []; + } + return Object.entries(options.vectorize).map( + ([name, { index_name, mixedModeConnectionString }]) => { + (0, import_node_assert7.default)(mixedModeConnectionString, "Vectorize only supports Mixed Mode"); + return { + name, + wrapped: { + moduleName: "cloudflare-internal:vectorize-api", + innerBindings: [ + { + name: "fetcher", + service: { name: `${VECTORIZE_PLUGIN_NAME}:${name}` } + }, + { + name: "indexId", + text: index_name + }, + { + name: "indexVersion", + text: "v2" + }, + { + name: "useNdJson", + json: true + } + ] + } + }; + } + ); + }, + getNodeBindings(options) { + if (!options.vectorize) { + return {}; + } + return Object.fromEntries( + Object.keys(options.vectorize).map((name) => [ + name, + new ProxyNodeBinding() + ]) + ); + }, + async getServices({ options }) { + if (!options.vectorize) { + return []; + } + return Object.entries(options.vectorize).map( + ([name, { mixedModeConnectionString }]) => ({ + name: `${VECTORIZE_PLUGIN_NAME}:${name}`, + worker: mixedModeClientWorker(mixedModeConnectionString, name) + }) + ); + } +}; + +// src/plugins/workflows/index.ts +var import_promises12 = __toESM(require("fs/promises")); + +// embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/workflows/binding.worker.ts +var import_fs30 = __toESM(require("fs")); +var import_path34 = __toESM(require("path")); +var import_url30 = __toESM(require("url")); +var contents26; +function binding_worker_default() { + if (contents26 !== void 0) return contents26; + const filePath = import_path34.default.join(__dirname, "workers", "workflows/binding.worker.js"); + contents26 = import_fs30.default.readFileSync(filePath, "utf8") + "//# sourceURL=" + import_url30.default.pathToFileURL(filePath); + return contents26; +} + +// src/plugins/workflows/index.ts +var import_zod29 = require("zod"); +var WorkflowsOptionsSchema = import_zod29.z.object({ + workflows: import_zod29.z.record( + import_zod29.z.object({ + name: import_zod29.z.string(), + className: import_zod29.z.string(), + scriptName: import_zod29.z.string().optional(), + mixedModeConnectionString: import_zod29.z.custom().optional() + }) + ).optional() +}); +var WorkflowsSharedOptionsSchema = import_zod29.z.object({ + workflowsPersist: PersistenceSchema +}); +var WORKFLOWS_PLUGIN_NAME = "workflows"; +var WORKFLOWS_STORAGE_SERVICE_NAME = `${WORKFLOWS_PLUGIN_NAME}:storage`; +var WORKFLOWS_PLUGIN = { + options: WorkflowsOptionsSchema, + sharedOptions: WorkflowsSharedOptionsSchema, + async getBindings(options) { + return Object.entries(options.workflows ?? {}).map( + ([bindingName, workflow]) => ({ + name: bindingName, + service: { + name: `${WORKFLOWS_PLUGIN_NAME}:${workflow.name}`, + entrypoint: "WorkflowBinding" + } + }) + ); + }, + async getNodeBindings(options) { + return Object.fromEntries( + Object.keys(options.workflows ?? {}).map((bindingName) => [ + bindingName, + new ProxyNodeBinding() + ]) + ); + }, + async getServices({ options, sharedOptions, tmpPath }) { + const persistPath = getPersistPath( + WORKFLOWS_PLUGIN_NAME, + tmpPath, + sharedOptions.workflowsPersist + ); + await import_promises12.default.mkdir(persistPath, { recursive: true }); + const storageServices = Object.entries( + options.workflows ?? {} + ).map(([_, workflow]) => ({ + name: `${WORKFLOWS_STORAGE_SERVICE_NAME}-${workflow.name}`, + disk: { path: persistPath, writable: true } + })); + const services = Object.entries(options.workflows ?? {}).map( + ([_bindingName, workflow]) => { + const uniqueKey = `miniflare-workflows-${workflow.name}`; + const workflowsBinding = { + name: `${WORKFLOWS_PLUGIN_NAME}:${workflow.name}`, + worker: { + compatibilityDate: "2024-10-22", + modules: [ + { + name: "workflows.mjs", + esModule: binding_worker_default() + } + ], + durableObjectNamespaces: [ + { + className: "Engine", + enableSql: true, + uniqueKey, + preventEviction: true + } + ], + durableObjectStorage: { + localDisk: `${WORKFLOWS_STORAGE_SERVICE_NAME}-${workflow.name}` + }, + bindings: [ + { + name: "ENGINE", + durableObjectNamespace: { className: "Engine" } + }, + { + name: "USER_WORKFLOW", + service: { + name: getUserServiceName(workflow.scriptName), + entrypoint: workflow.className + } + } + ] + } + }; + return workflowsBinding; + } + ); + if (services.length === 0) { + return []; + } + return [...storageServices, ...services]; + }, + getPersistPath({ workflowsPersist }, tmpPath) { + return getPersistPath(WORKFLOWS_PLUGIN_NAME, tmpPath, workflowsPersist); + } +}; + +// src/plugins/index.ts +var PLUGINS = { + [CORE_PLUGIN_NAME2]: CORE_PLUGIN, + [CACHE_PLUGIN_NAME]: CACHE_PLUGIN, + [D1_PLUGIN_NAME]: D1_PLUGIN, + [DURABLE_OBJECTS_PLUGIN_NAME]: DURABLE_OBJECTS_PLUGIN, + [KV_PLUGIN_NAME]: KV_PLUGIN, + [QUEUES_PLUGIN_NAME]: QUEUES_PLUGIN, + [R2_PLUGIN_NAME]: R2_PLUGIN, + [HYPERDRIVE_PLUGIN_NAME]: HYPERDRIVE_PLUGIN, + [RATELIMIT_PLUGIN_NAME]: RATELIMIT_PLUGIN, + [ASSETS_PLUGIN_NAME]: ASSETS_PLUGIN, + [WORKFLOWS_PLUGIN_NAME]: WORKFLOWS_PLUGIN, + [PIPELINES_PLUGIN_NAME]: PIPELINE_PLUGIN, + [SECRET_STORE_PLUGIN_NAME]: SECRET_STORE_PLUGIN, + [EMAIL_PLUGIN_NAME]: EMAIL_PLUGIN, + [ANALYTICS_ENGINE_PLUGIN_NAME]: ANALYTICS_ENGINE_PLUGIN, + [AI_PLUGIN_NAME]: AI_PLUGIN, + [BROWSER_RENDERING_PLUGIN_NAME]: BROWSER_RENDERING_PLUGIN, + [DISPATCH_NAMESPACE_PLUGIN_NAME]: DISPATCH_NAMESPACE_PLUGIN, + [IMAGES_PLUGIN_NAME]: IMAGES_PLUGIN, + [VECTORIZE_PLUGIN_NAME]: VECTORIZE_PLUGIN +}; +var PLUGIN_ENTRIES = Object.entries(PLUGINS); + +// src/plugins/core/inspector-proxy/inspector-proxy-controller.ts +var import_node_crypto2 = __toESM(require("node:crypto")); +var import_node_http = require("node:http"); + +// ../../node_modules/.pnpm/get-port@7.1.0/node_modules/get-port/index.js +var import_node_net = __toESM(require("node:net"), 1); +var import_node_os = __toESM(require("node:os"), 1); +var Locked = class extends Error { + constructor(port) { + super(`${port} is locked`); + } +}; +var lockedPorts = { + old: /* @__PURE__ */ new Set(), + young: /* @__PURE__ */ new Set() +}; +var releaseOldLockedPortsIntervalMs = 1e3 * 15; +var timeout; +var getLocalHosts = () => { + const interfaces = import_node_os.default.networkInterfaces(); + const results = /* @__PURE__ */ new Set([void 0, "0.0.0.0"]); + for (const _interface of Object.values(interfaces)) { + for (const config of _interface) { + results.add(config.address); + } + } + return results; +}; +var checkAvailablePort = (options) => new Promise((resolve2, reject) => { + const server = import_node_net.default.createServer(); + server.unref(); + server.on("error", reject); + server.listen(options, () => { + const { port } = server.address(); + server.close(() => { + resolve2(port); + }); + }); +}); +var getAvailablePort = async (options, hosts) => { + if (options.host || options.port === 0) { + return checkAvailablePort(options); + } + for (const host of hosts) { + try { + await checkAvailablePort({ port: options.port, host }); + } catch (error) { + if (!["EADDRNOTAVAIL", "EINVAL"].includes(error.code)) { + throw error; + } + } + } + return options.port; +}; +var portCheckSequence = function* (ports) { + if (ports) { + yield* ports; + } + yield 0; +}; +async function getPorts(options) { + let ports; + let exclude = /* @__PURE__ */ new Set(); + if (options) { + if (options.port) { + ports = typeof options.port === "number" ? [options.port] : options.port; + } + if (options.exclude) { + const excludeIterable = options.exclude; + if (typeof excludeIterable[Symbol.iterator] !== "function") { + throw new TypeError("The `exclude` option must be an iterable."); + } + for (const element of excludeIterable) { + if (typeof element !== "number") { + throw new TypeError("Each item in the `exclude` option must be a number corresponding to the port you want excluded."); + } + if (!Number.isSafeInteger(element)) { + throw new TypeError(`Number ${element} in the exclude option is not a safe integer and can't be used`); + } + } + exclude = new Set(excludeIterable); + } + } + if (timeout === void 0) { + timeout = setTimeout(() => { + timeout = void 0; + lockedPorts.old = lockedPorts.young; + lockedPorts.young = /* @__PURE__ */ new Set(); + }, releaseOldLockedPortsIntervalMs); + if (timeout.unref) { + timeout.unref(); + } + } + const hosts = getLocalHosts(); + for (const port of portCheckSequence(ports)) { + try { + if (exclude.has(port)) { + continue; + } + let availablePort = await getAvailablePort({ ...options, port }, hosts); + while (lockedPorts.old.has(availablePort) || lockedPorts.young.has(availablePort)) { + if (port !== 0) { + throw new Locked(port); + } + availablePort = await getAvailablePort({ ...options, port }, hosts); + } + lockedPorts.young.add(availablePort); + return availablePort; + } catch (error) { + if (!["EADDRINUSE", "EACCES"].includes(error.code) && !(error instanceof Locked)) { + throw error; + } + } + } + throw new Error("No available ports found"); +} + +// src/plugins/core/inspector-proxy/inspector-proxy-controller.ts +var import_ws4 = __toESM(require("ws")); + +// package.json +var version = "4.20250508.3"; + +// src/plugins/core/inspector-proxy/inspector-proxy.ts +var import_node_assert8 = __toESM(require("node:assert")); +var import_ws3 = __toESM(require("ws")); + +// src/plugins/core/inspector-proxy/devtools.ts +function isDevToolsEvent(event, name) { + return typeof event === "object" && event !== null && "method" in event && event.method === name; +} + +// src/plugins/core/inspector-proxy/inspector-proxy.ts +var InspectorProxy = class { + #workerName; + #runtimeWs; + #devtoolsWs; + #devtoolsHaveFileSystemAccess = false; + constructor(workerName, runtimeWs) { + this.#workerName = workerName; + this.#runtimeWs = runtimeWs; + this.#runtimeWs.once("open", () => this.#handleRuntimeWebSocketOpen()); + } + get workerName() { + return this.#workerName; + } + get path() { + return `/${this.#workerName}`; + } + onDevtoolsConnected(devtoolsWs, devtoolsHaveFileSystemAccess) { + if (this.#devtoolsWs) { + devtoolsWs.close( + 1013, + "Too many clients; only one can be connected at a time" + ); + return; + } + this.#devtoolsWs = devtoolsWs; + this.#devtoolsHaveFileSystemAccess = devtoolsHaveFileSystemAccess; + (0, import_node_assert8.default)(this.#devtoolsWs?.readyState === import_ws3.default.OPEN); + this.#devtoolsWs.on("error", console.error); + this.#devtoolsWs.once("close", () => { + if (this.#runtimeWs?.OPEN) { + this.#sendMessageToRuntime({ + method: "Debugger.disable", + id: this.#nextCounter() + }); + } + this.#devtoolsWs = void 0; + }); + this.#devtoolsWs.on("message", (data) => { + const message = JSON.parse(data.toString()); + (0, import_node_assert8.default)(this.#runtimeWs?.OPEN); + this.#sendMessageToRuntime(message); + }); + } + #runtimeMessageCounter = 1e8; + #nextCounter() { + return ++this.#runtimeMessageCounter; + } + #runtimeKeepAliveInterval; + #handleRuntimeWebSocketOpen() { + (0, import_node_assert8.default)(this.#runtimeWs?.OPEN); + this.#runtimeWs.on("message", (data) => { + const message = JSON.parse(data.toString()); + if (!this.#devtoolsWs) { + return; + } + if (isDevToolsEvent(message, "Debugger.scriptParsed")) { + return this.#handleRuntimeScriptParsed(message); + } + return this.#sendMessageToDevtools(message); + }); + clearInterval(this.#runtimeKeepAliveInterval); + this.#runtimeKeepAliveInterval = setInterval(() => { + if (this.#runtimeWs?.OPEN) { + this.#sendMessageToRuntime({ + method: "Runtime.getIsolateId", + id: this.#nextCounter() + }); + } + }, 1e4); + } + #handleRuntimeScriptParsed(message) { + if (!this.#devtoolsHaveFileSystemAccess && message.params.sourceMapURL !== void 0 && // Don't try to find a sourcemap for e.g. node-internal: scripts + message.params.url.startsWith("file:")) { + const url27 = new URL(message.params.sourceMapURL, message.params.url); + if (url27.protocol === "file:") { + message.params.sourceMapURL = url27.href.replace( + "file:", + "wrangler-file:" + ); + } + } + return this.#sendMessageToDevtools(message); + } + #sendMessageToDevtools(message) { + (0, import_node_assert8.default)(this.#devtoolsWs); + if (!this.#devtoolsWs.OPEN) { + this.#devtoolsWs.once( + "open", + () => this.#devtoolsWs?.send(JSON.stringify(message)) + ); + return; + } + this.#devtoolsWs.send(JSON.stringify(message)); + } + #sendMessageToRuntime(message) { + (0, import_node_assert8.default)(this.#runtimeWs?.OPEN); + this.#runtimeWs.send(JSON.stringify(message)); + } + async dispose() { + clearInterval(this.#runtimeKeepAliveInterval); + this.#devtoolsWs?.close(); + } +}; + +// src/plugins/core/inspector-proxy/inspector-proxy-controller.ts +var InspectorProxyController = class { + constructor(inspectorPortOption, log, workerNamesToProxy) { + this.inspectorPortOption = inspectorPortOption; + this.log = log; + this.workerNamesToProxy = workerNamesToProxy; + this.#inspectorPort = this.#getInspectorPortToUse(); + this.#server = this.#initializeServer(); + this.#runtimeConnectionEstablished = new DeferredPromise(); + } + #runtimeConnectionEstablished; + #proxies = []; + #server; + #inspectorPort; + async #getInspectorPortToUse() { + return this.inspectorPortOption !== 0 ? this.inspectorPortOption : await getPorts(); + } + async #initializeServer() { + const server = (0, import_node_http.createServer)(async (req, res) => { + const maybeJson = await this.#handleDevToolsJsonRequest( + req.headers.host ?? "localhost", + req.url ?? "/" + ); + if (maybeJson !== null) { + res.setHeader("Content-Type", "application/json"); + res.end(JSON.stringify(maybeJson)); + return; + } + res.statusCode = 404; + res.end(null); + }); + this.#initializeWebSocketServer(server); + const listeningPromise = new Promise( + (resolve2) => server.once("listening", resolve2) + ); + server.listen(await this.#inspectorPort); + await listeningPromise; + return server; + } + async #restartServer() { + const server = await this.#server; + server.closeAllConnections(); + await new Promise((resolve2, reject) => { + server.close((err) => err ? reject(err) : resolve2()); + }); + const listeningPromise = new Promise( + (resolve2) => server.once("listening", resolve2) + ); + server.listen(await this.#inspectorPort); + await listeningPromise; + } + #initializeWebSocketServer(server) { + const devtoolsWebSocketServer = new import_ws4.WebSocketServer({ server }); + devtoolsWebSocketServer.on("connection", (devtoolsWs, upgradeRequest) => { + const validationError = this.#validateDevToolsWebSocketUpgradeRequest(upgradeRequest); + if (validationError !== null) { + devtoolsWs.close(); + return; + } + const proxy = this.#proxies.find( + ({ path: path37 }) => upgradeRequest.url === path37 + ); + if (!proxy) { + this.log.warn( + `Warning: An inspector connection was requested for the ${upgradeRequest.url} path but no such inspector exists` + ); + devtoolsWs.close(); + return; + } + proxy.onDevtoolsConnected( + devtoolsWs, + this.#checkIfDevtoolsHaveFileSystemAccess(upgradeRequest) + ); + }); + } + #validateDevToolsWebSocketUpgradeRequest(req) { + const hostHeader = req.headers.host; + if (hostHeader == null) return { statusText: null, status: 400 }; + try { + const host = new URL(`http://${hostHeader}`); + if (!ALLOWED_HOST_HOSTNAMES.includes(host.hostname)) { + return { statusText: "Disallowed `Host` header", status: 401 }; + } + } catch { + return { statusText: "Expected `Host` header", status: 400 }; + } + let originHeader = req.headers.origin; + if (!originHeader && !req.headers["user-agent"]) { + originHeader = "http://localhost"; + } + if (!originHeader) { + return { statusText: "Expected `Origin` header", status: 400 }; + } + try { + const origin = new URL(originHeader); + const allowed = ALLOWED_ORIGIN_HOSTNAMES.some((rule) => { + if (typeof rule === "string") return origin.hostname === rule; + else return rule.test(origin.hostname); + }); + if (!allowed) { + return { statusText: "Disallowed `Origin` header", status: 401 }; + } + } catch { + return { statusText: "Expected `Origin` header", status: 400 }; + } + return null; + } + #checkIfDevtoolsHaveFileSystemAccess(req) { + const userAgent = req.headers["user-agent"] ?? ""; + const hasFileSystemAccess = !/mozilla/i.test(userAgent); + return hasFileSystemAccess; + } + #inspectorId = import_node_crypto2.default.randomUUID(); + async #handleDevToolsJsonRequest(host, path37) { + if (path37 === "/json/version") { + return { + Browser: `miniflare/v${version}`, + // TODO: (someday): The DevTools protocol should match that of workerd. + // This could be exposed by the preview API. + "Protocol-Version": "1.3" + }; + } + if (path37 === "/json" || path37 === "/json/list") { + return this.#proxies.map(({ workerName }) => { + const localHost = `${host}/${workerName}`; + const devtoolsFrontendUrl = `https://devtools.devprod.cloudflare.dev/js_app?theme=systemPreferred&debugger=true&ws=${localHost}`; + return { + id: `${this.#inspectorId}-${workerName}`, + type: "node", + // TODO: can we specify different type? + description: "workers", + webSocketDebuggerUrl: `ws://${localHost}`, + devtoolsFrontendUrl, + devtoolsFrontendUrlCompat: devtoolsFrontendUrl, + // Below are fields that are visible in the DevTools UI. + title: workerName.length === 0 || this.#proxies.length === 1 ? `Cloudflare Worker` : `Cloudflare Worker: ${workerName}`, + faviconUrl: "https://workers.cloudflare.com/favicon.ico" + // url: "http://" + localHost, // looks unnecessary + }; + }); + } + return null; + } + async getInspectorURL() { + return getWebsocketURL(await this.#inspectorPort); + } + async updateConnection(inspectorPortOption, runtimeInspectorPort) { + if (this.inspectorPortOption !== inspectorPortOption) { + this.inspectorPortOption = inspectorPortOption; + this.#inspectorPort = this.#getInspectorPortToUse(); + await this.#restartServer(); + } + const workerdInspectorJson = await fetch( + `http://127.0.0.1:${runtimeInspectorPort}/json` + ).then((resp) => resp.json()); + this.#proxies = workerdInspectorJson.map(({ id }) => { + if (!id.startsWith("core:user:")) { + return; + } + const workerName = id.replace(/^core:user:/, ""); + if (!this.workerNamesToProxy.has(workerName)) { + return; + } + return new InspectorProxy( + workerName, + new import_ws4.default(`ws://127.0.0.1:${runtimeInspectorPort}/${id}`) + ); + }).filter(Boolean); + this.#runtimeConnectionEstablished.resolve(); + } + async #waitForReady() { + await this.#runtimeConnectionEstablished; + } + get ready() { + return this.#waitForReady(); + } + async dispose() { + await Promise.all(this.#proxies.map((proxy) => proxy.dispose())); + const server = await this.#server; + return new Promise((resolve2, reject) => { + server.close((err) => err ? reject(err) : resolve2()); + }); + } +}; +function getWebsocketURL(port) { + return new URL(`ws://127.0.0.1:${port}`); +} +var ALLOWED_HOST_HOSTNAMES = ["127.0.0.1", "[::1]", "localhost"]; +var ALLOWED_ORIGIN_HOSTNAMES = [ + "devtools.devprod.cloudflare.dev", + "cloudflare-devtools.pages.dev", + /^[a-z0-9]+\.cloudflare-devtools\.pages\.dev$/, + "127.0.0.1", + "[::1]", + "localhost" +]; + +// src/plugins/images/fetcher.ts +var import_buffer2 = require("buffer"); +function validateTransforms(inputTransforms) { + if (!Array.isArray(inputTransforms)) { + return null; + } + for (const transform of inputTransforms) { + for (const key of ["imageIndex", "rotate", "width", "height"]) { + if (transform[key] !== void 0 && typeof transform[key] != "number") { + return null; + } + } + } + return inputTransforms; +} +async function imagesLocalFetcher(request) { + let sharp; + try { + const { default: importedSharp } = await import("sharp"); + sharp = importedSharp; + } catch { + return errorResponse( + 503, + 9523, + "The Sharp library is not available, check your version of Node is compatible" + ); + } + const data = await request.formData(); + const body = data.get("image"); + if (!body || !(body instanceof import_buffer2.File)) { + return errorResponse( + 400, + 9523, + `ERROR: Internal Images binding error: expected image in request, got ${body}` + ); + } + const transformer = sharp(await body.arrayBuffer(), {}); + const url27 = new URL(request.url); + if (url27.pathname == "/info") { + return runInfo(transformer); + } else { + const badTransformsResponse = errorResponse( + 400, + 9523, + "ERROR: Internal Images binding error: Expected JSON array of valid transforms in transforms field" + ); + try { + const transformsJson = data.get("transforms"); + if (typeof transformsJson !== "string") { + return badTransformsResponse; + } + const transforms = validateTransforms(JSON.parse(transformsJson)); + if (transforms === null) { + return badTransformsResponse; + } + const outputFormat = data.get("output_format"); + if (outputFormat != null && typeof outputFormat !== "string") { + return errorResponse( + 400, + 9523, + "ERROR: Internal Images binding error: Expected output format to be a string if provided" + ); + } + return runTransform(transformer, transforms, outputFormat); + } catch (e) { + return badTransformsResponse; + } + } +} +async function runInfo(transformer) { + const metadata = await transformer.metadata(); + let mime = null; + switch (metadata.format) { + case "jpeg": + mime = "image/jpeg"; + break; + case "svg": + mime = "image/svg+xml"; + break; + case "png": + mime = "image/png"; + break; + case "webp": + mime = "image/webp"; + break; + case "gif": + mime = "image/gif"; + break; + case "avif": + mime = "image/avif"; + break; + default: + return errorResponse( + 415, + 9520, + `ERROR: Unsupported image type ${metadata.format}, expected one of: JPEG, SVG, PNG, WebP, GIF or AVIF` + ); + } + let resp; + if (mime == "image/svg+xml") { + resp = { + format: mime + }; + } else { + if (!metadata.size || !metadata.width || !metadata.height) { + return errorResponse( + 500, + 9523, + "ERROR: Internal Images binding error: Expected size, width and height for bitmap input" + ); + } + resp = { + format: mime, + fileSize: metadata.size, + width: metadata.width, + height: metadata.height + }; + } + return Response.json(resp); +} +async function runTransform(transformer, transforms, outputFormat) { + for (const transform of transforms) { + if (transform.imageIndex !== void 0 && transform.imageIndex !== 0) { + continue; + } + if (transform.rotate !== void 0) { + transformer.rotate(transform.rotate); + } + if (transform.width !== void 0 || transform.height !== void 0) { + transformer.resize(transform.width || null, transform.height || null, { + fit: "contain" + }); + } + } + switch (outputFormat) { + case "image/avif": + transformer.avif(); + break; + case "image/gif": + return errorResponse( + 415, + 9520, + "ERROR: GIF output is not supported in local mode" + ); + case "image/jpeg": + transformer.jpeg(); + break; + case "image/png": + transformer.png(); + break; + case "image/webp": + transformer.webp(); + break; + case "rgb": + case "rgba": + return errorResponse( + 415, + 9520, + "ERROR: RGB/RGBA output is not supported in local mode" + ); + default: + outputFormat = "image/jpeg"; + break; + } + return new Response(transformer, { + headers: { + "content-type": outputFormat + } + }); +} +function errorResponse(status, code, message) { + return new Response(`ERROR ${code}: ${message}`, { + status, + headers: { + "content-type": "text/plain", + "cf-images-binding": `err=${code}` + } + }); +} + +// src/shared/mime-types.ts +var compressedByCloudflareFL = /* @__PURE__ */ new Set([ + // list copied from https://developers.cloudflare.com/speed/optimization/content/brotli/content-compression/#:~:text=If%20supported%20by%20visitors%E2%80%99%20web%20browsers%2C%20Cloudflare%20will%20return%20Gzip%20or%20Brotli%2Dencoded%20responses%20for%20the%20following%20content%20types%3A + "text/html", + "text/richtext", + "text/plain", + "text/css", + "text/x-script", + "text/x-component", + "text/x-java-source", + "text/x-markdown", + "application/javascript", + "application/x-javascript", + "text/javascript", + "text/js", + "image/x-icon", + "image/vnd.microsoft.icon", + "application/x-perl", + "application/x-httpd-cgi", + "text/xml", + "application/xml", + "application/rss+xml", + "application/vnd.api+json", + "application/x-protobuf", + "application/json", + "multipart/bag", + "multipart/mixed", + "application/xhtml+xml", + "font/ttf", + "font/otf", + "font/x-woff", + "image/svg+xml", + "application/vnd.ms-fontobject", + "application/ttf", + "application/x-ttf", + "application/otf", + "application/x-otf", + "application/truetype", + "application/opentype", + "application/x-opentype", + "application/font-woff", + "application/eot", + "application/font", + "application/font-sfnt", + "application/wasm", + "application/javascript-binast", + "application/manifest+json", + "application/ld+json", + "application/graphql+json", + "application/geo+json" +]); +function isCompressedByCloudflareFL(contentTypeHeader) { + if (!contentTypeHeader) return true; + const [contentType] = contentTypeHeader.split(";"); + return compressedByCloudflareFL.has(contentType); +} + +// src/workers/secrets-store/constants.ts +var ADMIN_API = "SecretsStoreSecret::admin_api"; + +// src/zod-format.ts +var import_assert12 = __toESM(require("assert")); +var import_util4 = __toESM(require("util")); +var kMessages = Symbol("kMessages"); +var kActual = Symbol("kActual"); +var kGroupId = Symbol("kGroupId"); +var groupColours = [ + yellow, + /* (green) */ + cyan, + blue, + magenta, + green +]; +var GroupCountsMap = Map; +function isAnnotation(value) { + return typeof value === "object" && value !== null && kMessages in value && kActual in value; +} +function isRecord(value) { + return typeof value === "object" && value !== null; +} +function arrayShallowEqual(a, b) { + if (a.length !== b.length) return false; + for (let i = 0; i < a.length; i++) if (a[i] !== b[i]) return false; + return true; +} +function issueEqual(a, b) { + return a.message === b.message && arrayShallowEqual(a.path, b.path); +} +function hasMultipleDistinctMessages(issues, atDepth) { + let firstIssue; + for (const issue of issues) { + if (issue.path.length < atDepth) continue; + if (firstIssue === void 0) firstIssue = issue; + else if (!issueEqual(firstIssue, issue)) return true; + } + return false; +} +function annotate(groupCounts, annotated, input, issue, path37, groupId) { + if (path37.length === 0) { + if (issue.code === "invalid_union") { + const unionIssues = issue.unionErrors.flatMap(({ issues }) => issues); + let newGroupId; + const multipleDistinct = hasMultipleDistinctMessages( + unionIssues, + // For this check, we only include messages that are deeper than our + // current level, so we don't include messages we'd ignore if we grouped + issue.path.length + 1 + ); + if (isRecord(input) && multipleDistinct) { + newGroupId = groupCounts.size; + groupCounts.set(newGroupId, 0); + } + for (const unionIssue of unionIssues) { + const unionPath = unionIssue.path.slice(issue.path.length); + if (multipleDistinct && unionPath.length === 0) continue; + annotated = annotate( + groupCounts, + annotated, + input, + unionIssue, + unionPath, + newGroupId + ); + } + return annotated; + } + const message = issue.message; + if (annotated !== void 0) { + if (isAnnotation(annotated) && !annotated[kMessages].includes(message)) { + annotated[kMessages].push(message); + } + return annotated; + } + if (groupId !== void 0) { + const current = groupCounts.get(groupId); + (0, import_assert12.default)(current !== void 0); + groupCounts.set(groupId, current + 1); + } + return { + [kMessages]: [message], + [kActual]: input, + [kGroupId]: groupId + }; + } + const [head, ...tail] = path37; + (0, import_assert12.default)(isRecord(input), "Expected object/array input for nested issue"); + if (annotated === void 0) { + if (Array.isArray(input)) { + annotated = new Array(input.length); + } else { + const entries = Object.keys(input).map((key) => [key, void 0]); + annotated = Object.fromEntries(entries); + } + } + (0, import_assert12.default)(isRecord(annotated), "Expected object/array for nested issue"); + annotated[head] = annotate( + groupCounts, + annotated[head], + input[head], + issue, + tail, + groupId + ); + return annotated; +} +function print(inspectOptions, groupCounts, annotated, indent = "", extras) { + const prefix = extras?.prefix ?? ""; + const suffix = extras?.suffix ?? ""; + if (isAnnotation(annotated)) { + const prefixIndent = indent + " ".repeat(prefix.length); + const actual = import_util4.default.inspect(annotated[kActual], inspectOptions); + const actualIndented = actual.split("\n").map((line, i) => i > 0 ? prefixIndent + line : line).join("\n"); + let messageColour = red; + let messagePrefix = prefixIndent + "^"; + let groupOr = ""; + if (annotated[kGroupId] !== void 0) { + messageColour = groupColours[annotated[kGroupId] % groupColours.length]; + messagePrefix += annotated[kGroupId] + 1; + const remaining = groupCounts.get(annotated[kGroupId]); + (0, import_assert12.default)(remaining !== void 0); + if (remaining > 1) groupOr = " *or*"; + groupCounts.set(annotated[kGroupId], remaining - 1); + } + messagePrefix += " "; + const messageIndent = " ".repeat(messagePrefix.length); + const messageIndented = annotated[kMessages].flatMap((m) => m.split("\n")).map((line, i) => i > 0 ? messageIndent + line : line).join("\n"); + const error = messageColour(`${messagePrefix}${messageIndented}${groupOr}`); + return `${indent}${dim(prefix)}${actualIndented}${dim(suffix)} +${error}`; + } else if (Array.isArray(annotated)) { + let result = `${indent}${dim(`${prefix}[`)} +`; + const arrayIndent = indent + " "; + for (let i = 0; i < annotated.length; i++) { + const value = annotated[i]; + if (value === void 0 && (i === 0 || annotated[i - 1] !== void 0)) { + result += `${arrayIndent}${dim("...,")} +`; + } + if (value !== void 0) { + result += print(inspectOptions, groupCounts, value, arrayIndent, { + prefix: `/* [${i}] */ `, + suffix: "," + }); + result += "\n"; + } + } + result += `${indent}${dim(`]${suffix}`)}`; + return result; + } else if (isRecord(annotated)) { + let result = `${indent}${dim(`${prefix}{`)} +`; + const objectIndent = indent + " "; + const entries = Object.entries(annotated); + for (let i = 0; i < entries.length; i++) { + const [key, value] = entries[i]; + if (value === void 0 && (i === 0 || entries[i - 1][1] !== void 0)) { + result += `${objectIndent}${dim("...,")} +`; + } + if (value !== void 0) { + result += print(inspectOptions, groupCounts, value, objectIndent, { + prefix: `${key}: `, + suffix: "," + }); + result += "\n"; + } + } + result += `${indent}${dim(`}${suffix}`)}`; + return result; + } + return ""; +} +function formatZodError(error, input) { + const sortedIssues = Array.from(error.issues).sort((a, b) => { + if (a.code !== b.code) { + if (a.code === "invalid_union") return -1; + if (b.code === "invalid_union") return 1; + } + return 0; + }); + let annotated; + const groupCounts = new GroupCountsMap(); + for (const issue of sortedIssues) { + annotated = annotate(groupCounts, annotated, input, issue, issue.path); + } + const inspectOptions = { + depth: 0, + colors: $.enabled + }; + return print(inspectOptions, groupCounts, annotated); +} + +// src/merge.ts +var objectProtoNames = Object.getOwnPropertyNames(Object.prototype).sort().join("\0"); +function isPlainObject(value) { + const proto = Object.getPrototypeOf(value); + return proto === Object.prototype || proto === null || Object.getOwnPropertyNames(proto).sort().join("\0") === objectProtoNames; +} +function convertWorkerOptionsArrayToObject(key, array) { + const _ = array; + if (key === "queueConsumers") { + const object = Object.fromEntries( + array.map((item) => [item, {}]) + ); + return object; + } else { + const object = Object.fromEntries(array.map((item) => [item, item])); + return object; + } +} +function mergeWorkerOptions(a, b) { + const aRecord = a; + for (const [key, bValue] of Object.entries(b)) { + const aValue = aRecord[key]; + if (aValue === void 0) { + aRecord[key] = bValue; + continue; + } + const aIsArray = Array.isArray(aValue); + const bIsArray = Array.isArray(bValue); + const aIsObject = isPlainObject(aValue); + const bIsObject = isPlainObject(bValue); + if (aIsArray && bIsArray) { + aRecord[key] = Array.from(new Set(aValue.concat(bValue))); + } else if (aIsArray && bIsObject) { + const aNewValue = convertWorkerOptionsArrayToObject( + // Must be an array/record key if `aValue` & `bValue` are array/record + key, + aValue + ); + Object.assign(aNewValue, bValue); + aRecord[key] = aNewValue; + } else if (aIsObject && bIsArray) { + const bNewValue = convertWorkerOptionsArrayToObject( + // Must be an array/record key if `aValue` & `bValue` are array/record + key, + bValue + ); + Object.assign(aValue, bNewValue); + } else if (aIsObject && bIsObject) { + Object.assign(aValue, bValue); + } else { + aRecord[key] = bValue; + } + } + return a; +} + +// src/index.ts +var DEFAULT_HOST = "127.0.0.1"; +function getURLSafeHost(host) { + return import_net.default.isIPv6(host) ? `[${host}]` : host; +} +function maybeGetLocallyAccessibleHost(h) { + if (h === "localhost") return "localhost"; + if (h === "127.0.0.1" || h === "*" || h === "0.0.0.0" || h === "::") { + return "127.0.0.1"; + } + if (h === "::1") return "[::1]"; +} +function getServerPort(server) { + const address = server.address(); + (0, import_assert13.default)(address !== null && typeof address === "object"); + return address.port; +} +function hasMultipleWorkers(opts) { + return typeof opts === "object" && opts !== null && "workers" in opts && Array.isArray(opts.workers); +} +function getRootPath(opts) { + if (typeof opts === "object" && opts !== null && "rootPath" in opts && typeof opts.rootPath === "string") { + return opts.rootPath; + } else { + return ""; + } +} +function validateOptions(opts) { + const sharedOpts = opts; + const multipleWorkers = hasMultipleWorkers(opts); + const workerOpts = multipleWorkers ? opts.workers : [opts]; + if (workerOpts.length === 0) { + throw new MiniflareCoreError("ERR_NO_WORKERS", "No workers defined"); + } + const pluginSharedOpts = {}; + const pluginWorkerOpts = Array.from(Array(workerOpts.length)).map( + () => ({}) + ); + const sharedRootPath = multipleWorkers ? getRootPath(sharedOpts) : ""; + const workerRootPaths = workerOpts.map( + (opts2) => import_path35.default.resolve(sharedRootPath, getRootPath(opts2)) + ); + try { + for (const [key, plugin] of PLUGIN_ENTRIES) { + pluginSharedOpts[key] = plugin.sharedOptions === void 0 ? void 0 : parseWithRootPath(sharedRootPath, plugin.sharedOptions, sharedOpts); + for (let i = 0; i < workerOpts.length; i++) { + const optionsPath = multipleWorkers ? ["workers", i] : void 0; + pluginWorkerOpts[i][key] = parseWithRootPath( + workerRootPaths[i], + plugin.options, + workerOpts[i], + { path: optionsPath } + ); + } + } + } catch (e) { + if (e instanceof import_zod31.z.ZodError) { + let formatted; + try { + formatted = formatZodError(e, opts); + } catch (formatError) { + const title = "[Miniflare] Validation Error Format Failure"; + const message = [ + "### Input", + "```", + import_util5.default.inspect(opts, { depth: null }), + "```", + "", + "### Validation Error", + "```", + e.stack, + "```", + "", + "### Format Error", + "```", + typeof formatError === "object" && formatError !== null && "stack" in formatError && typeof formatError.stack === "string" ? formatError.stack : String(formatError), + "```" + ].join("\n"); + const githubIssueUrl = new URL( + "https://github.com/cloudflare/miniflare/issues/new" + ); + githubIssueUrl.searchParams.set("title", title); + githubIssueUrl.searchParams.set("body", message); + formatted = [ + "Unable to format validation error.", + "Please open the following URL in your browser to create a GitHub issue:", + githubIssueUrl, + "", + message, + "" + ].join("\n"); + } + const error = new MiniflareCoreError( + "ERR_VALIDATION", + `Unexpected options passed to \`new Miniflare()\` constructor: +${formatted}` + ); + Object.defineProperty(error, "cause", { get: () => e }); + throw error; + } + throw e; + } + const names = /* @__PURE__ */ new Set(); + for (const opts2 of pluginWorkerOpts) { + const name = opts2.core.name ?? ""; + if (names.has(name)) { + throw new MiniflareCoreError( + "ERR_DUPLICATE_NAME", + name === "" ? "Multiple workers defined without a `name`" : `Multiple workers defined with the same \`name\`: "${name}"` + ); + } + names.add(name); + } + return [pluginSharedOpts, pluginWorkerOpts]; +} +function getDurableObjectClassNames(allWorkerOpts) { + const serviceClassNames = /* @__PURE__ */ new Map(); + for (const workerOpts of allWorkerOpts) { + const workerServiceName = getUserServiceName(workerOpts.core.name); + for (const designator of Object.values( + workerOpts.do.durableObjects ?? {} + )) { + const { + className, + // Fallback to current worker service if name not defined + serviceName = workerServiceName, + enableSql, + unsafeUniqueKey, + unsafePreventEviction + } = normaliseDurableObject(designator); + let classNames = serviceClassNames.get(serviceName); + if (classNames === void 0) { + classNames = /* @__PURE__ */ new Map(); + serviceClassNames.set(serviceName, classNames); + } + if (classNames.has(className)) { + const existingInfo = classNames.get(className); + if (existingInfo?.enableSql !== enableSql) { + throw new MiniflareCoreError( + "ERR_DIFFERENT_STORAGE_BACKEND", + `Different storage backends defined for Durable Object "${className}" in "${serviceName}": ${JSON.stringify( + enableSql + )} and ${JSON.stringify(existingInfo?.enableSql)}` + ); + } + if (existingInfo?.unsafeUniqueKey !== unsafeUniqueKey) { + throw new MiniflareCoreError( + "ERR_DIFFERENT_UNIQUE_KEYS", + `Multiple unsafe unique keys defined for Durable Object "${className}" in "${serviceName}": ${JSON.stringify( + unsafeUniqueKey + )} and ${JSON.stringify(existingInfo?.unsafeUniqueKey)}` + ); + } + if (existingInfo?.unsafePreventEviction !== unsafePreventEviction) { + throw new MiniflareCoreError( + "ERR_DIFFERENT_PREVENT_EVICTION", + `Multiple unsafe prevent eviction values defined for Durable Object "${className}" in "${serviceName}": ${JSON.stringify( + unsafePreventEviction + )} and ${JSON.stringify(existingInfo?.unsafePreventEviction)}` + ); + } + } else { + classNames.set(className, { + enableSql, + unsafeUniqueKey, + unsafePreventEviction + }); + } + } + } + return serviceClassNames; +} +function invalidWrappedAsBound(name, bindingType) { + const stringName = JSON.stringify(name); + throw new MiniflareCoreError( + "ERR_INVALID_WRAPPED", + `Cannot use ${stringName} for wrapped binding because it is bound to with ${bindingType} bindings. +Ensure other workers don't define ${bindingType} bindings to ${stringName}.` + ); +} +function getWrappedBindingNames(allWorkerOpts, durableObjectClassNames) { + const wrappedBindingWorkerNames = /* @__PURE__ */ new Set(); + for (const workerOpts of allWorkerOpts) { + for (const designator of Object.values( + workerOpts.core.wrappedBindings ?? {} + )) { + const scriptName = typeof designator === "object" ? designator.scriptName : designator; + if (durableObjectClassNames.has(getUserServiceName(scriptName))) { + invalidWrappedAsBound(scriptName, "Durable Object"); + } + wrappedBindingWorkerNames.add(scriptName); + } + } + for (const workerOpts of allWorkerOpts) { + for (const designator of Object.values( + workerOpts.core.serviceBindings ?? {} + )) { + if (typeof designator !== "string") continue; + if (wrappedBindingWorkerNames.has(designator)) { + invalidWrappedAsBound(designator, "service"); + } + } + } + return wrappedBindingWorkerNames; +} +function getQueueProducers(allWorkerOpts) { + const queueProducers = /* @__PURE__ */ new Map(); + for (const workerOpts of allWorkerOpts) { + const workerName = workerOpts.core.name ?? ""; + let workerProducers = workerOpts.queues.queueProducers; + if (workerProducers !== void 0) { + if (Array.isArray(workerProducers)) { + workerProducers = Object.fromEntries( + workerProducers.map((bindingName) => [ + bindingName, + { queueName: bindingName } + ]) + ); + } + const producersIterable = Object.entries( + workerProducers + ); + for (const [bindingName, opts] of producersIterable) { + if (typeof opts === "string") { + queueProducers.set(bindingName, { workerName, queueName: opts }); + } else { + queueProducers.set(bindingName, { workerName, ...opts }); + } + } + } + } + return queueProducers; +} +function getQueueConsumers(allWorkerOpts) { + const queueConsumers = /* @__PURE__ */ new Map(); + for (const workerOpts of allWorkerOpts) { + const workerName = workerOpts.core.name ?? ""; + let workerConsumers = workerOpts.queues.queueConsumers; + if (workerConsumers !== void 0) { + if (Array.isArray(workerConsumers)) { + workerConsumers = Object.fromEntries( + workerConsumers.map((queueName) => [queueName, {}]) + ); + } + for (const [queueName, opts] of Object.entries(workerConsumers)) { + const existingConsumer = queueConsumers.get(queueName); + if (existingConsumer !== void 0) { + throw new QueuesError( + "ERR_MULTIPLE_CONSUMERS", + `Multiple consumers defined for queue "${queueName}": "${existingConsumer.workerName}" and "${workerName}"` + ); + } + queueConsumers.set(queueName, { workerName, ...opts }); + } + } + } + for (const [queueName, consumer] of queueConsumers) { + if (consumer.deadLetterQueue === queueName) { + throw new QueuesError( + "ERR_DEAD_LETTER_QUEUE_CYCLE", + `Dead letter queue for queue "${queueName}" cannot be itself` + ); + } + } + return queueConsumers; +} +function getWorkerRoutes(allWorkerOpts, wrappedBindingNames) { + const allRoutes = /* @__PURE__ */ new Map(); + for (const workerOpts of allWorkerOpts) { + const name = workerOpts.core.name ?? ""; + if (wrappedBindingNames.has(name)) continue; + (0, import_assert13.default)(!allRoutes.has(name)); + allRoutes.set(name, workerOpts.core.routes ?? []); + } + return allRoutes; +} +function getProxyBindingName(plugin, worker, binding) { + return [ + CoreBindings.DURABLE_OBJECT_NAMESPACE_PROXY, + plugin, + worker, + binding + ].join(":"); +} +function isNativeTargetBinding(binding) { + return !("json" in binding || "wasmModule" in binding || "text" in binding || "data" in binding); +} +function buildProxyBinding(plugin, worker, binding) { + (0, import_assert13.default)(binding.name !== void 0); + const name = getProxyBindingName(plugin, worker, binding.name); + const proxyBinding = { ...binding, name }; + if ("durableObjectNamespace" in proxyBinding && proxyBinding.durableObjectNamespace !== void 0) { + proxyBinding.durableObjectNamespace.serviceName ??= getUserServiceName(worker); + } + return proxyBinding; +} +function getInternalDurableObjectProxyBindings(plugin, service) { + if (!("worker" in service)) return; + (0, import_assert13.default)(service.worker !== void 0); + const serviceName = service.name; + (0, import_assert13.default)(serviceName !== void 0); + return service.worker.durableObjectNamespaces?.map(({ className }) => { + (0, import_assert13.default)(className !== void 0); + return { + name: getProxyBindingName(`${plugin}-internal`, serviceName, className), + durableObjectNamespace: { serviceName, className } + }; + }); +} +var restrictedUndiciHeaders = [ + // From Miniflare 2: + // https://github.com/cloudflare/miniflare/blob/9c135599dc21fe69080ada17fce6153692793bf1/packages/core/src/standards/http.ts#L129-L132 + "transfer-encoding", + "connection", + "keep-alive", + "expect" +]; +var restrictedWebSocketUpgradeHeaders = [ + "upgrade", + "connection", + "sec-websocket-accept" +]; +function _transformsForContentEncodingAndContentType(encoding, type) { + const encoders = []; + if (!encoding) return encoders; + if (!isCompressedByCloudflareFL(type)) return encoders; + const codings = encoding.toLowerCase().split(",").map((x) => x.trim()); + for (const coding of codings) { + if (/(x-)?gzip/.test(coding)) { + encoders.push(import_zlib.default.createGzip()); + } else if (/(x-)?deflate/.test(coding)) { + encoders.push(import_zlib.default.createDeflate()); + } else if (coding === "br") { + encoders.push(import_zlib.default.createBrotliCompress()); + } else { + encoders.length = 0; + break; + } + } + return encoders; +} +async function writeResponse(response, res) { + const headers = {}; + for (const entry of response.headers) { + const key = entry[0].toLowerCase(); + const value = entry[1]; + if (key === "set-cookie") { + headers[key] = response.headers.getSetCookie(); + } else { + headers[key] = value; + } + } + const encoding = headers["content-encoding"]?.toString(); + const type = headers["content-type"]?.toString(); + const encoders = _transformsForContentEncodingAndContentType(encoding, type); + if (encoders.length > 0) { + delete headers["content-length"]; + } + res.writeHead(response.status, response.statusText, headers); + let initialStream = res; + for (let i = encoders.length - 1; i >= 0; i--) { + encoders[i].pipe(initialStream); + initialStream = encoders[i]; + } + if (response.body) { + for await (const chunk of response.body) { + if (chunk) initialStream.write(chunk); + } + } + initialStream.end(); +} +function safeReadableStreamFrom(iterable) { + let iterator; + return new import_web5.ReadableStream({ + async start() { + iterator = iterable[Symbol.asyncIterator](); + }, + // @ts-expect-error `pull` may return anything + async pull(controller) { + try { + const { done, value } = await iterator.next(); + if (done) { + queueMicrotask(() => controller.close()); + } else { + const buf = Buffer.isBuffer(value) ? value : Buffer.from(value); + controller.enqueue(new Uint8Array(buf)); + } + } catch { + queueMicrotask(() => controller.close()); + } + return controller.desiredSize > 0; + }, + async cancel() { + await iterator.return?.(); + } + }); +} +var maybeInstanceRegistry; +function _initialiseInstanceRegistry() { + return maybeInstanceRegistry = /* @__PURE__ */ new Map(); +} +var Miniflare2 = class _Miniflare { + #previousSharedOpts; + #previousWorkerOpts; + #sharedOpts; + #workerOpts; + #log; + #runtime; + #removeExitHook; + #runtimeEntryURL; + #socketPorts; + #runtimeDispatcher; + #proxyClient; + #cfObject = {}; + // Path to temporary directory for use as scratch space/"in-memory" Durable + // Object storage. Note this may not exist, it's up to the consumers to + // create this if needed. Deleted on `dispose()`. + #tmpPath; + // Mutual exclusion lock for runtime operations (i.e. initialisation and + // updating config). This essentially puts initialisation and future updates + // in a queue, ensuring they're performed in calling order. + #runtimeMutex; + // Store `#init()` `Promise`, so we can propagate initialisation errors in + // `ready`. We would have no way of catching these otherwise. + #initPromise; + // Aborted when dispose() is called + #disposeController; + #loopbackServer; + #loopbackHost; + #liveReloadServer; + #webSocketServer; + #webSocketExtraHeaders; + #maybeInspectorProxyController; + #previousRuntimeInspectorPort; + constructor(opts) { + const [sharedOpts, workerOpts] = validateOptions(opts); + this.#sharedOpts = sharedOpts; + this.#workerOpts = workerOpts; + const workerNamesToProxy = new Set( + this.#workerOpts.filter(({ core: { unsafeInspectorProxy } }) => !!unsafeInspectorProxy).map((w) => w.core.name ?? "") + ); + const enableInspectorProxy = workerNamesToProxy.size > 0; + if (enableInspectorProxy) { + if (this.#sharedOpts.core.inspectorPort === void 0) { + throw new MiniflareCoreError( + "ERR_MISSING_INSPECTOR_PROXY_PORT", + "inspector proxy requested but without an inspectorPort specified" + ); + } + } + if (maybeInstanceRegistry !== void 0) { + const object = { name: "Miniflare", stack: "" }; + Error.captureStackTrace(object, _Miniflare); + maybeInstanceRegistry.set(this, object.stack); + } + this.#log = this.#sharedOpts.core.log ?? new NoOpLog(); + if (enableInspectorProxy) { + if (this.#sharedOpts.core.inspectorPort === void 0) { + throw new MiniflareCoreError( + "ERR_MISSING_INSPECTOR_PROXY_PORT", + "inspector proxy requested but without an inspectorPort specified" + ); + } + this.#maybeInspectorProxyController = new InspectorProxyController( + this.#sharedOpts.core.inspectorPort, + this.#log, + workerNamesToProxy + ); + } + this.#liveReloadServer = new import_ws5.WebSocketServer({ noServer: true }); + this.#webSocketServer = new import_ws5.WebSocketServer({ + noServer: true, + // Disable automatic handling of `Sec-WebSocket-Protocol` header, + // Cloudflare Workers require users to include this header themselves in + // `Response`s: https://github.com/cloudflare/miniflare/issues/179 + handleProtocols: () => false + }); + this.#webSocketExtraHeaders = /* @__PURE__ */ new WeakMap(); + this.#webSocketServer.on("headers", (headers, req) => { + const extra = this.#webSocketExtraHeaders.get(req); + this.#webSocketExtraHeaders.delete(req); + if (extra) { + for (const [key, value] of extra) { + if (!restrictedWebSocketUpgradeHeaders.includes(key.toLowerCase())) { + headers.push(`${key}: ${value}`); + } + } + } + }); + this.#tmpPath = import_path35.default.join( + import_os2.default.tmpdir(), + `miniflare-${import_crypto3.default.randomBytes(16).toString("hex")}` + ); + this.#runtime = new Runtime(); + this.#removeExitHook = (0, import_exit_hook.default)(() => { + void this.#runtime?.dispose(); + try { + import_fs31.default.rmSync(this.#tmpPath, { force: true, recursive: true }); + } catch (e) { + this.#log.debug(`Unable to remove temporary directory: ${String(e)}`); + } + }); + this.#disposeController = new AbortController(); + this.#runtimeMutex = new Mutex(); + this.#initPromise = this.#runtimeMutex.runWith(() => this.#assembleAndUpdateConfig()).catch((e) => { + maybeInstanceRegistry?.delete(this); + throw e; + }); + } + #handleReload() { + for (const ws of this.#liveReloadServer.clients) { + ws.close(1012, "Service Restart"); + } + for (const ws of this.#webSocketServer.clients) { + ws.close(1012, "Service Restart"); + } + } + async #handleLoopbackCustomService(request, customService) { + let service; + if (customService === CoreBindings.IMAGES_SERVICE) { + service = imagesLocalFetcher; + } else { + const slashIndex = customService.indexOf("/"); + const workerIndex = parseInt(customService.substring(0, slashIndex)); + const serviceKind = customService[slashIndex + 1]; + const serviceName = customService.substring(slashIndex + 2); + if (serviceKind === "#" /* UNKNOWN */) { + service = this.#workerOpts[workerIndex]?.core.serviceBindings?.[serviceName]; + } else if (serviceName === CUSTOM_SERVICE_KNOWN_OUTBOUND) { + service = this.#workerOpts[workerIndex]?.core.outboundService; + } + } + (0, import_assert13.default)(typeof service === "function"); + try { + let response = await service(request, this); + if (!(response instanceof Response2)) { + response = new Response2(response.body, response); + } + return import_zod31.z.instanceof(Response2).parse(response); + } catch (e) { + return new Response2(e?.stack ?? e, { status: 500 }); + } + } + get #workerSrcOpts() { + return this.#workerOpts.map(({ core }) => core); + } + #handleLoopback = async (req, res) => { + const headers = new import_undici4.Headers(); + for (const [name, values] of Object.entries(req.headers)) { + if (restrictedUndiciHeaders.includes(name)) continue; + if (Array.isArray(values)) { + for (const value of values) headers.append(name, value); + } else if (values !== void 0) { + headers.append(name, values); + } + } + const cfBlob = headers.get(CoreHeaders.CF_BLOB); + headers.delete(CoreHeaders.CF_BLOB); + (0, import_assert13.default)(!Array.isArray(cfBlob)); + const cf = cfBlob ? JSON.parse(cfBlob) : void 0; + const originalUrl = headers.get(CoreHeaders.ORIGINAL_URL); + const url27 = new URL(originalUrl ?? req.url ?? "", "http://localhost"); + headers.delete(CoreHeaders.ORIGINAL_URL); + const noBody = req.method === "GET" || req.method === "HEAD"; + const body = noBody ? void 0 : safeReadableStreamFrom(req); + const request = new Request(url27, { + method: req.method, + headers, + body, + duplex: "half", + cf + }); + let response; + try { + const customService = request.headers.get(CoreHeaders.CUSTOM_SERVICE); + if (customService !== null) { + request.headers.delete(CoreHeaders.CUSTOM_SERVICE); + response = await this.#handleLoopbackCustomService( + request, + customService + ); + } else if (this.#sharedOpts.core.unsafeModuleFallbackService !== void 0 && request.headers.has("X-Resolve-Method") && originalUrl === null) { + response = await this.#sharedOpts.core.unsafeModuleFallbackService( + request, + this + ); + } else if (url27.pathname === "/core/error") { + response = await handlePrettyErrorRequest( + this.#log, + this.#workerSrcOpts, + request + ); + } else if (url27.pathname === "/core/log") { + const level = parseInt(request.headers.get(SharedHeaders.LOG_LEVEL)); + (0, import_assert13.default)( + 0 /* NONE */ <= level && level <= 5 /* VERBOSE */, + `Expected ${SharedHeaders.LOG_LEVEL} header to be log level, got ${level}` + ); + const logLevel = level; + let message = await request.text(); + if (!$.enabled) message = stripAnsi(message); + this.#log.logWithLevel(logLevel, message); + response = new Response2(null, { status: 204 }); + } else if (url27.pathname === "/core/store-temp-file") { + const prefix = url27.searchParams.get("prefix"); + const folder = prefix ? `files/${prefix}` : "files"; + await (0, import_promises13.mkdir)(import_path35.default.join(this.#tmpPath, folder), { recursive: true }); + const filePath = import_path35.default.join( + this.#tmpPath, + folder, + `${import_crypto3.default.randomUUID()}.${url27.searchParams.get("extension") ?? "txt"}` + ); + await (0, import_promises13.writeFile)(filePath, await request.text()); + response = new Response2(filePath, { status: 200 }); + } + } catch (e) { + this.#log.error(e); + res?.writeHead(500); + res?.end(e?.stack ?? String(e)); + return; + } + if (res !== void 0) { + if (response === void 0) { + res.writeHead(404); + res.end(); + } else { + await writeResponse(response, res); + } + } + return response; + }; + #handleLoopbackUpgrade = async (req, socket, head) => { + const { pathname } = new URL(req.url ?? "", "http://localhost"); + if (pathname === "/cdn-cgi/mf/reload") { + this.#liveReloadServer.handleUpgrade(req, socket, head, (ws) => { + this.#liveReloadServer.emit("connection", ws, req); + }); + return; + } + const response = await this.#handleLoopback(req); + const webSocket = response?.webSocket; + if (response?.status === 101 && webSocket) { + this.#webSocketExtraHeaders.set(req, response.headers); + this.#webSocketServer.handleUpgrade(req, socket, head, (ws) => { + void coupleWebSocket(ws, webSocket); + this.#webSocketServer.emit("connection", ws, req); + }); + return; + } + const res = new import_http6.default.ServerResponse(req); + (0, import_assert13.default)(socket instanceof import_net.default.Socket); + res.assignSocket(socket); + if (!response || response.ok) { + res.writeHead(500); + res.end(); + this.#log.error( + new TypeError( + "Web Socket request did not return status 101 Switching Protocols response with Web Socket" + ) + ); + return; + } + await writeResponse(response, res); + }; + async #getLoopbackPort() { + const loopbackHost = this.#sharedOpts.core.host ?? DEFAULT_HOST; + if (this.#loopbackServer !== void 0) { + if (this.#loopbackHost === loopbackHost) { + return getServerPort(this.#loopbackServer); + } + await this.#stopLoopbackServer(); + } + this.#loopbackServer = await this.#startLoopbackServer(loopbackHost); + this.#loopbackHost = loopbackHost; + return getServerPort(this.#loopbackServer); + } + #startLoopbackServer(hostname) { + if (hostname === "*") hostname = "::"; + return new Promise((resolve2) => { + const server = (0, import_stoppable.default)( + import_http6.default.createServer(this.#handleLoopback), + /* grace */ + 0 + ); + server.on("upgrade", this.#handleLoopbackUpgrade); + server.listen(0, hostname, () => resolve2(server)); + }); + } + #stopLoopbackServer() { + return new Promise((resolve2, reject) => { + (0, import_assert13.default)(this.#loopbackServer !== void 0); + this.#loopbackServer.stop((err) => err ? reject(err) : resolve2()); + }); + } + #getSocketAddress(id, previousRequestedPort, host = DEFAULT_HOST, requestedPort) { + if (requestedPort === 0 && previousRequestedPort === 0) { + requestedPort = this.#socketPorts?.get(id); + } + return `${getURLSafeHost(host)}:${requestedPort ?? 0}`; + } + async #assembleConfig(loopbackPort) { + const allPreviousWorkerOpts = this.#previousWorkerOpts; + const allWorkerOpts = this.#workerOpts; + const sharedOpts = this.#sharedOpts; + sharedOpts.core.cf = await setupCf(this.#log, sharedOpts.core.cf); + this.#cfObject = sharedOpts.core.cf; + const durableObjectClassNames = getDurableObjectClassNames(allWorkerOpts); + const wrappedBindingNames = getWrappedBindingNames( + allWorkerOpts, + durableObjectClassNames + ); + const queueProducers = getQueueProducers(allWorkerOpts); + const queueConsumers = getQueueConsumers(allWorkerOpts); + const allWorkerRoutes = getWorkerRoutes(allWorkerOpts, wrappedBindingNames); + const workerNames = [...allWorkerRoutes.keys()]; + const services = /* @__PURE__ */ new Map(); + const extensions = [ + { + modules: [ + { name: "miniflare:shared", esModule: index_worker_default() }, + { name: "miniflare:zod", esModule: zod_worker_default() } + ] + } + ]; + const sockets = [ + { + name: SOCKET_ENTRY, + service: { name: SERVICE_ENTRY }, + ...await getEntrySocketHttpOptions(sharedOpts.core) + } + ]; + const configuredHost = sharedOpts.core.host ?? DEFAULT_HOST; + if (maybeGetLocallyAccessibleHost(configuredHost) === void 0) { + sockets.push({ + name: SOCKET_ENTRY_LOCAL, + service: { name: SERVICE_ENTRY }, + http: {}, + address: "127.0.0.1:0" + }); + } + const proxyBindings = []; + const allWorkerBindings = /* @__PURE__ */ new Map(); + const wrappedBindingsToPopulate = []; + for (let i = 0; i < allWorkerOpts.length; i++) { + const previousWorkerOpts = allPreviousWorkerOpts?.[i]; + const workerOpts = allWorkerOpts[i]; + const workerName = workerOpts.core.name ?? ""; + const isModulesWorker = Boolean(workerOpts.core.modules); + if (workerOpts.workflows.workflows) { + for (const workflow of Object.values(workerOpts.workflows.workflows)) { + workflow.scriptName ??= workerOpts.core.name; + } + } + if (workerOpts.assets.assets) { + workerOpts.assets.assets.workerName = workerOpts.core.name; + } + const workerBindings = []; + allWorkerBindings.set(workerName, workerBindings); + const additionalModules = []; + for (const [key, plugin] of PLUGIN_ENTRIES) { + const pluginBindings = await plugin.getBindings(workerOpts[key], i); + if (pluginBindings !== void 0) { + for (const binding of pluginBindings) { + if (key === "kv" && binding.name === SiteBindings.JSON_SITE_MANIFEST && isModulesWorker) { + (0, import_assert13.default)("json" in binding && binding.json !== void 0); + additionalModules.push({ + name: SiteBindings.JSON_SITE_MANIFEST, + text: binding.json + }); + } else { + workerBindings.push(binding); + } + if (isNativeTargetBinding(binding)) { + proxyBindings.push(buildProxyBinding(key, workerName, binding)); + } + if ("wrapped" in binding && binding.wrapped?.moduleName !== void 0 && binding.wrapped.innerBindings !== void 0) { + const workerName2 = maybeWrappedModuleToWorkerName( + binding.wrapped.moduleName + ); + if (workerName2 !== void 0) { + wrappedBindingsToPopulate.push({ + workerName: workerName2, + innerBindings: binding.wrapped.innerBindings + }); + } + } + if ("service" in binding) { + const targetWorkerName = binding.service?.name?.replace( + "core:user:", + "" + ); + const maybeAssetTargetService = allWorkerOpts.find( + (worker) => worker.core.name === targetWorkerName && worker.assets.assets + ); + if (maybeAssetTargetService && !binding.service?.entrypoint) { + (0, import_assert13.default)(binding.service?.name); + binding.service.name = `${RPC_PROXY_SERVICE_NAME}:${targetWorkerName}`; + } + } + } + } + } + const unsafeStickyBlobs = sharedOpts.core.unsafeStickyBlobs ?? false; + const unsafeEphemeralDurableObjects = workerOpts.core.unsafeEphemeralDurableObjects ?? false; + const pluginServicesOptionsBase = { + log: this.#log, + workerBindings, + workerIndex: i, + additionalModules, + tmpPath: this.#tmpPath, + workerNames, + loopbackPort, + unsafeStickyBlobs, + wrappedBindingNames, + durableObjectClassNames, + unsafeEphemeralDurableObjects, + queueProducers, + queueConsumers + }; + for (const [key, plugin] of PLUGIN_ENTRIES) { + const pluginServicesExtensions = await plugin.getServices({ + ...pluginServicesOptionsBase, + // @ts-expect-error `CoreOptionsSchema` has required options which are + // missing in other plugins' options. + options: workerOpts[key], + // @ts-expect-error `QueuesPlugin` doesn't define shared options + sharedOptions: sharedOpts[key] + }); + if (pluginServicesExtensions !== void 0) { + let pluginServices; + if (Array.isArray(pluginServicesExtensions)) { + pluginServices = pluginServicesExtensions; + } else { + pluginServices = pluginServicesExtensions.services; + extensions.push(...pluginServicesExtensions.extensions); + } + for (const service of pluginServices) { + if (service.name !== void 0 && !services.has(service.name)) { + services.set(service.name, service); + if (key !== DURABLE_OBJECTS_PLUGIN_NAME) { + const maybeBindings = getInternalDurableObjectProxyBindings( + key, + service + ); + if (maybeBindings !== void 0) { + proxyBindings.push(...maybeBindings); + } + } + } + } + } + } + const previousDirectSockets = previousWorkerOpts?.core.unsafeDirectSockets ?? []; + const directSockets = workerOpts.core.unsafeDirectSockets ?? []; + for (let j = 0; j < directSockets.length; j++) { + const previousDirectSocket = previousDirectSockets[j]; + const directSocket = directSockets[j]; + const entrypoint = directSocket.entrypoint ?? "default"; + const name = getDirectSocketName(i, entrypoint); + const address = this.#getSocketAddress( + name, + previousDirectSocket?.port, + directSocket.host, + directSocket.port + ); + const service = workerOpts.assets.assets && entrypoint === "default" ? { + name: `${RPC_PROXY_SERVICE_NAME}:${workerOpts.core.name}` + } : { + name: getUserServiceName(workerName), + entrypoint: entrypoint === "default" ? void 0 : entrypoint + }; + sockets.push({ + name, + address, + service, + http: { + style: directSocket.proxy ? HttpOptions_Style.PROXY : void 0, + cfBlobHeader: CoreHeaders.CF_BLOB, + capnpConnectHost: HOST_CAPNP_CONNECT + } + }); + } + } + const globalServices = getGlobalServices({ + sharedOptions: sharedOpts.core, + allWorkerRoutes, + /* + * - if Workers + Assets project but NOT Vitest, the fallback Worker (see + * `MINIFLARE_USER_FALLBACK`) should point to the (assets) RPC Proxy Worker + * - if Vitest with assets, the fallback Worker should point to the Vitest + * runner Worker, while the SELF binding on the test runner will point to + * the (assets) RPC Proxy Worker + */ + fallbackWorkerName: this.#workerOpts[0].assets.assets && !this.#workerOpts[0].core.name?.startsWith( + "vitest-pool-workers-runner-" + ) ? `${RPC_PROXY_SERVICE_NAME}:${this.#workerOpts[0].core.name}` : getUserServiceName(this.#workerOpts[0].core.name), + loopbackPort, + log: this.#log, + proxyBindings + }); + for (const service of globalServices) { + (0, import_assert13.default)(service.name !== void 0 && !services.has(service.name)); + services.set(service.name, service); + } + for (const toPopulate of wrappedBindingsToPopulate) { + const bindings = allWorkerBindings.get(toPopulate.workerName); + if (bindings === void 0) continue; + const existingBindingNames = new Set( + toPopulate.innerBindings.map(({ name }) => name) + ); + toPopulate.innerBindings.push( + ...bindings.filter(({ name }) => !existingBindingNames.has(name)) + ); + } + const servicesArray = Array.from(services.values()); + if (wrappedBindingsToPopulate.length > 0 && _isCyclic(servicesArray)) { + throw new MiniflareCoreError( + "ERR_CYCLIC", + "Generated workerd config contains cycles. Ensure wrapped bindings don't have bindings to themselves." + ); + } + return { services: servicesArray, sockets, extensions }; + } + async #assembleAndUpdateConfig() { + const initial = !this.#runtimeEntryURL; + (0, import_assert13.default)(this.#runtime !== void 0); + const loopbackPort = await this.#getLoopbackPort(); + const config = await this.#assembleConfig(loopbackPort); + const configBuffer = serializeConfig(config); + (0, import_assert13.default)(config.sockets !== void 0); + const requiredSockets = config.sockets.map( + ({ name }) => { + (0, import_assert13.default)(name !== void 0); + return name; + } + ); + if (this.#sharedOpts.core.inspectorPort !== void 0) { + requiredSockets.push(kInspectorSocket); + } + const configuredHost = this.#sharedOpts.core.host ?? DEFAULT_HOST; + const entryAddress = this.#getSocketAddress( + SOCKET_ENTRY, + this.#previousSharedOpts?.core.port, + configuredHost, + this.#sharedOpts.core.port + ); + let runtimeInspectorAddress; + if (this.#sharedOpts.core.inspectorPort !== void 0) { + let runtimeInspectorPort = this.#sharedOpts.core.inspectorPort; + if (this.#maybeInspectorProxyController !== void 0) { + runtimeInspectorPort = 0; + } + runtimeInspectorAddress = this.#getSocketAddress( + kInspectorSocket, + this.#previousRuntimeInspectorPort, + "localhost", + runtimeInspectorPort + ); + this.#previousRuntimeInspectorPort = runtimeInspectorPort; + } + const loopbackAddress = `${maybeGetLocallyAccessibleHost(configuredHost) ?? getURLSafeHost(configuredHost)}:${loopbackPort}`; + const runtimeOpts = { + signal: this.#disposeController.signal, + entryAddress, + loopbackAddress, + requiredSockets, + inspectorAddress: runtimeInspectorAddress, + verbose: this.#sharedOpts.core.verbose, + handleRuntimeStdio: this.#sharedOpts.core.handleRuntimeStdio + }; + const maybeSocketPorts = await this.#runtime.updateConfig( + configBuffer, + runtimeOpts + ); + if (this.#disposeController.signal.aborted) return; + if (maybeSocketPorts === void 0) { + throw new MiniflareCoreError( + "ERR_RUNTIME_FAILURE", + "The Workers runtime failed to start. There is likely additional logging output above." + ); + } + this.#socketPorts = maybeSocketPorts; + if (this.#maybeInspectorProxyController !== void 0 && this.#sharedOpts.core.inspectorPort !== void 0) { + const maybePort = this.#socketPorts.get(kInspectorSocket); + if (maybePort === void 0) { + throw new MiniflareCoreError( + "ERR_RUNTIME_FAILURE", + "Unable to access the runtime inspector socket." + ); + } else { + await this.#maybeInspectorProxyController.updateConnection( + this.#sharedOpts.core.inspectorPort, + maybePort + ); + } + } + const entrySocket = config.sockets?.[0]; + const secure = entrySocket !== void 0 && "https" in entrySocket; + const previousEntryURL = this.#runtimeEntryURL; + const entryPort = maybeSocketPorts.get(SOCKET_ENTRY); + (0, import_assert13.default)(entryPort !== void 0); + const maybeAccessibleHost = maybeGetLocallyAccessibleHost(configuredHost); + if (maybeAccessibleHost === void 0) { + const localEntryPort = maybeSocketPorts.get(SOCKET_ENTRY_LOCAL); + (0, import_assert13.default)(localEntryPort !== void 0, "Expected local entry socket port"); + this.#runtimeEntryURL = new URL(`http://127.0.0.1:${localEntryPort}`); + } else { + this.#runtimeEntryURL = new URL( + `${secure ? "https" : "http"}://${maybeAccessibleHost}:${entryPort}` + ); + } + if (previousEntryURL?.toString() !== this.#runtimeEntryURL.toString()) { + this.#runtimeDispatcher = new import_undici8.Pool(this.#runtimeEntryURL, { + connect: { rejectUnauthorized: false } + }); + } + if (this.#proxyClient === void 0) { + this.#proxyClient = new ProxyClient( + this.#runtimeEntryURL, + this.dispatchFetch + ); + } else { + this.#proxyClient.setRuntimeEntryURL(this.#runtimeEntryURL); + } + if (!this.#runtimeMutex.hasWaiting) { + const ready = initial ? "Ready" : "Updated and ready"; + const urlSafeHost = getURLSafeHost(configuredHost); + if (this.#sharedOpts.core.logRequests) { + this.#log.info( + `${ready} on ${secure ? "https" : "http"}://${urlSafeHost}:${entryPort}` + ); + } + if (initial && this.#sharedOpts.core.logRequests) { + const hosts = []; + if (configuredHost === "::" || configuredHost === "*") { + hosts.push("localhost"); + hosts.push("[::1]"); + } + if (configuredHost === "::" || configuredHost === "*" || configuredHost === "0.0.0.0") { + hosts.push(...getAccessibleHosts(true)); + } + for (const h of hosts) { + this.#log.info(`- ${secure ? "https" : "http"}://${h}:${entryPort}`); + } + } + this.#handleReload(); + } + } + async #waitForReady(disposing = false) { + await this.#initPromise; + await this.#runtimeMutex.drained(); + if (disposing) return new URL("http://[100::]/"); + await this.#maybeInspectorProxyController?.ready; + this.#checkDisposed(); + (0, import_assert13.default)(this.#runtimeEntryURL !== void 0); + return new URL(this.#runtimeEntryURL.toString()); + } + get ready() { + return this.#waitForReady(); + } + async getCf() { + this.#checkDisposed(); + await this.ready; + return JSON.parse(JSON.stringify(this.#cfObject)); + } + async getInspectorURL() { + this.#checkDisposed(); + await this.ready; + if (this.#maybeInspectorProxyController !== void 0) { + return this.#maybeInspectorProxyController.getInspectorURL(); + } + (0, import_assert13.default)(this.#socketPorts !== void 0); + const maybePort = this.#socketPorts.get(kInspectorSocket); + if (maybePort === void 0) { + throw new TypeError( + "Inspector not enabled in Miniflare instance. Set the `inspectorPort` option to enable it." + ); + } + return new URL(`ws://127.0.0.1:${maybePort}`); + } + async unsafeGetDirectURL(workerName, entrypoint = "default") { + this.#checkDisposed(); + await this.ready; + const workerIndex = this.#findAndAssertWorkerIndex(workerName); + const workerOpts = this.#workerOpts[workerIndex]; + const socketName = getDirectSocketName(workerIndex, entrypoint); + (0, import_assert13.default)(this.#socketPorts !== void 0); + const maybePort = this.#socketPorts.get(socketName); + if (maybePort === void 0) { + const friendlyWorkerName = workerName === void 0 ? "entrypoint" : JSON.stringify(workerName); + const friendlyEntrypointName = entrypoint === "default" ? entrypoint : JSON.stringify(entrypoint); + throw new TypeError( + `Direct access disabled in ${friendlyWorkerName} worker for ${friendlyEntrypointName} entrypoint` + ); + } + const directSocket = workerOpts.core.unsafeDirectSockets?.find( + (socket) => (socket.entrypoint ?? "default") === entrypoint + ); + (0, import_assert13.default)(directSocket !== void 0); + const host = directSocket.host ?? DEFAULT_HOST; + const accessibleHost = maybeGetLocallyAccessibleHost(host) ?? getURLSafeHost(host); + return new URL(`http://${accessibleHost}:${maybePort}`); + } + #checkDisposed() { + if (this.#disposeController.signal.aborted) { + throw new MiniflareCoreError( + "ERR_DISPOSED", + "Cannot use disposed instance" + ); + } + } + async #setOptions(opts) { + const [sharedOpts, workerOpts] = validateOptions(opts); + this.#previousSharedOpts = this.#sharedOpts; + this.#previousWorkerOpts = this.#workerOpts; + this.#sharedOpts = sharedOpts; + this.#workerOpts = workerOpts; + this.#log = this.#sharedOpts.core.log ?? this.#log; + await this.#assembleAndUpdateConfig(); + } + setOptions(opts) { + this.#checkDisposed(); + this.#proxyClient?.poisonProxies(); + return this.#runtimeMutex.runWith(() => this.#setOptions(opts)); + } + dispatchFetch = async (input, init2) => { + this.#checkDisposed(); + await this.ready; + (0, import_assert13.default)(this.#runtimeEntryURL !== void 0); + (0, import_assert13.default)(this.#runtimeDispatcher !== void 0); + const forward = new Request(input, init2); + const url27 = new URL(forward.url); + const actualRuntimeOrigin = this.#runtimeEntryURL.origin; + const userRuntimeOrigin = url27.origin; + url27.protocol = this.#runtimeEntryURL.protocol; + url27.host = this.#runtimeEntryURL.host; + if (forward.body !== null && forward.headers.get("Content-Length") === "0") { + forward.headers.delete("Content-Length"); + } + const cfBlob = forward.cf ? { ...fallbackCf, ...forward.cf } : void 0; + const dispatcher = new DispatchFetchDispatcher( + (0, import_undici8.getGlobalDispatcher)(), + this.#runtimeDispatcher, + actualRuntimeOrigin, + userRuntimeOrigin, + cfBlob + ); + const forwardInit = forward; + forwardInit.dispatcher = dispatcher; + const response = await fetch4(url27, forwardInit); + const stack = response.headers.get(CoreHeaders.ERROR_STACK); + if (response.status === 500 && stack !== null) { + const caught = JsonErrorSchema.parse(await response.json()); + throw reviveError(this.#workerSrcOpts, caught); + } + const contentEncoding = response.headers.get("Content-Encoding"); + if (contentEncoding) + response.headers.set("MF-Content-Encoding", contentEncoding); + response.headers.delete("Content-Encoding"); + if (process.env.MINIFLARE_ASSERT_BODIES_CONSUMED === "true" && response.body !== null) { + const originalLimit = Error.stackTraceLimit; + Error.stackTraceLimit = Infinity; + const error = new Error( + "`body` returned from `Miniflare#dispatchFetch()` not consumed immediately" + ); + Error.stackTraceLimit = originalLimit; + setImmediate(() => { + if (!response.bodyUsed) throw error; + }); + } + return response; + }; + /** @internal */ + async _getProxyClient() { + this.#checkDisposed(); + await this.ready; + (0, import_assert13.default)(this.#proxyClient !== void 0); + return this.#proxyClient; + } + #findAndAssertWorkerIndex(workerName) { + if (workerName === void 0) { + return 0; + } else { + const index = this.#workerOpts.findIndex( + ({ core }) => (core.name ?? "") === workerName + ); + if (index === -1) { + throw new TypeError(`${JSON.stringify(workerName)} worker not found`); + } + return index; + } + } + async getBindings(workerName) { + const bindings = {}; + const proxyClient = await this._getProxyClient(); + const workerIndex = this.#findAndAssertWorkerIndex(workerName); + const workerOpts = this.#workerOpts[workerIndex]; + workerName = workerOpts.core.name ?? ""; + for (const [key, plugin] of PLUGIN_ENTRIES) { + const pluginBindings = await plugin.getNodeBindings(workerOpts[key]); + for (const [name, binding] of Object.entries(pluginBindings)) { + if (binding instanceof ProxyNodeBinding) { + const proxyBindingName = getProxyBindingName(key, workerName, name); + let proxy = proxyClient.env[proxyBindingName]; + (0, import_assert13.default)( + proxy !== void 0, + `Expected ${proxyBindingName} to be bound` + ); + if (binding.proxyOverrideHandler) { + proxy = new Proxy(proxy, binding.proxyOverrideHandler); + } + bindings[name] = proxy; + } else { + bindings[name] = binding; + } + } + } + return bindings; + } + async getWorker(workerName) { + const proxyClient = await this._getProxyClient(); + const workerIndex = this.#findAndAssertWorkerIndex(workerName); + const workerOpts = this.#workerOpts[workerIndex]; + workerName = workerOpts.core.name ?? ""; + const bindingName = CoreBindings.SERVICE_USER_ROUTE_PREFIX + workerName; + const fetcher = proxyClient.env[bindingName]; + if (fetcher === void 0) { + const stringName = JSON.stringify(workerName); + throw new TypeError( + `${stringName} is being used as a wrapped binding, and cannot be accessed as a worker` + ); + } + return fetcher; + } + async #getProxy(pluginName, bindingName, workerName) { + const proxyClient = await this._getProxyClient(); + const proxyBindingName = getProxyBindingName( + pluginName, + // Default to entrypoint worker if none specified + workerName ?? this.#workerOpts[0].core.name ?? "", + bindingName + ); + const proxy = proxyClient.env[proxyBindingName]; + if (proxy === void 0) { + const friendlyWorkerName = workerName === void 0 ? "entrypoint" : JSON.stringify(workerName); + throw new TypeError( + `${JSON.stringify(bindingName)} unbound in ${friendlyWorkerName} worker` + ); + } + return proxy; + } + // TODO(someday): would be nice to define these in plugins + async getCaches() { + const proxyClient = await this._getProxyClient(); + return proxyClient.global.caches; + } + getD1Database(bindingName, workerName) { + return this.#getProxy(D1_PLUGIN_NAME, bindingName, workerName); + } + getDurableObjectNamespace(bindingName, workerName) { + return this.#getProxy(DURABLE_OBJECTS_PLUGIN_NAME, bindingName, workerName); + } + getKVNamespace(bindingName, workerName) { + return this.#getProxy(KV_PLUGIN_NAME, bindingName, workerName); + } + getSecretsStoreSecretAPI(bindingName, workerName) { + return this.#getProxy( + SECRET_STORE_PLUGIN_NAME, + bindingName, + workerName + ).then((binding) => { + return binding[ADMIN_API]; + }); + } + getSecretsStoreSecret(bindingName, workerName) { + return this.#getProxy(SECRET_STORE_PLUGIN_NAME, bindingName, workerName); + } + getQueueProducer(bindingName, workerName) { + return this.#getProxy(QUEUES_PLUGIN_NAME, bindingName, workerName); + } + getR2Bucket(bindingName, workerName) { + return this.#getProxy(R2_PLUGIN_NAME, bindingName, workerName); + } + /** @internal */ + _getInternalDurableObjectNamespace(pluginName, serviceName, className) { + return this.#getProxy(`${pluginName}-internal`, className, serviceName); + } + unsafeGetPersistPaths() { + const result = /* @__PURE__ */ new Map(); + for (const [key, plugin] of PLUGIN_ENTRIES) { + const sharedOpts = this.#sharedOpts[key]; + const maybePath = plugin.getPersistPath?.(sharedOpts, this.#tmpPath); + if (maybePath !== void 0) result.set(key, maybePath); + } + return result; + } + async dispose() { + this.#disposeController.abort(); + this.#proxyClient?.poisonProxies(); + try { + await this.#waitForReady( + /* disposing */ + true + ); + } finally { + this.#removeExitHook?.(); + await this.#proxyClient?.dispose(); + await this.#runtime?.dispose(); + await this.#stopLoopbackServer(); + await import_fs31.default.promises.rm(this.#tmpPath, { force: true, recursive: true }); + await this.#maybeInspectorProxyController?.dispose(); + maybeInstanceRegistry?.delete(this); + } + } +}; +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + AIOptionsSchema, + AI_PLUGIN, + AI_PLUGIN_NAME, + ANALYTICS_ENGINE_PLUGIN, + ANALYTICS_ENGINE_PLUGIN_NAME, + ASSETS_PLUGIN, + AnalyticsEngineSchemaOptionsSchema, + AnalyticsEngineSchemaSharedOptionsSchema, + AssetsOptionsSchema, + BROWSER_RENDERING_PLUGIN, + BROWSER_RENDERING_PLUGIN_NAME, + BrowserRenderingOptionsSchema, + CACHE_PLUGIN, + CACHE_PLUGIN_NAME, + CORE_PLUGIN, + CORE_PLUGIN_NAME, + CacheBindings, + CacheHeaders, + CacheOptionsSchema, + CacheSharedOptionsSchema, + CloseEvent, + CoreBindings, + CoreHeaders, + CoreOptionsSchema, + CoreSharedOptionsSchema, + D1OptionsSchema, + D1SharedOptionsSchema, + D1_PLUGIN, + D1_PLUGIN_NAME, + DEFAULT_PERSIST_ROOT, + DISPATCH_NAMESPACE_PLUGIN, + DISPATCH_NAMESPACE_PLUGIN_NAME, + DURABLE_OBJECTS_PLUGIN, + DURABLE_OBJECTS_PLUGIN_NAME, + DURABLE_OBJECTS_STORAGE_SERVICE_NAME, + DeferredPromise, + DispatchFetchDispatcher, + DispatchNamespaceOptionsSchema, + DurableObjectsOptionsSchema, + DurableObjectsSharedOptionsSchema, + EMAIL_PLUGIN, + EMAIL_PLUGIN_NAME, + EmailOptionsSchema, + ErrorEvent, + File, + FormData, + HOST_CAPNP_CONNECT, + HYPERDRIVE_PLUGIN, + HYPERDRIVE_PLUGIN_NAME, + Headers, + HttpOptions_Style, + HyperdriveInputOptionsSchema, + HyperdriveSchema, + IMAGES_PLUGIN, + IMAGES_PLUGIN_NAME, + ImagesOptionsSchema, + JsonSchema, + KVHeaders, + KVLimits, + KVOptionsSchema, + KVParams, + KVSharedOptionsSchema, + KV_PLUGIN, + KV_PLUGIN_NAME, + LiteralSchema, + Log, + LogLevel, + MAX_BULK_GET_KEYS, + MessageEvent, + Miniflare, + MiniflareCoreError, + MiniflareError, + ModuleDefinitionSchema, + ModuleRuleSchema, + ModuleRuleTypeSchema, + Mutex, + NoOpLog, + PIPELINES_PLUGIN_NAME, + PIPELINE_PLUGIN, + PLUGINS, + PLUGIN_ENTRIES, + PathSchema, + PeriodType, + PersistenceSchema, + PipelineOptionsSchema, + ProxyAddresses, + ProxyClient, + ProxyNodeBinding, + ProxyOps, + QUEUES_PLUGIN, + QUEUES_PLUGIN_NAME, + QueueBindings, + QueueConsumerOptionsSchema, + QueueConsumerSchema, + QueueConsumersSchema, + QueueContentTypeSchema, + QueueIncomingMessageSchema, + QueueMessageDelaySchema, + QueueProducerOptionsSchema, + QueueProducerSchema, + QueueProducersSchema, + QueuesBatchRequestSchema, + QueuesError, + QueuesOptionsSchema, + R2OptionsSchema, + R2SharedOptionsSchema, + R2_PLUGIN, + R2_PLUGIN_NAME, + RATELIMIT_PLUGIN, + RATELIMIT_PLUGIN_NAME, + RatelimitConfigSchema, + RatelimitOptionsSchema, + Request, + Response, + RouterError, + Runtime, + SECRET_STORE_PLUGIN, + SECRET_STORE_PLUGIN_NAME, + SERVICE_ENTRY, + SERVICE_LOOPBACK, + SITES_NO_CACHE_PREFIX, + SOCKET_ENTRY, + SOCKET_ENTRY_LOCAL, + SecretsStoreSecretsOptionsSchema, + SecretsStoreSecretsSharedOptionsSchema, + SharedBindings, + SharedHeaders, + SiteBindings, + SourceOptionsSchema, + TlsOptions_Version, + TypedEventTarget, + VECTORIZE_PLUGIN, + VECTORIZE_PLUGIN_NAME, + VectorizeOptionsSchema, + WORKER_BINDING_SERVICE_LOOPBACK, + WORKFLOWS_PLUGIN, + WORKFLOWS_PLUGIN_NAME, + WORKFLOWS_STORAGE_SERVICE_NAME, + WaitGroup, + WebSocket, + WebSocketPair, + Worker_Binding_CryptoKey_Usage, + WorkflowsOptionsSchema, + WorkflowsSharedOptionsSchema, + __MiniflareFunctionWrapper, + _enableControlEndpoints, + _forceColour, + _initialiseInstanceRegistry, + _isCyclic, + _transformsForContentEncodingAndContentType, + base64Decode, + base64Encode, + buildAssetManifest, + compileModuleRules, + coupleWebSocket, + createFetchMock, + createHTTPReducers, + createHTTPRevivers, + decodeSitesKey, + deserialiseRegExps, + deserialiseSiteRegExps, + encodeSitesKey, + fetch, + formatZodError, + getAccessibleHosts, + getAssetsBindingsNames, + getCacheServiceName, + getDirectSocketName, + getEntrySocketHttpOptions, + getFreshSourceMapSupport, + getGlobalServices, + getMiniflareObjectBindings, + getNodeCompat, + getPersistPath, + getRootPath, + globsToRegExps, + isFetcherFetch, + isR2ObjectWriteHttpMetadata, + isSitesRequest, + kCurrentWorker, + kInspectorSocket, + kUnsafeEphemeralUniqueKey, + kVoid, + matchRoutes, + maybeApply, + maybeParseURL, + mergeWorkerOptions, + migrateDatabase, + mixedModeClientWorker, + namespaceEntries, + namespaceKeys, + normaliseDurableObject, + objectEntryWorker, + parseRanges, + parseRoutes, + parseWithReadableStreams, + parseWithRootPath, + prefixError, + prefixStream, + readPrefix, + reduceError, + sanitisePath, + serialiseRegExps, + serialiseSiteRegExps, + serializeConfig, + stringifyWithStreams, + stripAnsi, + structuredSerializableReducers, + structuredSerializableRevivers, + supportedCompatibilityDate, + testRegExps, + testSiteRegExps, + viewToBuffer, + zAwaitable +}); +/*! Path sanitisation regexps adapted from node-sanitize-filename: + * https://github.com/parshap/node-sanitize-filename/blob/209c39b914c8eb48ee27bcbde64b2c7822fdf3de/index.js#L4-L37 + * + * Licensed under the ISC license: + * + * Copyright Parsha Pourkhomami + * + * Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the + * above copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY + * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, + * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ +/*! + * MIT License + * + * Copyright (c) Sindre Sorhus (https://sindresorhus.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +/*! + * Copyright (c) 2011 Felix Geisendörfer (felix@debuggable.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +//# sourceMappingURL=index.js.map diff --git a/node_modules/miniflare/dist/src/index.js.map b/node_modules/miniflare/dist/src/index.js.map new file mode 100644 index 0000000..8b3e8aa --- /dev/null +++ b/node_modules/miniflare/dist/src/index.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../node_modules/.pnpm/ignore@5.3.1/node_modules/ignore/index.js", "../../../../node_modules/.pnpm/mime@3.0.0/node_modules/mime/Mime.js", "../../../../node_modules/.pnpm/mime@3.0.0/node_modules/mime/types/standard.js", "../../../../node_modules/.pnpm/mime@3.0.0/node_modules/mime/types/other.js", "../../../../node_modules/.pnpm/mime@3.0.0/node_modules/mime/index.js", "../../src/index.ts", "../../../../node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/colors.mjs", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/shared/index.worker.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/shared/zod.worker.ts", "../../src/cf.ts", "../../src/http/fetch.ts", "../../src/workers/cache/constants.ts", "../../src/workers/core/constants.ts", "../../src/workers/core/devalue.ts", "../../../../node_modules/.pnpm/devalue@4.3.2/node_modules/devalue/src/utils.js", "../../../../node_modules/.pnpm/devalue@4.3.2/node_modules/devalue/src/constants.js", "../../../../node_modules/.pnpm/devalue@4.3.2/node_modules/devalue/src/parse.js", "../../../../node_modules/.pnpm/devalue@4.3.2/node_modules/devalue/src/stringify.js", "../../src/workers/core/routing.ts", "../../src/workers/shared/constants.ts", "../../src/workers/shared/data.ts", "../../src/workers/shared/matcher.ts", "../../src/workers/shared/range.ts", "../../src/workers/shared/sync.ts", "../../src/workers/shared/types.ts", "../../src/workers/kv/constants.ts", "../../src/workers/queues/constants.ts", "../../src/workers/shared/zod.worker.ts", "../../src/workers/queues/schemas.ts", "../../src/http/request.ts", "../../src/http/response.ts", "../../src/http/websocket.ts", "../../src/shared/colour.ts", "../../src/shared/error.ts", "../../src/shared/event.ts", "../../src/shared/log.ts", "../../src/shared/matcher.ts", "../../src/shared/streams.ts", "../../src/shared/types.ts", "../../src/http/server.ts", "../../src/http/cert.ts", "../../src/http/helpers.ts", "../../src/http/index.ts", "../../src/plugins/ai/index.ts", "../../src/plugins/shared/index.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/shared/mixed-mode-client.worker.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/shared/object-entry.worker.ts", "../../src/plugins/shared/constants.ts", "../../src/plugins/shared/routing.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/analytics-engine/analytics-engine.worker.ts", "../../src/plugins/analytics-engine/index.ts", "../../src/plugins/assets/index.ts", "../../../workers-shared/utils/constants.ts", "../../../workers-shared/utils/types.ts", "../../../workers-shared/utils/helpers.ts", "../../../workers-shared/utils/configuration/constructConfiguration.ts", "../../../workers-shared/utils/configuration/constants.ts", "../../../workers-shared/utils/configuration/validateURL.ts", "../../../workers-shared/utils/configuration/parseHeaders.ts", "../../../workers-shared/utils/configuration/parseRedirects.ts", "../../../../node_modules/.pnpm/pretty-bytes@6.1.1/node_modules/pretty-bytes/index.js", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/assets/assets.worker.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/assets/assets-kv.worker.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/assets/router.worker.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/assets/rpc-proxy.worker.ts", "../../src/plugins/core/index.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/core/entry.worker.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/core/strip-cf-connecting-ip.worker.ts", "../../src/runtime/index.ts", "../../../../node_modules/.pnpm/capnp-es@0.0.7_typescript@5.7.3/node_modules/capnp-es/dist/shared/capnp-es.DAoyiaGr.mjs", "../../../../node_modules/.pnpm/capnp-es@0.0.7_typescript@5.7.3/node_modules/capnp-es/dist/shared/capnp-es.Cx0B_Qxd.mjs", "../../../../node_modules/.pnpm/capnp-es@0.0.7_typescript@5.7.3/node_modules/capnp-es/dist/shared/capnp-es.DCKndyix.mjs", "../../../../node_modules/.pnpm/capnp-es@0.0.7_typescript@5.7.3/node_modules/capnp-es/dist/shared/capnp-es.B1ADXvSS.mjs", "../../../../node_modules/.pnpm/capnp-es@0.0.7_typescript@5.7.3/node_modules/capnp-es/dist/index.mjs", "../../src/runtime/config/generated.ts", "../../src/runtime/config/workerd.ts", "../../src/runtime/config/index.ts", "../../src/plugins/assets/constants.ts", "../../src/plugins/cache/index.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/cache/cache.worker.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/cache/cache-entry.worker.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/cache/cache-entry-noop.worker.ts", "../../src/plugins/do/index.ts", "../../src/plugins/core/constants.ts", "../../src/plugins/core/modules.ts", "../../src/plugins/core/node-compat.ts", "../../src/plugins/core/proxy/client.ts", "../../src/plugins/core/proxy/fetch-sync.ts", "../../src/plugins/core/errors/index.ts", "../../src/plugins/core/errors/sourcemap.ts", "../../src/plugins/core/errors/callsite.ts", "../../src/plugins/core/proxy/types.ts", "../../src/plugins/core/services.ts", "../../src/plugins/assets/schema.ts", "../../src/plugins/browser-rendering/index.ts", "../../src/plugins/d1/index.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/d1/database.worker.ts", "../../src/plugins/dispatch-namespace/index.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/dispatch-namespace/dispatch-namespace.worker.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/email/email.worker.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/email/send_email.worker.ts", "../../src/plugins/email/index.ts", "../../src/plugins/hyperdrive/index.ts", "../../src/plugins/images/index.ts", "../../src/plugins/kv/index.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/kv/namespace.worker.ts", "../../src/plugins/kv/constants.ts", "../../src/plugins/kv/sites.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/kv/sites.worker.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/pipelines/pipeline.worker.ts", "../../src/plugins/pipelines/index.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/queues/broker.worker.ts", "../../src/plugins/queues/index.ts", "../../src/plugins/queues/errors.ts", "../../src/plugins/r2/index.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/r2/bucket.worker.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/ratelimit/ratelimit.worker.ts", "../../src/plugins/ratelimit/index.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/secrets-store/secret.worker.ts", "../../src/plugins/secret-store/index.ts", "../../src/plugins/vectorize/index.ts", "../../src/plugins/workflows/index.ts", "embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/miniflare/src/workers/workflows/binding.worker.ts", "../../src/plugins/index.ts", "../../src/plugins/core/inspector-proxy/inspector-proxy-controller.ts", "../../../../node_modules/.pnpm/get-port@7.1.0/node_modules/get-port/index.js", "../../package.json", "../../src/plugins/core/inspector-proxy/inspector-proxy.ts", "../../src/plugins/core/inspector-proxy/devtools.ts", "../../src/plugins/images/fetcher.ts", "../../src/shared/mime-types.ts", "../../src/workers/secrets-store/constants.ts", "../../src/zod-format.ts", "../../src/merge.ts"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,uEAAAA,UAAAC,SAAA;AAAA;AACA,aAAS,UAAW,SAAS;AAC3B,aAAO,MAAM,QAAQ,OAAO,IACxB,UACA,CAAC,OAAO;AAAA,IACd;AAEA,QAAM,QAAQ;AACd,QAAM,QAAQ;AACd,QAAM,SAAS;AACf,QAAM,wBAAwB;AAC9B,QAAM,mCAAmC;AACzC,QAAM,4CAA4C;AAClD,QAAM,qCAAqC;AAC3C,QAAM,sBAAsB;AAM5B,QAAM,0BAA0B;AAEhC,QAAM,QAAQ;AAGd,QAAI,iBAAiB;AAErB,QAAI,OAAO,WAAW,aAAa;AACjC,uBAAiB,OAAO,IAAI,aAAa;AAAA,IAC3C;AACA,QAAM,aAAa;AAEnB,QAAM,SAAS,CAAC,QAAQ,KAAK,UAC3B,OAAO,eAAe,QAAQ,KAAK,EAAC,MAAK,CAAC;AAE5C,QAAM,qBAAqB;AAE3B,QAAM,eAAe,MAAM;AAI3B,QAAM,gBAAgB,WAAS,MAAM;AAAA,MACnC;AAAA,MACA,CAAC,OAAO,MAAM,OAAO,KAAK,WAAW,CAAC,KAAK,GAAG,WAAW,CAAC,IACtD,QAGA;AAAA,IACN;AAGA,QAAM,sBAAsB,aAAW;AACrC,YAAM,EAAC,OAAM,IAAI;AACjB,aAAO,QAAQ,MAAM,GAAG,SAAS,SAAS,CAAC;AAAA,IAC7C;AAaA,QAAM,YAAY;AAAA,MAEhB;AAAA;AAAA;AAAA;AAAA,QAIE;AAAA,QACA,MAAM;AAAA,MACR;AAAA;AAAA,MAGA;AAAA;AAAA;AAAA;AAAA,QAIE;AAAA,QACA,WAAS,MAAM,QAAQ,IAAI,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B;AAC9B,SAAK,mBAAmB,MAAM;AAK9B,SAAK,cAAc,cAAc;AACjC,QAAI;AACH,YAAM,KAAK;AAAA;AAAA,QAA8B;AAAA,MAAI;AAAA,IAC9C,UAAE;AAED,WAAK,kBAAkB;AAGvB,YAAM,KAAK,cAAc,QAAQ;AACjC,YAAM,KAAK,UAAU,QAAQ;AAC7B,YAAM,KAAK,oBAAoB;AAE/B,YAAM,YAAAS,QAAG,SAAS,GAAG,KAAK,UAAU,EAAE,OAAO,MAAM,WAAW,KAAK,CAAC;AAGpE,YAAM,KAAK,gCAAgC,QAAQ;AAInD,6BAAuB,OAAO,IAAI;AAAA,IACnC;AAAA,EACD;AACD;", + "names": ["exports", "module", "path", "ignored", "exports", "module", "path", "exports", "module", "exports", "module", "exports", "module", "CORE_PLUGIN_NAME", "Miniflare", "Response", "fetch", "supportedCompatibilityDate", "import_assert", "import_crypto", "import_fs", "import_promises", "import_http", "import_os", "import_path", "import_web", "import_util", "import_undici", "path", "fs", "url", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_ws", "import_zod", "import_path", "path", "assert", "import_ws", "revivers", "reducers", "index", "value", "assert", "url", "reducers", "value", "stringifiedValue", "revivers", "url", "path", "LogLevel", "import_node_buffer", "import_node_assert", "resolve", "assert", "url", "import_node_buffer", "import_zod", "import_undici", "BaseRequest", "init", "import_undici", "Response", "BaseResponse", "url", "init", "import_assert", "import_path", "path", "globToRegexp", "import_assert", "import_path", "import_zod", "assert", "path", "init", "assert", "NodeWebSocket", "fetch", "init", "url", "NodeWebSocket", "headers", "response", "Response", "path", "import_promises", "fs", "net", "import_undici", "import_node_assert", "import_zod", "import_fs", "import_promises", "import_path", "import_url", "import_zod", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_url", "url", "url", "path", "crypto", "fs", "assert", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_zod", "import_promises", "import_node_path", "import_zod", "ignore", "import_node_path", "path", "url", "path", "numberString", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_assert", "import_fs", "import_promises", "import_path", "import_stream", "import_util", "import_undici", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_zod", "import_assert", "import_events", "import_workerd", "import_zod", "escaped", "dump", "rl", "process", "resolve", "workerdPath", "FORCE_COLOR", "childProcess", "assert", "import_promises", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_zod", "fs", "import_promises", "import_zod", "fs", "import_assert", "import_fs", "import_path", "import_url", "import_zod", "module", "path", "relative", "rule", "assert", "contents", "import_assert", "import_crypto", "import_web", "import_util", "import_undici", "import_assert", "import_web", "import_fs", "import_path", "import_url", "import_zod", "import_assert", "assert", "contents", "fs", "maybeGetFile", "module", "path", "Response", "url", "init", "assert", "import_web", "import_undici", "Response", "crypto", "url", "util", "assert", "key", "import_zod", "tls", "encoder", "fetch", "CORE_PLUGIN_NAME", "assert", "supportedCompatibilityDate", "fs", "path", "bindings", "moduleName", "bindingEntries", "name", "module", "invalidWrapped", "import_zod", "fs", "path", "encoder", "crypto", "import_node_assert", "import_zod", "assert", "import_assert", "import_promises", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_zod", "assert", "fs", "import_node_assert", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_zod", "assert", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_zod", "import_node_assert", "import_zod", "url", "assert", "import_zod", "import_promises", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_zod", "import_assert", "import_promises", "import_path", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "rootPath", "fs", "path", "assert", "fs", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_zod", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_zod", "bindingEntries", "import_promises", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_zod", "fs", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_zod", "PeriodType", "buildJsonBindings", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_zod", "import_node_assert", "import_zod", "assert", "import_promises", "import_fs", "import_path", "import_url", "contents", "path", "fs", "url", "import_zod", "fs", "CORE_PLUGIN_NAME", "import_node_crypto", "os", "resolve", "net", "import_ws", "import_node_assert", "import_ws", "assert", "WebSocket", "url", "resolve", "path", "crypto", "WebSocket", "import_buffer", "url", "import_assert", "import_util", "path", "assert", "util", "net", "assert", "opts", "path", "util", "zlib", "Miniflare", "os", "crypto", "exitHook", "fs", "Response", "url", "http", "resolve", "stoppable", "workerName", "init", "fetch"] +} diff --git a/node_modules/miniflare/dist/src/workers/analytics-engine/analytics-engine.worker.js b/node_modules/miniflare/dist/src/workers/analytics-engine/analytics-engine.worker.js new file mode 100644 index 0000000..752a129 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/analytics-engine/analytics-engine.worker.js @@ -0,0 +1,15 @@ +// src/workers/analytics-engine/analytics-engine.worker.ts +var LocalAnalyticsEngineDataset = class { + constructor(env) { + this.env = env; + } + writeDataPoint(_event) { + } +}; +function analytics_engine_worker_default(env) { + return new LocalAnalyticsEngineDataset(env); +} +export { + analytics_engine_worker_default as default +}; +//# sourceMappingURL=analytics-engine.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/analytics-engine/analytics-engine.worker.js.map b/node_modules/miniflare/dist/src/workers/analytics-engine/analytics-engine.worker.js.map new file mode 100644 index 0000000..34d06eb --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/analytics-engine/analytics-engine.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../src/workers/analytics-engine/analytics-engine.worker.ts"], + "mappings": ";AAGA,IAAM,8BAAN,MAAoE;AAAA,EACnE,YAAoB,KAAU;AAAV;AAAA,EAAW;AAAA,EAC/B,eAAe,QAAyC;AAAA,EAExD;AACD;AAEe,SAAR,gCAAkB,KAAU;AAClC,SAAO,IAAI,4BAA4B,GAAG;AAC3C;", + "names": [] +} diff --git a/node_modules/miniflare/dist/src/workers/assets/assets-kv.worker.js b/node_modules/miniflare/dist/src/workers/assets/assets-kv.worker.js new file mode 100644 index 0000000..6c39fbe --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/assets/assets-kv.worker.js @@ -0,0 +1,28 @@ +// src/workers/assets/assets-kv.worker.ts +import { SharedBindings } from "miniflare:shared"; +var assets_kv_worker_default = { + async fetch(request, env) { + if (request.method !== "GET") { + let message = `Cannot ${request.method.toLowerCase()}() with Workers Assets namespace`; + return new Response(message, { status: 405, statusText: message }); + } + let pathHash = new URL(request.url).pathname.substring(1), entry = env.ASSETS_REVERSE_MAP[pathHash]; + if (entry === void 0) + return new Response("Not Found", { status: 404 }); + let { filePath, contentType } = entry, response = await env[SharedBindings.MAYBE_SERVICE_BLOBS].fetch( + new URL( + // somewhere in blobservice I think this is being decoded again + filePath.split("/").map((x) => encodeURIComponent(x)).join("/"), + "http://placeholder" + ) + ), newResponse = new Response(response.body, response); + return contentType !== null && newResponse.headers.append( + "cf-kv-metadata", + `{"contentType": "${contentType}"}` + ), newResponse; + } +}; +export { + assets_kv_worker_default as default +}; +//# sourceMappingURL=assets-kv.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/assets/assets-kv.worker.js.map b/node_modules/miniflare/dist/src/workers/assets/assets-kv.worker.js.map new file mode 100644 index 0000000..b1353f6 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/assets/assets-kv.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../src/workers/assets/assets-kv.worker.ts"], + "mappings": ";AAAA,SAAS,sBAAsB;AAW/B,IAAO,2BAA8B;AAAA,EACpC,MAAM,MAAM,SAAS,KAAK;AAEzB,QAAI,QAAQ,WAAW,OAAO;AAC7B,UAAM,UAAU,UAAU,QAAQ,OAAO,YAAY,CAAC;AACtD,aAAO,IAAI,SAAS,SAAS,EAAE,QAAQ,KAAK,YAAY,QAAQ,CAAC;AAAA,IAClE;AAEA,QAAM,WAAW,IAAI,IAAI,QAAQ,GAAG,EAAE,SAAS,UAAU,CAAC,GACpD,QAAQ,IAAI,mBAAmB,QAAQ;AAC7C,QAAI,UAAU;AACb,aAAO,IAAI,SAAS,aAAa,EAAE,QAAQ,IAAI,CAAC;AAGjD,QAAM,EAAE,UAAU,YAAY,IAAI,OAE5B,WAAW,MADI,IAAI,eAAe,mBAAmB,EACvB;AAAA,MACnC,IAAI;AAAA;AAAA,QAEH,SACE,MAAM,GAAG,EACT,IAAI,CAAC,MAAM,mBAAmB,CAAC,CAAC,EAChC,KAAK,GAAG;AAAA,QACV;AAAA,MACD;AAAA,IACD,GACM,cAAc,IAAI,SAAS,SAAS,MAAM,QAAQ;AAExD,WAAI,gBAAgB,QACnB,YAAY,QAAQ;AAAA,MACnB;AAAA,MACA,oBAAoB,WAAW;AAAA,IAChC,GAEM;AAAA,EACR;AACD;", + "names": [] +} diff --git a/node_modules/miniflare/dist/src/workers/assets/assets.worker.js b/node_modules/miniflare/dist/src/workers/assets/assets.worker.js new file mode 100644 index 0000000..6646ce9 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/assets/assets.worker.js @@ -0,0 +1,9010 @@ +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty; +var __commonJS = (cb, mod) => function() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from == "object" || typeof from == "function") + for (let key of __getOwnPropNames(from)) + !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target, + mod +)); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/is.js +var require_is = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/is.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var objectToString = Object.prototype.toString; + function isError(wat) { + switch (objectToString.call(wat)) { + case "[object Error]": + case "[object Exception]": + case "[object DOMException]": + return !0; + default: + return isInstanceOf(wat, Error); + } + } + function isBuiltin(wat, className) { + return objectToString.call(wat) === `[object ${className}]`; + } + function isErrorEvent(wat) { + return isBuiltin(wat, "ErrorEvent"); + } + function isDOMError(wat) { + return isBuiltin(wat, "DOMError"); + } + function isDOMException(wat) { + return isBuiltin(wat, "DOMException"); + } + function isString(wat) { + return isBuiltin(wat, "String"); + } + function isParameterizedString(wat) { + return typeof wat == "object" && wat !== null && "__sentry_template_string__" in wat && "__sentry_template_values__" in wat; + } + function isPrimitive(wat) { + return wat === null || isParameterizedString(wat) || typeof wat != "object" && typeof wat != "function"; + } + function isPlainObject(wat) { + return isBuiltin(wat, "Object"); + } + function isEvent(wat) { + return typeof Event < "u" && isInstanceOf(wat, Event); + } + function isElement(wat) { + return typeof Element < "u" && isInstanceOf(wat, Element); + } + function isRegExp(wat) { + return isBuiltin(wat, "RegExp"); + } + function isThenable(wat) { + return !!(wat && wat.then && typeof wat.then == "function"); + } + function isSyntheticEvent(wat) { + return isPlainObject(wat) && "nativeEvent" in wat && "preventDefault" in wat && "stopPropagation" in wat; + } + function isInstanceOf(wat, base) { + try { + return wat instanceof base; + } catch { + return !1; + } + } + function isVueViewModel(wat) { + return !!(typeof wat == "object" && wat !== null && (wat.__isVue || wat._isVue)); + } + exports.isDOMError = isDOMError; + exports.isDOMException = isDOMException; + exports.isElement = isElement; + exports.isError = isError; + exports.isErrorEvent = isErrorEvent; + exports.isEvent = isEvent; + exports.isInstanceOf = isInstanceOf; + exports.isParameterizedString = isParameterizedString; + exports.isPlainObject = isPlainObject; + exports.isPrimitive = isPrimitive; + exports.isRegExp = isRegExp; + exports.isString = isString; + exports.isSyntheticEvent = isSyntheticEvent; + exports.isThenable = isThenable; + exports.isVueViewModel = isVueViewModel; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/string.js +var require_string = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/string.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var is = require_is(); + function truncate(str, max = 0) { + return typeof str != "string" || max === 0 || str.length <= max ? str : `${str.slice(0, max)}...`; + } + function snipLine(line, colno) { + let newLine = line, lineLength = newLine.length; + if (lineLength <= 150) + return newLine; + colno > lineLength && (colno = lineLength); + let start = Math.max(colno - 60, 0); + start < 5 && (start = 0); + let end = Math.min(start + 140, lineLength); + return end > lineLength - 5 && (end = lineLength), end === lineLength && (start = Math.max(end - 140, 0)), newLine = newLine.slice(start, end), start > 0 && (newLine = `'{snip} ${newLine}`), end < lineLength && (newLine += " {snip}"), newLine; + } + function safeJoin(input, delimiter) { + if (!Array.isArray(input)) + return ""; + let output = []; + for (let i = 0; i < input.length; i++) { + let value = input[i]; + try { + is.isVueViewModel(value) ? output.push("[VueViewModel]") : output.push(String(value)); + } catch { + output.push("[value cannot be serialized]"); + } + } + return output.join(delimiter); + } + function isMatchingPattern(value, pattern, requireExactStringMatch = !1) { + return is.isString(value) ? is.isRegExp(pattern) ? pattern.test(value) : is.isString(pattern) ? requireExactStringMatch ? value === pattern : value.includes(pattern) : !1 : !1; + } + function stringMatchesSomePattern(testString, patterns = [], requireExactStringMatch = !1) { + return patterns.some((pattern) => isMatchingPattern(testString, pattern, requireExactStringMatch)); + } + exports.isMatchingPattern = isMatchingPattern; + exports.safeJoin = safeJoin; + exports.snipLine = snipLine; + exports.stringMatchesSomePattern = stringMatchesSomePattern; + exports.truncate = truncate; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/aggregate-errors.js +var require_aggregate_errors = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/aggregate-errors.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var is = require_is(), string = require_string(); + function applyAggregateErrorsToEvent(exceptionFromErrorImplementation, parser, maxValueLimit = 250, key, limit, event, hint) { + if (!event.exception || !event.exception.values || !hint || !is.isInstanceOf(hint.originalException, Error)) + return; + let originalException = event.exception.values.length > 0 ? event.exception.values[event.exception.values.length - 1] : void 0; + originalException && (event.exception.values = truncateAggregateExceptions( + aggregateExceptionsFromError( + exceptionFromErrorImplementation, + parser, + limit, + hint.originalException, + key, + event.exception.values, + originalException, + 0 + ), + maxValueLimit + )); + } + function aggregateExceptionsFromError(exceptionFromErrorImplementation, parser, limit, error, key, prevExceptions, exception, exceptionId) { + if (prevExceptions.length >= limit + 1) + return prevExceptions; + let newExceptions = [...prevExceptions]; + if (is.isInstanceOf(error[key], Error)) { + applyExceptionGroupFieldsForParentException(exception, exceptionId); + let newException = exceptionFromErrorImplementation(parser, error[key]), newExceptionId = newExceptions.length; + applyExceptionGroupFieldsForChildException(newException, key, newExceptionId, exceptionId), newExceptions = aggregateExceptionsFromError( + exceptionFromErrorImplementation, + parser, + limit, + error[key], + key, + [newException, ...newExceptions], + newException, + newExceptionId + ); + } + return Array.isArray(error.errors) && error.errors.forEach((childError, i) => { + if (is.isInstanceOf(childError, Error)) { + applyExceptionGroupFieldsForParentException(exception, exceptionId); + let newException = exceptionFromErrorImplementation(parser, childError), newExceptionId = newExceptions.length; + applyExceptionGroupFieldsForChildException(newException, `errors[${i}]`, newExceptionId, exceptionId), newExceptions = aggregateExceptionsFromError( + exceptionFromErrorImplementation, + parser, + limit, + childError, + key, + [newException, ...newExceptions], + newException, + newExceptionId + ); + } + }), newExceptions; + } + function applyExceptionGroupFieldsForParentException(exception, exceptionId) { + exception.mechanism = exception.mechanism || { type: "generic", handled: !0 }, exception.mechanism = { + ...exception.mechanism, + ...exception.type === "AggregateError" && { is_exception_group: !0 }, + exception_id: exceptionId + }; + } + function applyExceptionGroupFieldsForChildException(exception, source, exceptionId, parentId) { + exception.mechanism = exception.mechanism || { type: "generic", handled: !0 }, exception.mechanism = { + ...exception.mechanism, + type: "chained", + source, + exception_id: exceptionId, + parent_id: parentId + }; + } + function truncateAggregateExceptions(exceptions, maxValueLength) { + return exceptions.map((exception) => (exception.value && (exception.value = string.truncate(exception.value, maxValueLength)), exception)); + } + exports.applyAggregateErrorsToEvent = applyAggregateErrorsToEvent; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/array.js +var require_array = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/array.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function flatten(input) { + let result = [], flattenHelper = (input2) => { + input2.forEach((el) => { + Array.isArray(el) ? flattenHelper(el) : result.push(el); + }); + }; + return flattenHelper(input), result; + } + exports.flatten = flatten; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/version.js +var require_version = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/version.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var SDK_VERSION = "8.9.2"; + exports.SDK_VERSION = SDK_VERSION; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/worldwide.js +var require_worldwide = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/worldwide.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var version = require_version(), GLOBAL_OBJ = globalThis; + function getGlobalSingleton(name, creator, obj) { + let gbl = obj || GLOBAL_OBJ, __SENTRY__ = gbl.__SENTRY__ = gbl.__SENTRY__ || {}, versionedCarrier = __SENTRY__[version.SDK_VERSION] = __SENTRY__[version.SDK_VERSION] || {}; + return versionedCarrier[name] || (versionedCarrier[name] = creator()); + } + exports.GLOBAL_OBJ = GLOBAL_OBJ; + exports.getGlobalSingleton = getGlobalSingleton; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/browser.js +var require_browser = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/browser.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var is = require_is(), worldwide = require_worldwide(), WINDOW = worldwide.GLOBAL_OBJ, DEFAULT_MAX_STRING_LENGTH = 80; + function htmlTreeAsString(elem, options = {}) { + if (!elem) + return ""; + try { + let currentElem = elem, MAX_TRAVERSE_HEIGHT = 5, out = [], height = 0, len = 0, separator = " > ", sepLength = separator.length, nextStr, keyAttrs = Array.isArray(options) ? options : options.keyAttrs, maxStringLength = !Array.isArray(options) && options.maxStringLength || DEFAULT_MAX_STRING_LENGTH; + for (; currentElem && height++ < MAX_TRAVERSE_HEIGHT && (nextStr = _htmlElementAsString(currentElem, keyAttrs), !(nextStr === "html" || height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength)); ) + out.push(nextStr), len += nextStr.length, currentElem = currentElem.parentNode; + return out.reverse().join(separator); + } catch { + return ""; + } + } + function _htmlElementAsString(el, keyAttrs) { + let elem = el, out = [], className, classes, key, attr, i; + if (!elem || !elem.tagName) + return ""; + if (WINDOW.HTMLElement && elem instanceof HTMLElement && elem.dataset) { + if (elem.dataset.sentryComponent) + return elem.dataset.sentryComponent; + if (elem.dataset.sentryElement) + return elem.dataset.sentryElement; + } + out.push(elem.tagName.toLowerCase()); + let keyAttrPairs = keyAttrs && keyAttrs.length ? keyAttrs.filter((keyAttr) => elem.getAttribute(keyAttr)).map((keyAttr) => [keyAttr, elem.getAttribute(keyAttr)]) : null; + if (keyAttrPairs && keyAttrPairs.length) + keyAttrPairs.forEach((keyAttrPair) => { + out.push(`[${keyAttrPair[0]}="${keyAttrPair[1]}"]`); + }); + else if (elem.id && out.push(`#${elem.id}`), className = elem.className, className && is.isString(className)) + for (classes = className.split(/\s+/), i = 0; i < classes.length; i++) + out.push(`.${classes[i]}`); + let allowedAttrs = ["aria-label", "type", "name", "title", "alt"]; + for (i = 0; i < allowedAttrs.length; i++) + key = allowedAttrs[i], attr = elem.getAttribute(key), attr && out.push(`[${key}="${attr}"]`); + return out.join(""); + } + function getLocationHref() { + try { + return WINDOW.document.location.href; + } catch { + return ""; + } + } + function getDomElement(selector) { + return WINDOW.document && WINDOW.document.querySelector ? WINDOW.document.querySelector(selector) : null; + } + function getComponentName(elem) { + if (!WINDOW.HTMLElement) + return null; + let currentElem = elem, MAX_TRAVERSE_HEIGHT = 5; + for (let i = 0; i < MAX_TRAVERSE_HEIGHT; i++) { + if (!currentElem) + return null; + if (currentElem instanceof HTMLElement) { + if (currentElem.dataset.sentryComponent) + return currentElem.dataset.sentryComponent; + if (currentElem.dataset.sentryElement) + return currentElem.dataset.sentryElement; + } + currentElem = currentElem.parentNode; + } + return null; + } + exports.getComponentName = getComponentName; + exports.getDomElement = getDomElement; + exports.getLocationHref = getLocationHref; + exports.htmlTreeAsString = htmlTreeAsString; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/debug-build.js +var require_debug_build = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/debug-build.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var DEBUG_BUILD = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__; + exports.DEBUG_BUILD = DEBUG_BUILD; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/logger.js +var require_logger = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/logger.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var debugBuild = require_debug_build(), worldwide = require_worldwide(), PREFIX = "Sentry Logger ", CONSOLE_LEVELS = [ + "debug", + "info", + "warn", + "error", + "log", + "assert", + "trace" + ], originalConsoleMethods = {}; + function consoleSandbox(callback) { + if (!("console" in worldwide.GLOBAL_OBJ)) + return callback(); + let console2 = worldwide.GLOBAL_OBJ.console, wrappedFuncs = {}, wrappedLevels = Object.keys(originalConsoleMethods); + wrappedLevels.forEach((level) => { + let originalConsoleMethod = originalConsoleMethods[level]; + wrappedFuncs[level] = console2[level], console2[level] = originalConsoleMethod; + }); + try { + return callback(); + } finally { + wrappedLevels.forEach((level) => { + console2[level] = wrappedFuncs[level]; + }); + } + } + function makeLogger() { + let enabled = !1, logger2 = { + enable: () => { + enabled = !0; + }, + disable: () => { + enabled = !1; + }, + isEnabled: () => enabled + }; + return debugBuild.DEBUG_BUILD ? CONSOLE_LEVELS.forEach((name) => { + logger2[name] = (...args) => { + enabled && consoleSandbox(() => { + worldwide.GLOBAL_OBJ.console[name](`${PREFIX}[${name}]:`, ...args); + }); + }; + }) : CONSOLE_LEVELS.forEach((name) => { + logger2[name] = () => { + }; + }), logger2; + } + var logger = makeLogger(); + exports.CONSOLE_LEVELS = CONSOLE_LEVELS; + exports.consoleSandbox = consoleSandbox; + exports.logger = logger; + exports.originalConsoleMethods = originalConsoleMethods; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/dsn.js +var require_dsn = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/dsn.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var debugBuild = require_debug_build(), logger = require_logger(), DSN_REGEX = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/; + function isValidProtocol(protocol) { + return protocol === "http" || protocol === "https"; + } + function dsnToString(dsn, withPassword = !1) { + let { host, path, pass, port, projectId, protocol, publicKey } = dsn; + return `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ""}@${host}${port ? `:${port}` : ""}/${path && `${path}/`}${projectId}`; + } + function dsnFromString(str) { + let match = DSN_REGEX.exec(str); + if (!match) { + logger.consoleSandbox(() => { + console.error(`Invalid Sentry Dsn: ${str}`); + }); + return; + } + let [protocol, publicKey, pass = "", host, port = "", lastPath] = match.slice(1), path = "", projectId = lastPath, split = projectId.split("/"); + if (split.length > 1 && (path = split.slice(0, -1).join("/"), projectId = split.pop()), projectId) { + let projectMatch = projectId.match(/^\d+/); + projectMatch && (projectId = projectMatch[0]); + } + return dsnFromComponents({ host, pass, path, projectId, port, protocol, publicKey }); + } + function dsnFromComponents(components) { + return { + protocol: components.protocol, + publicKey: components.publicKey || "", + pass: components.pass || "", + host: components.host, + port: components.port || "", + path: components.path || "", + projectId: components.projectId + }; + } + function validateDsn(dsn) { + if (!debugBuild.DEBUG_BUILD) + return !0; + let { port, projectId, protocol } = dsn; + return ["protocol", "publicKey", "host", "projectId"].find((component) => dsn[component] ? !1 : (logger.logger.error(`Invalid Sentry Dsn: ${component} missing`), !0)) ? !1 : projectId.match(/^\d+$/) ? isValidProtocol(protocol) ? port && isNaN(parseInt(port, 10)) ? (logger.logger.error(`Invalid Sentry Dsn: Invalid port ${port}`), !1) : !0 : (logger.logger.error(`Invalid Sentry Dsn: Invalid protocol ${protocol}`), !1) : (logger.logger.error(`Invalid Sentry Dsn: Invalid projectId ${projectId}`), !1); + } + function makeDsn(from) { + let components = typeof from == "string" ? dsnFromString(from) : dsnFromComponents(from); + if (!(!components || !validateDsn(components))) + return components; + } + exports.dsnFromString = dsnFromString; + exports.dsnToString = dsnToString; + exports.makeDsn = makeDsn; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/error.js +var require_error = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/error.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var SentryError = class extends Error { + /** Display name of this error instance. */ + constructor(message, logLevel = "warn") { + super(message), this.message = message, this.name = new.target.prototype.constructor.name, Object.setPrototypeOf(this, new.target.prototype), this.logLevel = logLevel; + } + }; + exports.SentryError = SentryError; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/object.js +var require_object = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/object.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var browser = require_browser(), debugBuild = require_debug_build(), is = require_is(), logger = require_logger(), string = require_string(); + function fill(source, name, replacementFactory) { + if (!(name in source)) + return; + let original = source[name], wrapped = replacementFactory(original); + typeof wrapped == "function" && markFunctionWrapped(wrapped, original), source[name] = wrapped; + } + function addNonEnumerableProperty(obj, name, value) { + try { + Object.defineProperty(obj, name, { + // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it + value, + writable: !0, + configurable: !0 + }); + } catch { + debugBuild.DEBUG_BUILD && logger.logger.log(`Failed to add non-enumerable property "${name}" to object`, obj); + } + } + function markFunctionWrapped(wrapped, original) { + try { + let proto = original.prototype || {}; + wrapped.prototype = original.prototype = proto, addNonEnumerableProperty(wrapped, "__sentry_original__", original); + } catch { + } + } + function getOriginalFunction(func) { + return func.__sentry_original__; + } + function urlEncode(object) { + return Object.keys(object).map((key) => `${encodeURIComponent(key)}=${encodeURIComponent(object[key])}`).join("&"); + } + function convertToPlainObject(value) { + if (is.isError(value)) + return { + message: value.message, + name: value.name, + stack: value.stack, + ...getOwnProperties(value) + }; + if (is.isEvent(value)) { + let newObj = { + type: value.type, + target: serializeEventTarget(value.target), + currentTarget: serializeEventTarget(value.currentTarget), + ...getOwnProperties(value) + }; + return typeof CustomEvent < "u" && is.isInstanceOf(value, CustomEvent) && (newObj.detail = value.detail), newObj; + } else + return value; + } + function serializeEventTarget(target) { + try { + return is.isElement(target) ? browser.htmlTreeAsString(target) : Object.prototype.toString.call(target); + } catch { + return ""; + } + } + function getOwnProperties(obj) { + if (typeof obj == "object" && obj !== null) { + let extractedProps = {}; + for (let property in obj) + Object.prototype.hasOwnProperty.call(obj, property) && (extractedProps[property] = obj[property]); + return extractedProps; + } else + return {}; + } + function extractExceptionKeysForMessage(exception, maxLength = 40) { + let keys = Object.keys(convertToPlainObject(exception)); + if (keys.sort(), !keys.length) + return "[object has no keys]"; + if (keys[0].length >= maxLength) + return string.truncate(keys[0], maxLength); + for (let includedKeys = keys.length; includedKeys > 0; includedKeys--) { + let serialized = keys.slice(0, includedKeys).join(", "); + if (!(serialized.length > maxLength)) + return includedKeys === keys.length ? serialized : string.truncate(serialized, maxLength); + } + return ""; + } + function dropUndefinedKeys(inputValue) { + return _dropUndefinedKeys(inputValue, /* @__PURE__ */ new Map()); + } + function _dropUndefinedKeys(inputValue, memoizationMap) { + if (isPojo(inputValue)) { + let memoVal = memoizationMap.get(inputValue); + if (memoVal !== void 0) + return memoVal; + let returnValue = {}; + memoizationMap.set(inputValue, returnValue); + for (let key of Object.keys(inputValue)) + typeof inputValue[key] < "u" && (returnValue[key] = _dropUndefinedKeys(inputValue[key], memoizationMap)); + return returnValue; + } + if (Array.isArray(inputValue)) { + let memoVal = memoizationMap.get(inputValue); + if (memoVal !== void 0) + return memoVal; + let returnValue = []; + return memoizationMap.set(inputValue, returnValue), inputValue.forEach((item) => { + returnValue.push(_dropUndefinedKeys(item, memoizationMap)); + }), returnValue; + } + return inputValue; + } + function isPojo(input) { + if (!is.isPlainObject(input)) + return !1; + try { + let name = Object.getPrototypeOf(input).constructor.name; + return !name || name === "Object"; + } catch { + return !0; + } + } + function objectify(wat) { + let objectified; + switch (!0) { + case wat == null: + objectified = new String(wat); + break; + // Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason + // those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as + // an object in order to wrap it. + case (typeof wat == "symbol" || typeof wat == "bigint"): + objectified = Object(wat); + break; + // this will catch the remaining primitives: `String`, `Number`, and `Boolean` + case is.isPrimitive(wat): + objectified = new wat.constructor(wat); + break; + // by process of elimination, at this point we know that `wat` must already be an object + default: + objectified = wat; + break; + } + return objectified; + } + exports.addNonEnumerableProperty = addNonEnumerableProperty; + exports.convertToPlainObject = convertToPlainObject; + exports.dropUndefinedKeys = dropUndefinedKeys; + exports.extractExceptionKeysForMessage = extractExceptionKeysForMessage; + exports.fill = fill; + exports.getOriginalFunction = getOriginalFunction; + exports.markFunctionWrapped = markFunctionWrapped; + exports.objectify = objectify; + exports.urlEncode = urlEncode; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/stacktrace.js +var require_stacktrace = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/stacktrace.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var STACKTRACE_FRAME_LIMIT = 50, UNKNOWN_FUNCTION = "?", WEBPACK_ERROR_REGEXP = /\(error: (.*)\)/, STRIP_FRAME_REGEXP = /captureMessage|captureException/; + function createStackParser(...parsers) { + let sortedParsers = parsers.sort((a, b) => a[0] - b[0]).map((p) => p[1]); + return (stack, skipFirstLines = 0, framesToPop = 0) => { + let frames = [], lines = stack.split(` +`); + for (let i = skipFirstLines; i < lines.length; i++) { + let line = lines[i]; + if (line.length > 1024) + continue; + let cleanedLine = WEBPACK_ERROR_REGEXP.test(line) ? line.replace(WEBPACK_ERROR_REGEXP, "$1") : line; + if (!cleanedLine.match(/\S*Error: /)) { + for (let parser of sortedParsers) { + let frame = parser(cleanedLine); + if (frame) { + frames.push(frame); + break; + } + } + if (frames.length >= STACKTRACE_FRAME_LIMIT + framesToPop) + break; + } + } + return stripSentryFramesAndReverse(frames.slice(framesToPop)); + }; + } + function stackParserFromStackParserOptions(stackParser) { + return Array.isArray(stackParser) ? createStackParser(...stackParser) : stackParser; + } + function stripSentryFramesAndReverse(stack) { + if (!stack.length) + return []; + let localStack = Array.from(stack); + return /sentryWrapped/.test(localStack[localStack.length - 1].function || "") && localStack.pop(), localStack.reverse(), STRIP_FRAME_REGEXP.test(localStack[localStack.length - 1].function || "") && (localStack.pop(), STRIP_FRAME_REGEXP.test(localStack[localStack.length - 1].function || "") && localStack.pop()), localStack.slice(0, STACKTRACE_FRAME_LIMIT).map((frame) => ({ + ...frame, + filename: frame.filename || localStack[localStack.length - 1].filename, + function: frame.function || UNKNOWN_FUNCTION + })); + } + var defaultFunctionName = ""; + function getFunctionName(fn) { + try { + return !fn || typeof fn != "function" ? defaultFunctionName : fn.name || defaultFunctionName; + } catch { + return defaultFunctionName; + } + } + function getFramesFromEvent(event) { + let exception = event.exception; + if (exception) { + let frames = []; + try { + return exception.values.forEach((value) => { + value.stacktrace.frames && frames.push(...value.stacktrace.frames); + }), frames; + } catch { + return; + } + } + } + exports.UNKNOWN_FUNCTION = UNKNOWN_FUNCTION; + exports.createStackParser = createStackParser; + exports.getFramesFromEvent = getFramesFromEvent; + exports.getFunctionName = getFunctionName; + exports.stackParserFromStackParserOptions = stackParserFromStackParserOptions; + exports.stripSentryFramesAndReverse = stripSentryFramesAndReverse; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/handlers.js +var require_handlers = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/handlers.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var debugBuild = require_debug_build(), logger = require_logger(), stacktrace = require_stacktrace(), handlers = {}, instrumented = {}; + function addHandler(type, handler) { + handlers[type] = handlers[type] || [], handlers[type].push(handler); + } + function resetInstrumentationHandlers() { + Object.keys(handlers).forEach((key) => { + handlers[key] = void 0; + }); + } + function maybeInstrument(type, instrumentFn) { + instrumented[type] || (instrumentFn(), instrumented[type] = !0); + } + function triggerHandlers(type, data) { + let typeHandlers = type && handlers[type]; + if (typeHandlers) + for (let handler of typeHandlers) + try { + handler(data); + } catch (e) { + debugBuild.DEBUG_BUILD && logger.logger.error( + `Error while triggering instrumentation handler. +Type: ${type} +Name: ${stacktrace.getFunctionName(handler)} +Error:`, + e + ); + } + } + exports.addHandler = addHandler; + exports.maybeInstrument = maybeInstrument; + exports.resetInstrumentationHandlers = resetInstrumentationHandlers; + exports.triggerHandlers = triggerHandlers; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/console.js +var require_console = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/console.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var logger = require_logger(), object = require_object(), worldwide = require_worldwide(), handlers = require_handlers(); + function addConsoleInstrumentationHandler(handler) { + let type = "console"; + handlers.addHandler(type, handler), handlers.maybeInstrument(type, instrumentConsole); + } + function instrumentConsole() { + "console" in worldwide.GLOBAL_OBJ && logger.CONSOLE_LEVELS.forEach(function(level) { + level in worldwide.GLOBAL_OBJ.console && object.fill(worldwide.GLOBAL_OBJ.console, level, function(originalConsoleMethod) { + return logger.originalConsoleMethods[level] = originalConsoleMethod, function(...args) { + let handlerData = { args, level }; + handlers.triggerHandlers("console", handlerData); + let log = logger.originalConsoleMethods[level]; + log && log.apply(worldwide.GLOBAL_OBJ.console, args); + }; + }); + }); + } + exports.addConsoleInstrumentationHandler = addConsoleInstrumentationHandler; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/supports.js +var require_supports = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/supports.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var debugBuild = require_debug_build(), logger = require_logger(), worldwide = require_worldwide(), WINDOW = worldwide.GLOBAL_OBJ; + function supportsErrorEvent() { + try { + return new ErrorEvent(""), !0; + } catch { + return !1; + } + } + function supportsDOMError() { + try { + return new DOMError(""), !0; + } catch { + return !1; + } + } + function supportsDOMException() { + try { + return new DOMException(""), !0; + } catch { + return !1; + } + } + function supportsFetch() { + if (!("fetch" in WINDOW)) + return !1; + try { + return new Headers(), new Request("http://www.example.com"), new Response(), !0; + } catch { + return !1; + } + } + function isNativeFunction(func) { + return func && /^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(func.toString()); + } + function supportsNativeFetch() { + if (typeof EdgeRuntime == "string") + return !0; + if (!supportsFetch()) + return !1; + if (isNativeFunction(WINDOW.fetch)) + return !0; + let result = !1, doc = WINDOW.document; + if (doc && typeof doc.createElement == "function") + try { + let sandbox = doc.createElement("iframe"); + sandbox.hidden = !0, doc.head.appendChild(sandbox), sandbox.contentWindow && sandbox.contentWindow.fetch && (result = isNativeFunction(sandbox.contentWindow.fetch)), doc.head.removeChild(sandbox); + } catch (err) { + debugBuild.DEBUG_BUILD && logger.logger.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ", err); + } + return result; + } + function supportsReportingObserver() { + return "ReportingObserver" in WINDOW; + } + function supportsReferrerPolicy() { + if (!supportsFetch()) + return !1; + try { + return new Request("_", { + referrerPolicy: "origin" + }), !0; + } catch { + return !1; + } + } + exports.isNativeFunction = isNativeFunction; + exports.supportsDOMError = supportsDOMError; + exports.supportsDOMException = supportsDOMException; + exports.supportsErrorEvent = supportsErrorEvent; + exports.supportsFetch = supportsFetch; + exports.supportsNativeFetch = supportsNativeFetch; + exports.supportsReferrerPolicy = supportsReferrerPolicy; + exports.supportsReportingObserver = supportsReportingObserver; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/time.js +var require_time = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/time.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var worldwide = require_worldwide(), ONE_SECOND_IN_MS = 1e3; + function dateTimestampInSeconds() { + return Date.now() / ONE_SECOND_IN_MS; + } + function createUnixTimestampInSecondsFunc() { + let { performance } = worldwide.GLOBAL_OBJ; + if (!performance || !performance.now) + return dateTimestampInSeconds; + let approxStartingTimeOrigin = Date.now() - performance.now(), timeOrigin = performance.timeOrigin == null ? approxStartingTimeOrigin : performance.timeOrigin; + return () => (timeOrigin + performance.now()) / ONE_SECOND_IN_MS; + } + var timestampInSeconds = createUnixTimestampInSecondsFunc(); + exports._browserPerformanceTimeOriginMode = void 0; + var browserPerformanceTimeOrigin = (() => { + let { performance } = worldwide.GLOBAL_OBJ; + if (!performance || !performance.now) { + exports._browserPerformanceTimeOriginMode = "none"; + return; + } + let threshold = 3600 * 1e3, performanceNow = performance.now(), dateNow = Date.now(), timeOriginDelta = performance.timeOrigin ? Math.abs(performance.timeOrigin + performanceNow - dateNow) : threshold, timeOriginIsReliable = timeOriginDelta < threshold, navigationStart = performance.timing && performance.timing.navigationStart, navigationStartDelta = typeof navigationStart == "number" ? Math.abs(navigationStart + performanceNow - dateNow) : threshold, navigationStartIsReliable = navigationStartDelta < threshold; + return timeOriginIsReliable || navigationStartIsReliable ? timeOriginDelta <= navigationStartDelta ? (exports._browserPerformanceTimeOriginMode = "timeOrigin", performance.timeOrigin) : (exports._browserPerformanceTimeOriginMode = "navigationStart", navigationStart) : (exports._browserPerformanceTimeOriginMode = "dateNow", dateNow); + })(); + exports.browserPerformanceTimeOrigin = browserPerformanceTimeOrigin; + exports.dateTimestampInSeconds = dateTimestampInSeconds; + exports.timestampInSeconds = timestampInSeconds; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/fetch.js +var require_fetch = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/fetch.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var is = require_is(), object = require_object(), supports = require_supports(), time = require_time(), worldwide = require_worldwide(), handlers = require_handlers(); + function addFetchInstrumentationHandler(handler) { + let type = "fetch"; + handlers.addHandler(type, handler), handlers.maybeInstrument(type, instrumentFetch); + } + function instrumentFetch() { + supports.supportsNativeFetch() && object.fill(worldwide.GLOBAL_OBJ, "fetch", function(originalFetch) { + return function(...args) { + let { method, url } = parseFetchArgs(args), handlerData = { + args, + fetchData: { + method, + url + }, + startTimestamp: time.timestampInSeconds() * 1e3 + }; + handlers.triggerHandlers("fetch", { + ...handlerData + }); + let virtualStackTrace = new Error().stack; + return originalFetch.apply(worldwide.GLOBAL_OBJ, args).then( + (response) => { + let finishedHandlerData = { + ...handlerData, + endTimestamp: time.timestampInSeconds() * 1e3, + response + }; + return handlers.triggerHandlers("fetch", finishedHandlerData), response; + }, + (error) => { + let erroredHandlerData = { + ...handlerData, + endTimestamp: time.timestampInSeconds() * 1e3, + error + }; + throw handlers.triggerHandlers("fetch", erroredHandlerData), is.isError(error) && error.stack === void 0 && (error.stack = virtualStackTrace, object.addNonEnumerableProperty(error, "framesToPop", 1)), error; + } + ); + }; + }); + } + function hasProp(obj, prop) { + return !!obj && typeof obj == "object" && !!obj[prop]; + } + function getUrlFromResource(resource) { + return typeof resource == "string" ? resource : resource ? hasProp(resource, "url") ? resource.url : resource.toString ? resource.toString() : "" : ""; + } + function parseFetchArgs(fetchArgs) { + if (fetchArgs.length === 0) + return { method: "GET", url: "" }; + if (fetchArgs.length === 2) { + let [url, options] = fetchArgs; + return { + url: getUrlFromResource(url), + method: hasProp(options, "method") ? String(options.method).toUpperCase() : "GET" + }; + } + let arg = fetchArgs[0]; + return { + url: getUrlFromResource(arg), + method: hasProp(arg, "method") ? String(arg.method).toUpperCase() : "GET" + }; + } + exports.addFetchInstrumentationHandler = addFetchInstrumentationHandler; + exports.parseFetchArgs = parseFetchArgs; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/globalError.js +var require_globalError = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/globalError.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var worldwide = require_worldwide(), handlers = require_handlers(), _oldOnErrorHandler = null; + function addGlobalErrorInstrumentationHandler(handler) { + let type = "error"; + handlers.addHandler(type, handler), handlers.maybeInstrument(type, instrumentError); + } + function instrumentError() { + _oldOnErrorHandler = worldwide.GLOBAL_OBJ.onerror, worldwide.GLOBAL_OBJ.onerror = function(msg, url, line, column, error) { + let handlerData = { + column, + error, + line, + msg, + url + }; + return handlers.triggerHandlers("error", handlerData), _oldOnErrorHandler && !_oldOnErrorHandler.__SENTRY_LOADER__ ? _oldOnErrorHandler.apply(this, arguments) : !1; + }, worldwide.GLOBAL_OBJ.onerror.__SENTRY_INSTRUMENTED__ = !0; + } + exports.addGlobalErrorInstrumentationHandler = addGlobalErrorInstrumentationHandler; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/globalUnhandledRejection.js +var require_globalUnhandledRejection = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/globalUnhandledRejection.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var worldwide = require_worldwide(), handlers = require_handlers(), _oldOnUnhandledRejectionHandler = null; + function addGlobalUnhandledRejectionInstrumentationHandler(handler) { + let type = "unhandledrejection"; + handlers.addHandler(type, handler), handlers.maybeInstrument(type, instrumentUnhandledRejection); + } + function instrumentUnhandledRejection() { + _oldOnUnhandledRejectionHandler = worldwide.GLOBAL_OBJ.onunhandledrejection, worldwide.GLOBAL_OBJ.onunhandledrejection = function(e) { + let handlerData = e; + return handlers.triggerHandlers("unhandledrejection", handlerData), _oldOnUnhandledRejectionHandler && !_oldOnUnhandledRejectionHandler.__SENTRY_LOADER__ ? _oldOnUnhandledRejectionHandler.apply(this, arguments) : !0; + }, worldwide.GLOBAL_OBJ.onunhandledrejection.__SENTRY_INSTRUMENTED__ = !0; + } + exports.addGlobalUnhandledRejectionInstrumentationHandler = addGlobalUnhandledRejectionInstrumentationHandler; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/env.js +var require_env = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/env.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function isBrowserBundle() { + return typeof __SENTRY_BROWSER_BUNDLE__ < "u" && !!__SENTRY_BROWSER_BUNDLE__; + } + function getSDKSource() { + return "npm"; + } + exports.getSDKSource = getSDKSource; + exports.isBrowserBundle = isBrowserBundle; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/node.js +var require_node = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/node.js"(exports, module) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var env = require_env(); + function isNodeEnv() { + return !env.isBrowserBundle() && Object.prototype.toString.call(typeof process < "u" ? process : 0) === "[object process]"; + } + function dynamicRequire(mod, request) { + return mod.require(request); + } + function loadModule(moduleName) { + let mod; + try { + mod = dynamicRequire(module, moduleName); + } catch { + } + try { + let { cwd } = dynamicRequire(module, "process"); + mod = dynamicRequire(module, `${cwd()}/node_modules/${moduleName}`); + } catch { + } + return mod; + } + exports.dynamicRequire = dynamicRequire; + exports.isNodeEnv = isNodeEnv; + exports.loadModule = loadModule; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/isBrowser.js +var require_isBrowser = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/isBrowser.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var node = require_node(), worldwide = require_worldwide(); + function isBrowser() { + return typeof window < "u" && (!node.isNodeEnv() || isElectronNodeRenderer()); + } + function isElectronNodeRenderer() { + return ( + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any + worldwide.GLOBAL_OBJ.process !== void 0 && worldwide.GLOBAL_OBJ.process.type === "renderer" + ); + } + exports.isBrowser = isBrowser; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/memo.js +var require_memo = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/memo.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function memoBuilder() { + let hasWeakSet = typeof WeakSet == "function", inner = hasWeakSet ? /* @__PURE__ */ new WeakSet() : []; + function memoize(obj) { + if (hasWeakSet) + return inner.has(obj) ? !0 : (inner.add(obj), !1); + for (let i = 0; i < inner.length; i++) + if (inner[i] === obj) + return !0; + return inner.push(obj), !1; + } + function unmemoize(obj) { + if (hasWeakSet) + inner.delete(obj); + else + for (let i = 0; i < inner.length; i++) + if (inner[i] === obj) { + inner.splice(i, 1); + break; + } + } + return [memoize, unmemoize]; + } + exports.memoBuilder = memoBuilder; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/misc.js +var require_misc = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/misc.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var object = require_object(), string = require_string(), worldwide = require_worldwide(); + function uuid4() { + let gbl = worldwide.GLOBAL_OBJ, crypto2 = gbl.crypto || gbl.msCrypto, getRandomByte = () => Math.random() * 16; + try { + if (crypto2 && crypto2.randomUUID) + return crypto2.randomUUID().replace(/-/g, ""); + crypto2 && crypto2.getRandomValues && (getRandomByte = () => { + let typedArray = new Uint8Array(1); + return crypto2.getRandomValues(typedArray), typedArray[0]; + }); + } catch { + } + return ("10000000100040008000" + 1e11).replace( + /[018]/g, + (c) => ( + // eslint-disable-next-line no-bitwise + (c ^ (getRandomByte() & 15) >> c / 4).toString(16) + ) + ); + } + function getFirstException(event) { + return event.exception && event.exception.values ? event.exception.values[0] : void 0; + } + function getEventDescription(event) { + let { message, event_id: eventId } = event; + if (message) + return message; + let firstException = getFirstException(event); + return firstException ? firstException.type && firstException.value ? `${firstException.type}: ${firstException.value}` : firstException.type || firstException.value || eventId || "" : eventId || ""; + } + function addExceptionTypeValue(event, value, type) { + let exception = event.exception = event.exception || {}, values = exception.values = exception.values || [], firstException = values[0] = values[0] || {}; + firstException.value || (firstException.value = value || ""), firstException.type || (firstException.type = type || "Error"); + } + function addExceptionMechanism(event, newMechanism) { + let firstException = getFirstException(event); + if (!firstException) + return; + let defaultMechanism = { type: "generic", handled: !0 }, currentMechanism = firstException.mechanism; + if (firstException.mechanism = { ...defaultMechanism, ...currentMechanism, ...newMechanism }, newMechanism && "data" in newMechanism) { + let mergedData = { ...currentMechanism && currentMechanism.data, ...newMechanism.data }; + firstException.mechanism.data = mergedData; + } + } + var SEMVER_REGEXP = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/; + function parseSemver(input) { + let match = input.match(SEMVER_REGEXP) || [], major = parseInt(match[1], 10), minor = parseInt(match[2], 10), patch = parseInt(match[3], 10); + return { + buildmetadata: match[5], + major: isNaN(major) ? void 0 : major, + minor: isNaN(minor) ? void 0 : minor, + patch: isNaN(patch) ? void 0 : patch, + prerelease: match[4] + }; + } + function addContextToFrame(lines, frame, linesOfContext = 5) { + if (frame.lineno === void 0) + return; + let maxLines = lines.length, sourceLine = Math.max(Math.min(maxLines - 1, frame.lineno - 1), 0); + frame.pre_context = lines.slice(Math.max(0, sourceLine - linesOfContext), sourceLine).map((line) => string.snipLine(line, 0)), frame.context_line = string.snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0), frame.post_context = lines.slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext).map((line) => string.snipLine(line, 0)); + } + function checkOrSetAlreadyCaught(exception) { + if (exception && exception.__sentry_captured__) + return !0; + try { + object.addNonEnumerableProperty(exception, "__sentry_captured__", !0); + } catch { + } + return !1; + } + function arrayify(maybeArray) { + return Array.isArray(maybeArray) ? maybeArray : [maybeArray]; + } + exports.addContextToFrame = addContextToFrame; + exports.addExceptionMechanism = addExceptionMechanism; + exports.addExceptionTypeValue = addExceptionTypeValue; + exports.arrayify = arrayify; + exports.checkOrSetAlreadyCaught = checkOrSetAlreadyCaught; + exports.getEventDescription = getEventDescription; + exports.parseSemver = parseSemver; + exports.uuid4 = uuid4; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/normalize.js +var require_normalize = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/normalize.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var is = require_is(), memo = require_memo(), object = require_object(), stacktrace = require_stacktrace(); + function normalize(input, depth = 100, maxProperties = 1 / 0) { + try { + return visit("", input, depth, maxProperties); + } catch (err) { + return { ERROR: `**non-serializable** (${err})` }; + } + } + function normalizeToSize(object2, depth = 3, maxSize = 100 * 1024) { + let normalized = normalize(object2, depth); + return jsonSize(normalized) > maxSize ? normalizeToSize(object2, depth - 1, maxSize) : normalized; + } + function visit(key, value, depth = 1 / 0, maxProperties = 1 / 0, memo$1 = memo.memoBuilder()) { + let [memoize, unmemoize] = memo$1; + if (value == null || // this matches null and undefined -> eqeq not eqeqeq + ["number", "boolean", "string"].includes(typeof value) && !Number.isNaN(value)) + return value; + let stringified = stringifyValue(key, value); + if (!stringified.startsWith("[object ")) + return stringified; + if (value.__sentry_skip_normalization__) + return value; + let remainingDepth = typeof value.__sentry_override_normalization_depth__ == "number" ? value.__sentry_override_normalization_depth__ : depth; + if (remainingDepth === 0) + return stringified.replace("object ", ""); + if (memoize(value)) + return "[Circular ~]"; + let valueWithToJSON = value; + if (valueWithToJSON && typeof valueWithToJSON.toJSON == "function") + try { + let jsonValue = valueWithToJSON.toJSON(); + return visit("", jsonValue, remainingDepth - 1, maxProperties, memo$1); + } catch { + } + let normalized = Array.isArray(value) ? [] : {}, numAdded = 0, visitable = object.convertToPlainObject(value); + for (let visitKey in visitable) { + if (!Object.prototype.hasOwnProperty.call(visitable, visitKey)) + continue; + if (numAdded >= maxProperties) { + normalized[visitKey] = "[MaxProperties ~]"; + break; + } + let visitValue = visitable[visitKey]; + normalized[visitKey] = visit(visitKey, visitValue, remainingDepth - 1, maxProperties, memo$1), numAdded++; + } + return unmemoize(value), normalized; + } + function stringifyValue(key, value) { + try { + if (key === "domain" && value && typeof value == "object" && value._events) + return "[Domain]"; + if (key === "domainEmitter") + return "[DomainEmitter]"; + if (typeof global < "u" && value === global) + return "[Global]"; + if (typeof window < "u" && value === window) + return "[Window]"; + if (typeof document < "u" && value === document) + return "[Document]"; + if (is.isVueViewModel(value)) + return "[VueViewModel]"; + if (is.isSyntheticEvent(value)) + return "[SyntheticEvent]"; + if (typeof value == "number" && value !== value) + return "[NaN]"; + if (typeof value == "function") + return `[Function: ${stacktrace.getFunctionName(value)}]`; + if (typeof value == "symbol") + return `[${String(value)}]`; + if (typeof value == "bigint") + return `[BigInt: ${String(value)}]`; + let objName = getConstructorName(value); + return /^HTML(\w*)Element$/.test(objName) ? `[HTMLElement: ${objName}]` : `[object ${objName}]`; + } catch (err) { + return `**non-serializable** (${err})`; + } + } + function getConstructorName(value) { + let prototype = Object.getPrototypeOf(value); + return prototype ? prototype.constructor.name : "null prototype"; + } + function utf8Length(value) { + return ~-encodeURI(value).split(/%..|./).length; + } + function jsonSize(value) { + return utf8Length(JSON.stringify(value)); + } + function normalizeUrlToBase(url, basePath) { + let escapedBase = basePath.replace(/\\/g, "/").replace(/[|\\{}()[\]^$+*?.]/g, "\\$&"), newUrl = url; + try { + newUrl = decodeURI(url); + } catch { + } + return newUrl.replace(/\\/g, "/").replace(/webpack:\/?/g, "").replace(new RegExp(`(file://)?/*${escapedBase}/*`, "ig"), "app:///"); + } + exports.normalize = normalize; + exports.normalizeToSize = normalizeToSize; + exports.normalizeUrlToBase = normalizeUrlToBase; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/path.js +var require_path = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/path.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function normalizeArray(parts, allowAboveRoot) { + let up = 0; + for (let i = parts.length - 1; i >= 0; i--) { + let last = parts[i]; + last === "." ? parts.splice(i, 1) : last === ".." ? (parts.splice(i, 1), up++) : up && (parts.splice(i, 1), up--); + } + if (allowAboveRoot) + for (; up--; up) + parts.unshift(".."); + return parts; + } + var splitPathRe = /^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/; + function splitPath(filename) { + let truncated = filename.length > 1024 ? `${filename.slice(-1024)}` : filename, parts = splitPathRe.exec(truncated); + return parts ? parts.slice(1) : []; + } + function resolve(...args) { + let resolvedPath = "", resolvedAbsolute = !1; + for (let i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) { + let path = i >= 0 ? args[i] : "/"; + path && (resolvedPath = `${path}/${resolvedPath}`, resolvedAbsolute = path.charAt(0) === "/"); + } + return resolvedPath = normalizeArray( + resolvedPath.split("/").filter((p) => !!p), + !resolvedAbsolute + ).join("/"), (resolvedAbsolute ? "/" : "") + resolvedPath || "."; + } + function trim(arr) { + let start = 0; + for (; start < arr.length && arr[start] === ""; start++) + ; + let end = arr.length - 1; + for (; end >= 0 && arr[end] === ""; end--) + ; + return start > end ? [] : arr.slice(start, end - start + 1); + } + function relative(from, to) { + from = resolve(from).slice(1), to = resolve(to).slice(1); + let fromParts = trim(from.split("/")), toParts = trim(to.split("/")), length = Math.min(fromParts.length, toParts.length), samePartsLength = length; + for (let i = 0; i < length; i++) + if (fromParts[i] !== toParts[i]) { + samePartsLength = i; + break; + } + let outputParts = []; + for (let i = samePartsLength; i < fromParts.length; i++) + outputParts.push(".."); + return outputParts = outputParts.concat(toParts.slice(samePartsLength)), outputParts.join("/"); + } + function normalizePath(path) { + let isPathAbsolute = isAbsolute(path), trailingSlash = path.slice(-1) === "/", normalizedPath = normalizeArray( + path.split("/").filter((p) => !!p), + !isPathAbsolute + ).join("/"); + return !normalizedPath && !isPathAbsolute && (normalizedPath = "."), normalizedPath && trailingSlash && (normalizedPath += "/"), (isPathAbsolute ? "/" : "") + normalizedPath; + } + function isAbsolute(path) { + return path.charAt(0) === "/"; + } + function join(...args) { + return normalizePath(args.join("/")); + } + function dirname(path) { + let result = splitPath(path), root = result[0], dir = result[1]; + return !root && !dir ? "." : (dir && (dir = dir.slice(0, dir.length - 1)), root + dir); + } + function basename(path, ext) { + let f = splitPath(path)[2]; + return ext && f.slice(ext.length * -1) === ext && (f = f.slice(0, f.length - ext.length)), f; + } + exports.basename = basename; + exports.dirname = dirname; + exports.isAbsolute = isAbsolute; + exports.join = join; + exports.normalizePath = normalizePath; + exports.relative = relative; + exports.resolve = resolve; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/syncpromise.js +var require_syncpromise = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/syncpromise.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var is = require_is(), States; + (function(States2) { + States2[States2.PENDING = 0] = "PENDING"; + let RESOLVED = 1; + States2[States2.RESOLVED = RESOLVED] = "RESOLVED"; + let REJECTED = 2; + States2[States2.REJECTED = REJECTED] = "REJECTED"; + })(States || (States = {})); + function resolvedSyncPromise(value) { + return new SyncPromise((resolve) => { + resolve(value); + }); + } + function rejectedSyncPromise(reason) { + return new SyncPromise((_, reject) => { + reject(reason); + }); + } + var SyncPromise = class _SyncPromise { + constructor(executor) { + _SyncPromise.prototype.__init.call(this), _SyncPromise.prototype.__init2.call(this), _SyncPromise.prototype.__init3.call(this), _SyncPromise.prototype.__init4.call(this), this._state = States.PENDING, this._handlers = []; + try { + executor(this._resolve, this._reject); + } catch (e) { + this._reject(e); + } + } + /** JSDoc */ + then(onfulfilled, onrejected) { + return new _SyncPromise((resolve, reject) => { + this._handlers.push([ + !1, + (result) => { + if (!onfulfilled) + resolve(result); + else + try { + resolve(onfulfilled(result)); + } catch (e) { + reject(e); + } + }, + (reason) => { + if (!onrejected) + reject(reason); + else + try { + resolve(onrejected(reason)); + } catch (e) { + reject(e); + } + } + ]), this._executeHandlers(); + }); + } + /** JSDoc */ + catch(onrejected) { + return this.then((val) => val, onrejected); + } + /** JSDoc */ + finally(onfinally) { + return new _SyncPromise((resolve, reject) => { + let val, isRejected; + return this.then( + (value) => { + isRejected = !1, val = value, onfinally && onfinally(); + }, + (reason) => { + isRejected = !0, val = reason, onfinally && onfinally(); + } + ).then(() => { + if (isRejected) { + reject(val); + return; + } + resolve(val); + }); + }); + } + /** JSDoc */ + __init() { + this._resolve = (value) => { + this._setResult(States.RESOLVED, value); + }; + } + /** JSDoc */ + __init2() { + this._reject = (reason) => { + this._setResult(States.REJECTED, reason); + }; + } + /** JSDoc */ + __init3() { + this._setResult = (state, value) => { + if (this._state === States.PENDING) { + if (is.isThenable(value)) { + value.then(this._resolve, this._reject); + return; + } + this._state = state, this._value = value, this._executeHandlers(); + } + }; + } + /** JSDoc */ + __init4() { + this._executeHandlers = () => { + if (this._state === States.PENDING) + return; + let cachedHandlers = this._handlers.slice(); + this._handlers = [], cachedHandlers.forEach((handler) => { + handler[0] || (this._state === States.RESOLVED && handler[1](this._value), this._state === States.REJECTED && handler[2](this._value), handler[0] = !0); + }); + }; + } + }; + exports.SyncPromise = SyncPromise; + exports.rejectedSyncPromise = rejectedSyncPromise; + exports.resolvedSyncPromise = resolvedSyncPromise; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/promisebuffer.js +var require_promisebuffer = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/promisebuffer.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var error = require_error(), syncpromise = require_syncpromise(); + function makePromiseBuffer(limit) { + let buffer = []; + function isReady() { + return limit === void 0 || buffer.length < limit; + } + function remove(task) { + return buffer.splice(buffer.indexOf(task), 1)[0]; + } + function add(taskProducer) { + if (!isReady()) + return syncpromise.rejectedSyncPromise(new error.SentryError("Not adding Promise because buffer limit was reached.")); + let task = taskProducer(); + return buffer.indexOf(task) === -1 && buffer.push(task), task.then(() => remove(task)).then( + null, + () => remove(task).then(null, () => { + }) + ), task; + } + function drain(timeout) { + return new syncpromise.SyncPromise((resolve, reject) => { + let counter = buffer.length; + if (!counter) + return resolve(!0); + let capturedSetTimeout = setTimeout(() => { + timeout && timeout > 0 && resolve(!1); + }, timeout); + buffer.forEach((item) => { + syncpromise.resolvedSyncPromise(item).then(() => { + --counter || (clearTimeout(capturedSetTimeout), resolve(!0)); + }, reject); + }); + }); + } + return { + $: buffer, + add, + drain + }; + } + exports.makePromiseBuffer = makePromiseBuffer; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/cookie.js +var require_cookie = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/cookie.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function parseCookie(str) { + let obj = {}, index = 0; + for (; index < str.length; ) { + let eqIdx = str.indexOf("=", index); + if (eqIdx === -1) + break; + let endIdx = str.indexOf(";", index); + if (endIdx === -1) + endIdx = str.length; + else if (endIdx < eqIdx) { + index = str.lastIndexOf(";", eqIdx - 1) + 1; + continue; + } + let key = str.slice(index, eqIdx).trim(); + if (obj[key] === void 0) { + let val = str.slice(eqIdx + 1, endIdx).trim(); + val.charCodeAt(0) === 34 && (val = val.slice(1, -1)); + try { + obj[key] = val.indexOf("%") !== -1 ? decodeURIComponent(val) : val; + } catch { + obj[key] = val; + } + } + index = endIdx + 1; + } + return obj; + } + exports.parseCookie = parseCookie; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/url.js +var require_url = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/url.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function parseUrl(url) { + if (!url) + return {}; + let match = url.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/); + if (!match) + return {}; + let query = match[6] || "", fragment = match[8] || ""; + return { + host: match[4], + path: match[5], + protocol: match[2], + search: query, + hash: fragment, + relative: match[5] + query + fragment + // everything minus origin + }; + } + function stripUrlQueryAndFragment(urlPath) { + return urlPath.split(/[\?#]/, 1)[0]; + } + function getNumberOfUrlSegments(url) { + return url.split(/\\?\//).filter((s) => s.length > 0 && s !== ",").length; + } + function getSanitizedUrlString(url) { + let { protocol, host, path } = url, filteredHost = host && host.replace(/^.*@/, "[filtered]:[filtered]@").replace(/(:80)$/, "").replace(/(:443)$/, "") || ""; + return `${protocol ? `${protocol}://` : ""}${filteredHost}${path}`; + } + exports.getNumberOfUrlSegments = getNumberOfUrlSegments; + exports.getSanitizedUrlString = getSanitizedUrlString; + exports.parseUrl = parseUrl; + exports.stripUrlQueryAndFragment = stripUrlQueryAndFragment; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/requestdata.js +var require_requestdata = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/requestdata.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var cookie = require_cookie(), debugBuild = require_debug_build(), is = require_is(), logger = require_logger(), normalize = require_normalize(), url = require_url(), DEFAULT_INCLUDES = { + ip: !1, + request: !0, + transaction: !0, + user: !0 + }, DEFAULT_REQUEST_INCLUDES = ["cookies", "data", "headers", "method", "query_string", "url"], DEFAULT_USER_INCLUDES = ["id", "username", "email"]; + function extractPathForTransaction(req, options = {}) { + let method = req.method && req.method.toUpperCase(), path = "", source = "url"; + options.customRoute || req.route ? (path = options.customRoute || `${req.baseUrl || ""}${req.route && req.route.path}`, source = "route") : (req.originalUrl || req.url) && (path = url.stripUrlQueryAndFragment(req.originalUrl || req.url || "")); + let name = ""; + return options.method && method && (name += method), options.method && options.path && (name += " "), options.path && path && (name += path), [name, source]; + } + function extractTransaction(req, type) { + switch (type) { + case "path": + return extractPathForTransaction(req, { path: !0 })[0]; + case "handler": + return req.route && req.route.stack && req.route.stack[0] && req.route.stack[0].name || ""; + case "methodPath": + default: { + let customRoute = req._reconstructedRoute ? req._reconstructedRoute : void 0; + return extractPathForTransaction(req, { path: !0, method: !0, customRoute })[0]; + } + } + } + function extractUserData(user, keys) { + let extractedUser = {}; + return (Array.isArray(keys) ? keys : DEFAULT_USER_INCLUDES).forEach((key) => { + user && key in user && (extractedUser[key] = user[key]); + }), extractedUser; + } + function extractRequestData(req, options) { + let { include = DEFAULT_REQUEST_INCLUDES } = options || {}, requestData = {}, headers = req.headers || {}, method = req.method, host = headers.host || req.hostname || req.host || "", protocol = req.protocol === "https" || req.socket && req.socket.encrypted ? "https" : "http", originalUrl = req.originalUrl || req.url || "", absoluteUrl = originalUrl.startsWith(protocol) ? originalUrl : `${protocol}://${host}${originalUrl}`; + return include.forEach((key) => { + switch (key) { + case "headers": { + requestData.headers = headers, include.includes("cookies") || delete requestData.headers.cookie; + break; + } + case "method": { + requestData.method = method; + break; + } + case "url": { + requestData.url = absoluteUrl; + break; + } + case "cookies": { + requestData.cookies = // TODO (v8 / #5257): We're only sending the empty object for backwards compatibility, so the last bit can + // come off in v8 + req.cookies || headers.cookie && cookie.parseCookie(headers.cookie) || {}; + break; + } + case "query_string": { + requestData.query_string = extractQueryParams(req); + break; + } + case "data": { + if (method === "GET" || method === "HEAD") + break; + req.body !== void 0 && (requestData.data = is.isString(req.body) ? req.body : JSON.stringify(normalize.normalize(req.body))); + break; + } + default: + ({}).hasOwnProperty.call(req, key) && (requestData[key] = req[key]); + } + }), requestData; + } + function addRequestDataToEvent(event, req, options) { + let include = { + ...DEFAULT_INCLUDES, + ...options && options.include + }; + if (include.request) { + let extractedRequestData = Array.isArray(include.request) ? extractRequestData(req, { include: include.request }) : extractRequestData(req); + event.request = { + ...event.request, + ...extractedRequestData + }; + } + if (include.user) { + let extractedUser = req.user && is.isPlainObject(req.user) ? extractUserData(req.user, include.user) : {}; + Object.keys(extractedUser).length && (event.user = { + ...event.user, + ...extractedUser + }); + } + if (include.ip) { + let ip = req.ip || req.socket && req.socket.remoteAddress; + ip && (event.user = { + ...event.user, + ip_address: ip + }); + } + return include.transaction && !event.transaction && event.type === "transaction" && (event.transaction = extractTransaction(req, include.transaction)), event; + } + function extractQueryParams(req) { + let originalUrl = req.originalUrl || req.url || ""; + if (originalUrl) { + originalUrl.startsWith("/") && (originalUrl = `http://dogs.are.great${originalUrl}`); + try { + let queryParams = req.query || new URL(originalUrl).search.slice(1); + return queryParams.length ? queryParams : void 0; + } catch { + return; + } + } + } + function winterCGHeadersToDict(winterCGHeaders) { + let headers = {}; + try { + winterCGHeaders.forEach((value, key) => { + typeof value == "string" && (headers[key] = value); + }); + } catch { + debugBuild.DEBUG_BUILD && logger.logger.warn("Sentry failed extracting headers from a request object. If you see this, please file an issue."); + } + return headers; + } + function winterCGRequestToRequestData(req) { + let headers = winterCGHeadersToDict(req.headers); + return { + method: req.method, + url: req.url, + headers + }; + } + exports.DEFAULT_USER_INCLUDES = DEFAULT_USER_INCLUDES; + exports.addRequestDataToEvent = addRequestDataToEvent; + exports.extractPathForTransaction = extractPathForTransaction; + exports.extractRequestData = extractRequestData; + exports.winterCGHeadersToDict = winterCGHeadersToDict; + exports.winterCGRequestToRequestData = winterCGRequestToRequestData; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/severity.js +var require_severity = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/severity.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var validSeverityLevels = ["fatal", "error", "warning", "log", "info", "debug"]; + function severityLevelFromString(level) { + return level === "warn" ? "warning" : validSeverityLevels.includes(level) ? level : "log"; + } + exports.severityLevelFromString = severityLevelFromString; + exports.validSeverityLevels = validSeverityLevels; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/node-stack-trace.js +var require_node_stack_trace = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/node-stack-trace.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var stacktrace = require_stacktrace(); + function filenameIsInApp(filename, isNative = !1) { + return !(isNative || filename && // It's not internal if it's an absolute linux path + !filename.startsWith("/") && // It's not internal if it's an absolute windows path + !filename.match(/^[A-Z]:/) && // It's not internal if the path is starting with a dot + !filename.startsWith(".") && // It's not internal if the frame has a protocol. In node, this is usually the case if the file got pre-processed with a bundler like webpack + !filename.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//)) && filename !== void 0 && !filename.includes("node_modules/"); + } + function node(getModule) { + let FILENAME_MATCH = /^\s*[-]{4,}$/, FULL_MATCH = /at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/; + return (line) => { + let lineMatch = line.match(FULL_MATCH); + if (lineMatch) { + let object, method, functionName, typeName, methodName; + if (lineMatch[1]) { + functionName = lineMatch[1]; + let methodStart = functionName.lastIndexOf("."); + if (functionName[methodStart - 1] === "." && methodStart--, methodStart > 0) { + object = functionName.slice(0, methodStart), method = functionName.slice(methodStart + 1); + let objectEnd = object.indexOf(".Module"); + objectEnd > 0 && (functionName = functionName.slice(objectEnd + 1), object = object.slice(0, objectEnd)); + } + typeName = void 0; + } + method && (typeName = object, methodName = method), method === "" && (methodName = void 0, functionName = void 0), functionName === void 0 && (methodName = methodName || stacktrace.UNKNOWN_FUNCTION, functionName = typeName ? `${typeName}.${methodName}` : methodName); + let filename = lineMatch[2] && lineMatch[2].startsWith("file://") ? lineMatch[2].slice(7) : lineMatch[2], isNative = lineMatch[5] === "native"; + return filename && filename.match(/\/[A-Z]:/) && (filename = filename.slice(1)), !filename && lineMatch[5] && !isNative && (filename = lineMatch[5]), { + filename, + module: getModule ? getModule(filename) : void 0, + function: functionName, + lineno: parseInt(lineMatch[3], 10) || void 0, + colno: parseInt(lineMatch[4], 10) || void 0, + in_app: filenameIsInApp(filename, isNative) + }; + } + if (line.match(FILENAME_MATCH)) + return { + filename: line + }; + }; + } + function nodeStackLineParser(getModule) { + return [90, node(getModule)]; + } + exports.filenameIsInApp = filenameIsInApp; + exports.node = node; + exports.nodeStackLineParser = nodeStackLineParser; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/baggage.js +var require_baggage = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/baggage.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var debugBuild = require_debug_build(), is = require_is(), logger = require_logger(), BAGGAGE_HEADER_NAME = "baggage", SENTRY_BAGGAGE_KEY_PREFIX = "sentry-", SENTRY_BAGGAGE_KEY_PREFIX_REGEX = /^sentry-/, MAX_BAGGAGE_STRING_LENGTH = 8192; + function baggageHeaderToDynamicSamplingContext(baggageHeader) { + let baggageObject = parseBaggageHeader(baggageHeader); + if (!baggageObject) + return; + let dynamicSamplingContext = Object.entries(baggageObject).reduce((acc, [key, value]) => { + if (key.match(SENTRY_BAGGAGE_KEY_PREFIX_REGEX)) { + let nonPrefixedKey = key.slice(SENTRY_BAGGAGE_KEY_PREFIX.length); + acc[nonPrefixedKey] = value; + } + return acc; + }, {}); + if (Object.keys(dynamicSamplingContext).length > 0) + return dynamicSamplingContext; + } + function dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext) { + if (!dynamicSamplingContext) + return; + let sentryPrefixedDSC = Object.entries(dynamicSamplingContext).reduce( + (acc, [dscKey, dscValue]) => (dscValue && (acc[`${SENTRY_BAGGAGE_KEY_PREFIX}${dscKey}`] = dscValue), acc), + {} + ); + return objectToBaggageHeader(sentryPrefixedDSC); + } + function parseBaggageHeader(baggageHeader) { + if (!(!baggageHeader || !is.isString(baggageHeader) && !Array.isArray(baggageHeader))) + return Array.isArray(baggageHeader) ? baggageHeader.reduce((acc, curr) => { + let currBaggageObject = baggageHeaderToObject(curr); + for (let key of Object.keys(currBaggageObject)) + acc[key] = currBaggageObject[key]; + return acc; + }, {}) : baggageHeaderToObject(baggageHeader); + } + function baggageHeaderToObject(baggageHeader) { + return baggageHeader.split(",").map((baggageEntry) => baggageEntry.split("=").map((keyOrValue) => decodeURIComponent(keyOrValue.trim()))).reduce((acc, [key, value]) => (acc[key] = value, acc), {}); + } + function objectToBaggageHeader(object) { + if (Object.keys(object).length !== 0) + return Object.entries(object).reduce((baggageHeader, [objectKey, objectValue], currentIndex) => { + let baggageEntry = `${encodeURIComponent(objectKey)}=${encodeURIComponent(objectValue)}`, newBaggageHeader = currentIndex === 0 ? baggageEntry : `${baggageHeader},${baggageEntry}`; + return newBaggageHeader.length > MAX_BAGGAGE_STRING_LENGTH ? (debugBuild.DEBUG_BUILD && logger.logger.warn( + `Not adding key: ${objectKey} with val: ${objectValue} to baggage header due to exceeding baggage size limits.` + ), baggageHeader) : newBaggageHeader; + }, ""); + } + exports.BAGGAGE_HEADER_NAME = BAGGAGE_HEADER_NAME; + exports.MAX_BAGGAGE_STRING_LENGTH = MAX_BAGGAGE_STRING_LENGTH; + exports.SENTRY_BAGGAGE_KEY_PREFIX = SENTRY_BAGGAGE_KEY_PREFIX; + exports.SENTRY_BAGGAGE_KEY_PREFIX_REGEX = SENTRY_BAGGAGE_KEY_PREFIX_REGEX; + exports.baggageHeaderToDynamicSamplingContext = baggageHeaderToDynamicSamplingContext; + exports.dynamicSamplingContextToSentryBaggageHeader = dynamicSamplingContextToSentryBaggageHeader; + exports.parseBaggageHeader = parseBaggageHeader; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/tracing.js +var require_tracing = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/tracing.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var baggage = require_baggage(), misc = require_misc(), TRACEPARENT_REGEXP = new RegExp( + "^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$" + // whitespace + ); + function extractTraceparentData(traceparent) { + if (!traceparent) + return; + let matches = traceparent.match(TRACEPARENT_REGEXP); + if (!matches) + return; + let parentSampled; + return matches[3] === "1" ? parentSampled = !0 : matches[3] === "0" && (parentSampled = !1), { + traceId: matches[1], + parentSampled, + parentSpanId: matches[2] + }; + } + function propagationContextFromHeaders(sentryTrace, baggage$1) { + let traceparentData = extractTraceparentData(sentryTrace), dynamicSamplingContext = baggage.baggageHeaderToDynamicSamplingContext(baggage$1), { traceId, parentSpanId, parentSampled } = traceparentData || {}; + return traceparentData ? { + traceId: traceId || misc.uuid4(), + parentSpanId: parentSpanId || misc.uuid4().substring(16), + spanId: misc.uuid4().substring(16), + sampled: parentSampled, + dsc: dynamicSamplingContext || {} + // If we have traceparent data but no DSC it means we are not head of trace and we must freeze it + } : { + traceId: traceId || misc.uuid4(), + spanId: misc.uuid4().substring(16) + }; + } + function generateSentryTraceHeader(traceId = misc.uuid4(), spanId = misc.uuid4().substring(16), sampled) { + let sampledString = ""; + return sampled !== void 0 && (sampledString = sampled ? "-1" : "-0"), `${traceId}-${spanId}${sampledString}`; + } + exports.TRACEPARENT_REGEXP = TRACEPARENT_REGEXP; + exports.extractTraceparentData = extractTraceparentData; + exports.generateSentryTraceHeader = generateSentryTraceHeader; + exports.propagationContextFromHeaders = propagationContextFromHeaders; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/envelope.js +var require_envelope = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/envelope.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var dsn = require_dsn(), normalize = require_normalize(), object = require_object(), worldwide = require_worldwide(); + function createEnvelope(headers, items = []) { + return [headers, items]; + } + function addItemToEnvelope(envelope, newItem) { + let [headers, items] = envelope; + return [headers, [...items, newItem]]; + } + function forEachEnvelopeItem(envelope, callback) { + let envelopeItems = envelope[1]; + for (let envelopeItem of envelopeItems) { + let envelopeItemType = envelopeItem[0].type; + if (callback(envelopeItem, envelopeItemType)) + return !0; + } + return !1; + } + function envelopeContainsItemType(envelope, types) { + return forEachEnvelopeItem(envelope, (_, type) => types.includes(type)); + } + function encodeUTF8(input) { + return worldwide.GLOBAL_OBJ.__SENTRY__ && worldwide.GLOBAL_OBJ.__SENTRY__.encodePolyfill ? worldwide.GLOBAL_OBJ.__SENTRY__.encodePolyfill(input) : new TextEncoder().encode(input); + } + function decodeUTF8(input) { + return worldwide.GLOBAL_OBJ.__SENTRY__ && worldwide.GLOBAL_OBJ.__SENTRY__.decodePolyfill ? worldwide.GLOBAL_OBJ.__SENTRY__.decodePolyfill(input) : new TextDecoder().decode(input); + } + function serializeEnvelope(envelope) { + let [envHeaders, items] = envelope, parts = JSON.stringify(envHeaders); + function append(next) { + typeof parts == "string" ? parts = typeof next == "string" ? parts + next : [encodeUTF8(parts), next] : parts.push(typeof next == "string" ? encodeUTF8(next) : next); + } + for (let item of items) { + let [itemHeaders, payload] = item; + if (append(` +${JSON.stringify(itemHeaders)} +`), typeof payload == "string" || payload instanceof Uint8Array) + append(payload); + else { + let stringifiedPayload; + try { + stringifiedPayload = JSON.stringify(payload); + } catch { + stringifiedPayload = JSON.stringify(normalize.normalize(payload)); + } + append(stringifiedPayload); + } + } + return typeof parts == "string" ? parts : concatBuffers(parts); + } + function concatBuffers(buffers) { + let totalLength = buffers.reduce((acc, buf) => acc + buf.length, 0), merged = new Uint8Array(totalLength), offset = 0; + for (let buffer of buffers) + merged.set(buffer, offset), offset += buffer.length; + return merged; + } + function parseEnvelope(env) { + let buffer = typeof env == "string" ? encodeUTF8(env) : env; + function readBinary(length) { + let bin = buffer.subarray(0, length); + return buffer = buffer.subarray(length + 1), bin; + } + function readJson() { + let i = buffer.indexOf(10); + return i < 0 && (i = buffer.length), JSON.parse(decodeUTF8(readBinary(i))); + } + let envelopeHeader = readJson(), items = []; + for (; buffer.length; ) { + let itemHeader = readJson(), binaryLength = typeof itemHeader.length == "number" ? itemHeader.length : void 0; + items.push([itemHeader, binaryLength ? readBinary(binaryLength) : readJson()]); + } + return [envelopeHeader, items]; + } + function createSpanEnvelopeItem(spanJson) { + return [{ + type: "span" + }, spanJson]; + } + function createAttachmentEnvelopeItem(attachment) { + let buffer = typeof attachment.data == "string" ? encodeUTF8(attachment.data) : attachment.data; + return [ + object.dropUndefinedKeys({ + type: "attachment", + length: buffer.length, + filename: attachment.filename, + content_type: attachment.contentType, + attachment_type: attachment.attachmentType + }), + buffer + ]; + } + var ITEM_TYPE_TO_DATA_CATEGORY_MAP = { + session: "session", + sessions: "session", + attachment: "attachment", + transaction: "transaction", + event: "error", + client_report: "internal", + user_report: "default", + profile: "profile", + profile_chunk: "profile", + replay_event: "replay", + replay_recording: "replay", + check_in: "monitor", + feedback: "feedback", + span: "span", + statsd: "metric_bucket" + }; + function envelopeItemTypeToDataCategory(type) { + return ITEM_TYPE_TO_DATA_CATEGORY_MAP[type]; + } + function getSdkMetadataForEnvelopeHeader(metadataOrEvent) { + if (!metadataOrEvent || !metadataOrEvent.sdk) + return; + let { name, version } = metadataOrEvent.sdk; + return { name, version }; + } + function createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn$1) { + let dynamicSamplingContext = event.sdkProcessingMetadata && event.sdkProcessingMetadata.dynamicSamplingContext; + return { + event_id: event.event_id, + sent_at: (/* @__PURE__ */ new Date()).toISOString(), + ...sdkInfo && { sdk: sdkInfo }, + ...!!tunnel && dsn$1 && { dsn: dsn.dsnToString(dsn$1) }, + ...dynamicSamplingContext && { + trace: object.dropUndefinedKeys({ ...dynamicSamplingContext }) + } + }; + } + exports.addItemToEnvelope = addItemToEnvelope; + exports.createAttachmentEnvelopeItem = createAttachmentEnvelopeItem; + exports.createEnvelope = createEnvelope; + exports.createEventEnvelopeHeaders = createEventEnvelopeHeaders; + exports.createSpanEnvelopeItem = createSpanEnvelopeItem; + exports.envelopeContainsItemType = envelopeContainsItemType; + exports.envelopeItemTypeToDataCategory = envelopeItemTypeToDataCategory; + exports.forEachEnvelopeItem = forEachEnvelopeItem; + exports.getSdkMetadataForEnvelopeHeader = getSdkMetadataForEnvelopeHeader; + exports.parseEnvelope = parseEnvelope; + exports.serializeEnvelope = serializeEnvelope; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/clientreport.js +var require_clientreport = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/clientreport.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var envelope = require_envelope(), time = require_time(); + function createClientReportEnvelope(discarded_events, dsn, timestamp) { + let clientReportItem = [ + { type: "client_report" }, + { + timestamp: timestamp || time.dateTimestampInSeconds(), + discarded_events + } + ]; + return envelope.createEnvelope(dsn ? { dsn } : {}, [clientReportItem]); + } + exports.createClientReportEnvelope = createClientReportEnvelope; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/ratelimit.js +var require_ratelimit = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/ratelimit.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var DEFAULT_RETRY_AFTER = 60 * 1e3; + function parseRetryAfterHeader(header, now = Date.now()) { + let headerDelay = parseInt(`${header}`, 10); + if (!isNaN(headerDelay)) + return headerDelay * 1e3; + let headerDate = Date.parse(`${header}`); + return isNaN(headerDate) ? DEFAULT_RETRY_AFTER : headerDate - now; + } + function disabledUntil(limits, dataCategory) { + return limits[dataCategory] || limits.all || 0; + } + function isRateLimited(limits, dataCategory, now = Date.now()) { + return disabledUntil(limits, dataCategory) > now; + } + function updateRateLimits(limits, { statusCode, headers }, now = Date.now()) { + let updatedRateLimits = { + ...limits + }, rateLimitHeader = headers && headers["x-sentry-rate-limits"], retryAfterHeader = headers && headers["retry-after"]; + if (rateLimitHeader) + for (let limit of rateLimitHeader.trim().split(",")) { + let [retryAfter, categories, , , namespaces] = limit.split(":", 5), headerDelay = parseInt(retryAfter, 10), delay = (isNaN(headerDelay) ? 60 : headerDelay) * 1e3; + if (!categories) + updatedRateLimits.all = now + delay; + else + for (let category of categories.split(";")) + category === "metric_bucket" ? (!namespaces || namespaces.split(";").includes("custom")) && (updatedRateLimits[category] = now + delay) : updatedRateLimits[category] = now + delay; + } + else retryAfterHeader ? updatedRateLimits.all = now + parseRetryAfterHeader(retryAfterHeader, now) : statusCode === 429 && (updatedRateLimits.all = now + 60 * 1e3); + return updatedRateLimits; + } + exports.DEFAULT_RETRY_AFTER = DEFAULT_RETRY_AFTER; + exports.disabledUntil = disabledUntil; + exports.isRateLimited = isRateLimited; + exports.parseRetryAfterHeader = parseRetryAfterHeader; + exports.updateRateLimits = updateRateLimits; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/cache.js +var require_cache = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/cache.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function makeFifoCache(size) { + let evictionOrder = [], cache = {}; + return { + add(key, value) { + for (; evictionOrder.length >= size; ) { + let evictCandidate = evictionOrder.shift(); + evictCandidate !== void 0 && delete cache[evictCandidate]; + } + cache[key] && this.delete(key), evictionOrder.push(key), cache[key] = value; + }, + clear() { + cache = {}, evictionOrder = []; + }, + get(key) { + return cache[key]; + }, + size() { + return evictionOrder.length; + }, + // Delete cache key and return true if it existed, false otherwise. + delete(key) { + if (!cache[key]) + return !1; + delete cache[key]; + for (let i = 0; i < evictionOrder.length; i++) + if (evictionOrder[i] === key) { + evictionOrder.splice(i, 1); + break; + } + return !0; + } + }; + } + exports.makeFifoCache = makeFifoCache; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/eventbuilder.js +var require_eventbuilder = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/eventbuilder.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var is = require_is(), misc = require_misc(), normalize = require_normalize(), object = require_object(); + function parseStackFrames(stackParser, error) { + return stackParser(error.stack || "", 1); + } + function exceptionFromError(stackParser, error) { + let exception = { + type: error.name || error.constructor.name, + value: error.message + }, frames = parseStackFrames(stackParser, error); + return frames.length && (exception.stacktrace = { frames }), exception; + } + function getErrorPropertyFromObject(obj) { + for (let prop in obj) + if (Object.prototype.hasOwnProperty.call(obj, prop)) { + let value = obj[prop]; + if (value instanceof Error) + return value; + } + } + function getMessageForObject(exception) { + if ("name" in exception && typeof exception.name == "string") { + let message = `'${exception.name}' captured as exception`; + return "message" in exception && typeof exception.message == "string" && (message += ` with message '${exception.message}'`), message; + } else if ("message" in exception && typeof exception.message == "string") + return exception.message; + let keys = object.extractExceptionKeysForMessage(exception); + if (is.isErrorEvent(exception)) + return `Event \`ErrorEvent\` captured as exception with message \`${exception.message}\``; + let className = getObjectClassName(exception); + return `${className && className !== "Object" ? `'${className}'` : "Object"} captured as exception with keys: ${keys}`; + } + function getObjectClassName(obj) { + try { + let prototype = Object.getPrototypeOf(obj); + return prototype ? prototype.constructor.name : void 0; + } catch { + } + } + function getException(client, mechanism, exception, hint) { + if (is.isError(exception)) + return [exception, void 0]; + if (mechanism.synthetic = !0, is.isPlainObject(exception)) { + let normalizeDepth = client && client.getOptions().normalizeDepth, extras = { __serialized__: normalize.normalizeToSize(exception, normalizeDepth) }, errorFromProp = getErrorPropertyFromObject(exception); + if (errorFromProp) + return [errorFromProp, extras]; + let message = getMessageForObject(exception), ex2 = hint && hint.syntheticException || new Error(message); + return ex2.message = message, [ex2, extras]; + } + let ex = hint && hint.syntheticException || new Error(exception); + return ex.message = `${exception}`, [ex, void 0]; + } + function eventFromUnknownInput(client, stackParser, exception, hint) { + let mechanism = hint && hint.data && hint.data.mechanism || { + handled: !0, + type: "generic" + }, [ex, extras] = getException(client, mechanism, exception, hint), event = { + exception: { + values: [exceptionFromError(stackParser, ex)] + } + }; + return extras && (event.extra = extras), misc.addExceptionTypeValue(event, void 0, void 0), misc.addExceptionMechanism(event, mechanism), { + ...event, + event_id: hint && hint.event_id + }; + } + function eventFromMessage(stackParser, message, level = "info", hint, attachStacktrace) { + let event = { + event_id: hint && hint.event_id, + level + }; + if (attachStacktrace && hint && hint.syntheticException) { + let frames = parseStackFrames(stackParser, hint.syntheticException); + frames.length && (event.exception = { + values: [ + { + value: message, + stacktrace: { frames } + } + ] + }); + } + if (is.isParameterizedString(message)) { + let { __sentry_template_string__, __sentry_template_values__ } = message; + return event.logentry = { + message: __sentry_template_string__, + params: __sentry_template_values__ + }, event; + } + return event.message = message, event; + } + exports.eventFromMessage = eventFromMessage; + exports.eventFromUnknownInput = eventFromUnknownInput; + exports.exceptionFromError = exceptionFromError; + exports.parseStackFrames = parseStackFrames; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/anr.js +var require_anr = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/anr.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var nodeStackTrace = require_node_stack_trace(), object = require_object(), stacktrace = require_stacktrace(); + function watchdogTimer(createTimer, pollInterval, anrThreshold, callback) { + let timer = createTimer(), triggered = !1, enabled = !0; + return setInterval(() => { + let diffMs = timer.getTimeMs(); + triggered === !1 && diffMs > pollInterval + anrThreshold && (triggered = !0, enabled && callback()), diffMs < pollInterval + anrThreshold && (triggered = !1); + }, 20), { + poll: () => { + timer.reset(); + }, + enabled: (state) => { + enabled = state; + } + }; + } + function callFrameToStackFrame(frame, url, getModuleFromFilename) { + let filename = url ? url.replace(/^file:\/\//, "") : void 0, colno = frame.location.columnNumber ? frame.location.columnNumber + 1 : void 0, lineno = frame.location.lineNumber ? frame.location.lineNumber + 1 : void 0; + return object.dropUndefinedKeys({ + filename, + module: getModuleFromFilename(filename), + function: frame.functionName || stacktrace.UNKNOWN_FUNCTION, + colno, + lineno, + in_app: filename ? nodeStackTrace.filenameIsInApp(filename) : void 0 + }); + } + exports.callFrameToStackFrame = callFrameToStackFrame; + exports.watchdogTimer = watchdogTimer; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/lru.js +var require_lru = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/lru.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var LRUMap = class { + constructor(_maxSize) { + this._maxSize = _maxSize, this._cache = /* @__PURE__ */ new Map(); + } + /** Get the current size of the cache */ + get size() { + return this._cache.size; + } + /** Get an entry or undefined if it was not in the cache. Re-inserts to update the recently used order */ + get(key) { + let value = this._cache.get(key); + if (value !== void 0) + return this._cache.delete(key), this._cache.set(key, value), value; + } + /** Insert an entry and evict an older entry if we've reached maxSize */ + set(key, value) { + this._cache.size >= this._maxSize && this._cache.delete(this._cache.keys().next().value), this._cache.set(key, value); + } + /** Remove an entry and return the entry if it was in the cache */ + remove(key) { + let value = this._cache.get(key); + return value && this._cache.delete(key), value; + } + /** Clear all entries */ + clear() { + this._cache.clear(); + } + /** Get all the keys */ + keys() { + return Array.from(this._cache.keys()); + } + /** Get all the values */ + values() { + let values = []; + return this._cache.forEach((value) => values.push(value)), values; + } + }; + exports.LRUMap = LRUMap; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_nullishCoalesce.js +var require_nullishCoalesce = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_nullishCoalesce.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function _nullishCoalesce(lhs, rhsFn) { + return lhs ?? rhsFn(); + } + exports._nullishCoalesce = _nullishCoalesce; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_asyncNullishCoalesce.js +var require_asyncNullishCoalesce = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_asyncNullishCoalesce.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var _nullishCoalesce = require_nullishCoalesce(); + async function _asyncNullishCoalesce(lhs, rhsFn) { + return _nullishCoalesce._nullishCoalesce(lhs, rhsFn); + } + exports._asyncNullishCoalesce = _asyncNullishCoalesce; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_asyncOptionalChain.js +var require_asyncOptionalChain = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_asyncOptionalChain.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + async function _asyncOptionalChain(ops) { + let lastAccessLHS, value = ops[0], i = 1; + for (; i < ops.length; ) { + let op = ops[i], fn = ops[i + 1]; + if (i += 2, (op === "optionalAccess" || op === "optionalCall") && value == null) + return; + op === "access" || op === "optionalAccess" ? (lastAccessLHS = value, value = await fn(value)) : (op === "call" || op === "optionalCall") && (value = await fn((...args) => value.call(lastAccessLHS, ...args)), lastAccessLHS = void 0); + } + return value; + } + exports._asyncOptionalChain = _asyncOptionalChain; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_asyncOptionalChainDelete.js +var require_asyncOptionalChainDelete = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_asyncOptionalChainDelete.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var _asyncOptionalChain = require_asyncOptionalChain(); + async function _asyncOptionalChainDelete(ops) { + let result = await _asyncOptionalChain._asyncOptionalChain(ops); + return result ?? !0; + } + exports._asyncOptionalChainDelete = _asyncOptionalChainDelete; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_optionalChain.js +var require_optionalChain = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_optionalChain.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function _optionalChain(ops) { + let lastAccessLHS, value = ops[0], i = 1; + for (; i < ops.length; ) { + let op = ops[i], fn = ops[i + 1]; + if (i += 2, (op === "optionalAccess" || op === "optionalCall") && value == null) + return; + op === "access" || op === "optionalAccess" ? (lastAccessLHS = value, value = fn(value)) : (op === "call" || op === "optionalCall") && (value = fn((...args) => value.call(lastAccessLHS, ...args)), lastAccessLHS = void 0); + } + return value; + } + exports._optionalChain = _optionalChain; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_optionalChainDelete.js +var require_optionalChainDelete = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_optionalChainDelete.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var _optionalChain = require_optionalChain(); + function _optionalChainDelete(ops) { + let result = _optionalChain._optionalChain(ops); + return result ?? !0; + } + exports._optionalChainDelete = _optionalChainDelete; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/propagationContext.js +var require_propagationContext = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/propagationContext.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var misc = require_misc(); + function generatePropagationContext() { + return { + traceId: misc.uuid4(), + spanId: misc.uuid4().substring(16) + }; + } + exports.generatePropagationContext = generatePropagationContext; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/vendor/escapeStringForRegex.js +var require_escapeStringForRegex = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/vendor/escapeStringForRegex.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function escapeStringForRegex(regexString) { + return regexString.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"); + } + exports.escapeStringForRegex = escapeStringForRegex; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/vendor/supportsHistory.js +var require_supportsHistory = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/vendor/supportsHistory.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var worldwide = require_worldwide(), WINDOW = worldwide.GLOBAL_OBJ; + function supportsHistory() { + let chromeVar = WINDOW.chrome, isChromePackagedApp = chromeVar && chromeVar.app && chromeVar.app.runtime, hasHistoryApi = "history" in WINDOW && !!WINDOW.history.pushState && !!WINDOW.history.replaceState; + return !isChromePackagedApp && hasHistoryApi; + } + exports.supportsHistory = supportsHistory; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/index.js +var require_cjs = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/index.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var aggregateErrors = require_aggregate_errors(), array = require_array(), browser = require_browser(), dsn = require_dsn(), error = require_error(), worldwide = require_worldwide(), console2 = require_console(), fetch2 = require_fetch(), globalError = require_globalError(), globalUnhandledRejection = require_globalUnhandledRejection(), handlers = require_handlers(), is = require_is(), isBrowser = require_isBrowser(), logger = require_logger(), memo = require_memo(), misc = require_misc(), node = require_node(), normalize = require_normalize(), object = require_object(), path = require_path(), promisebuffer = require_promisebuffer(), requestdata = require_requestdata(), severity = require_severity(), stacktrace = require_stacktrace(), nodeStackTrace = require_node_stack_trace(), string = require_string(), supports = require_supports(), syncpromise = require_syncpromise(), time = require_time(), tracing = require_tracing(), env = require_env(), envelope = require_envelope(), clientreport = require_clientreport(), ratelimit = require_ratelimit(), baggage = require_baggage(), url = require_url(), cache = require_cache(), eventbuilder = require_eventbuilder(), anr = require_anr(), lru = require_lru(), _asyncNullishCoalesce = require_asyncNullishCoalesce(), _asyncOptionalChain = require_asyncOptionalChain(), _asyncOptionalChainDelete = require_asyncOptionalChainDelete(), _nullishCoalesce = require_nullishCoalesce(), _optionalChain = require_optionalChain(), _optionalChainDelete = require_optionalChainDelete(), propagationContext = require_propagationContext(), version = require_version(), escapeStringForRegex = require_escapeStringForRegex(), supportsHistory = require_supportsHistory(); + exports.applyAggregateErrorsToEvent = aggregateErrors.applyAggregateErrorsToEvent; + exports.flatten = array.flatten; + exports.getComponentName = browser.getComponentName; + exports.getDomElement = browser.getDomElement; + exports.getLocationHref = browser.getLocationHref; + exports.htmlTreeAsString = browser.htmlTreeAsString; + exports.dsnFromString = dsn.dsnFromString; + exports.dsnToString = dsn.dsnToString; + exports.makeDsn = dsn.makeDsn; + exports.SentryError = error.SentryError; + exports.GLOBAL_OBJ = worldwide.GLOBAL_OBJ; + exports.getGlobalSingleton = worldwide.getGlobalSingleton; + exports.addConsoleInstrumentationHandler = console2.addConsoleInstrumentationHandler; + exports.addFetchInstrumentationHandler = fetch2.addFetchInstrumentationHandler; + exports.addGlobalErrorInstrumentationHandler = globalError.addGlobalErrorInstrumentationHandler; + exports.addGlobalUnhandledRejectionInstrumentationHandler = globalUnhandledRejection.addGlobalUnhandledRejectionInstrumentationHandler; + exports.addHandler = handlers.addHandler; + exports.maybeInstrument = handlers.maybeInstrument; + exports.resetInstrumentationHandlers = handlers.resetInstrumentationHandlers; + exports.triggerHandlers = handlers.triggerHandlers; + exports.isDOMError = is.isDOMError; + exports.isDOMException = is.isDOMException; + exports.isElement = is.isElement; + exports.isError = is.isError; + exports.isErrorEvent = is.isErrorEvent; + exports.isEvent = is.isEvent; + exports.isInstanceOf = is.isInstanceOf; + exports.isParameterizedString = is.isParameterizedString; + exports.isPlainObject = is.isPlainObject; + exports.isPrimitive = is.isPrimitive; + exports.isRegExp = is.isRegExp; + exports.isString = is.isString; + exports.isSyntheticEvent = is.isSyntheticEvent; + exports.isThenable = is.isThenable; + exports.isVueViewModel = is.isVueViewModel; + exports.isBrowser = isBrowser.isBrowser; + exports.CONSOLE_LEVELS = logger.CONSOLE_LEVELS; + exports.consoleSandbox = logger.consoleSandbox; + exports.logger = logger.logger; + exports.originalConsoleMethods = logger.originalConsoleMethods; + exports.memoBuilder = memo.memoBuilder; + exports.addContextToFrame = misc.addContextToFrame; + exports.addExceptionMechanism = misc.addExceptionMechanism; + exports.addExceptionTypeValue = misc.addExceptionTypeValue; + exports.arrayify = misc.arrayify; + exports.checkOrSetAlreadyCaught = misc.checkOrSetAlreadyCaught; + exports.getEventDescription = misc.getEventDescription; + exports.parseSemver = misc.parseSemver; + exports.uuid4 = misc.uuid4; + exports.dynamicRequire = node.dynamicRequire; + exports.isNodeEnv = node.isNodeEnv; + exports.loadModule = node.loadModule; + exports.normalize = normalize.normalize; + exports.normalizeToSize = normalize.normalizeToSize; + exports.normalizeUrlToBase = normalize.normalizeUrlToBase; + exports.addNonEnumerableProperty = object.addNonEnumerableProperty; + exports.convertToPlainObject = object.convertToPlainObject; + exports.dropUndefinedKeys = object.dropUndefinedKeys; + exports.extractExceptionKeysForMessage = object.extractExceptionKeysForMessage; + exports.fill = object.fill; + exports.getOriginalFunction = object.getOriginalFunction; + exports.markFunctionWrapped = object.markFunctionWrapped; + exports.objectify = object.objectify; + exports.urlEncode = object.urlEncode; + exports.basename = path.basename; + exports.dirname = path.dirname; + exports.isAbsolute = path.isAbsolute; + exports.join = path.join; + exports.normalizePath = path.normalizePath; + exports.relative = path.relative; + exports.resolve = path.resolve; + exports.makePromiseBuffer = promisebuffer.makePromiseBuffer; + exports.DEFAULT_USER_INCLUDES = requestdata.DEFAULT_USER_INCLUDES; + exports.addRequestDataToEvent = requestdata.addRequestDataToEvent; + exports.extractPathForTransaction = requestdata.extractPathForTransaction; + exports.extractRequestData = requestdata.extractRequestData; + exports.winterCGHeadersToDict = requestdata.winterCGHeadersToDict; + exports.winterCGRequestToRequestData = requestdata.winterCGRequestToRequestData; + exports.severityLevelFromString = severity.severityLevelFromString; + exports.validSeverityLevels = severity.validSeverityLevels; + exports.UNKNOWN_FUNCTION = stacktrace.UNKNOWN_FUNCTION; + exports.createStackParser = stacktrace.createStackParser; + exports.getFramesFromEvent = stacktrace.getFramesFromEvent; + exports.getFunctionName = stacktrace.getFunctionName; + exports.stackParserFromStackParserOptions = stacktrace.stackParserFromStackParserOptions; + exports.stripSentryFramesAndReverse = stacktrace.stripSentryFramesAndReverse; + exports.filenameIsInApp = nodeStackTrace.filenameIsInApp; + exports.node = nodeStackTrace.node; + exports.nodeStackLineParser = nodeStackTrace.nodeStackLineParser; + exports.isMatchingPattern = string.isMatchingPattern; + exports.safeJoin = string.safeJoin; + exports.snipLine = string.snipLine; + exports.stringMatchesSomePattern = string.stringMatchesSomePattern; + exports.truncate = string.truncate; + exports.isNativeFunction = supports.isNativeFunction; + exports.supportsDOMError = supports.supportsDOMError; + exports.supportsDOMException = supports.supportsDOMException; + exports.supportsErrorEvent = supports.supportsErrorEvent; + exports.supportsFetch = supports.supportsFetch; + exports.supportsNativeFetch = supports.supportsNativeFetch; + exports.supportsReferrerPolicy = supports.supportsReferrerPolicy; + exports.supportsReportingObserver = supports.supportsReportingObserver; + exports.SyncPromise = syncpromise.SyncPromise; + exports.rejectedSyncPromise = syncpromise.rejectedSyncPromise; + exports.resolvedSyncPromise = syncpromise.resolvedSyncPromise; + Object.defineProperty(exports, "_browserPerformanceTimeOriginMode", { + enumerable: !0, + get: () => time._browserPerformanceTimeOriginMode + }); + exports.browserPerformanceTimeOrigin = time.browserPerformanceTimeOrigin; + exports.dateTimestampInSeconds = time.dateTimestampInSeconds; + exports.timestampInSeconds = time.timestampInSeconds; + exports.TRACEPARENT_REGEXP = tracing.TRACEPARENT_REGEXP; + exports.extractTraceparentData = tracing.extractTraceparentData; + exports.generateSentryTraceHeader = tracing.generateSentryTraceHeader; + exports.propagationContextFromHeaders = tracing.propagationContextFromHeaders; + exports.getSDKSource = env.getSDKSource; + exports.isBrowserBundle = env.isBrowserBundle; + exports.addItemToEnvelope = envelope.addItemToEnvelope; + exports.createAttachmentEnvelopeItem = envelope.createAttachmentEnvelopeItem; + exports.createEnvelope = envelope.createEnvelope; + exports.createEventEnvelopeHeaders = envelope.createEventEnvelopeHeaders; + exports.createSpanEnvelopeItem = envelope.createSpanEnvelopeItem; + exports.envelopeContainsItemType = envelope.envelopeContainsItemType; + exports.envelopeItemTypeToDataCategory = envelope.envelopeItemTypeToDataCategory; + exports.forEachEnvelopeItem = envelope.forEachEnvelopeItem; + exports.getSdkMetadataForEnvelopeHeader = envelope.getSdkMetadataForEnvelopeHeader; + exports.parseEnvelope = envelope.parseEnvelope; + exports.serializeEnvelope = envelope.serializeEnvelope; + exports.createClientReportEnvelope = clientreport.createClientReportEnvelope; + exports.DEFAULT_RETRY_AFTER = ratelimit.DEFAULT_RETRY_AFTER; + exports.disabledUntil = ratelimit.disabledUntil; + exports.isRateLimited = ratelimit.isRateLimited; + exports.parseRetryAfterHeader = ratelimit.parseRetryAfterHeader; + exports.updateRateLimits = ratelimit.updateRateLimits; + exports.BAGGAGE_HEADER_NAME = baggage.BAGGAGE_HEADER_NAME; + exports.MAX_BAGGAGE_STRING_LENGTH = baggage.MAX_BAGGAGE_STRING_LENGTH; + exports.SENTRY_BAGGAGE_KEY_PREFIX = baggage.SENTRY_BAGGAGE_KEY_PREFIX; + exports.SENTRY_BAGGAGE_KEY_PREFIX_REGEX = baggage.SENTRY_BAGGAGE_KEY_PREFIX_REGEX; + exports.baggageHeaderToDynamicSamplingContext = baggage.baggageHeaderToDynamicSamplingContext; + exports.dynamicSamplingContextToSentryBaggageHeader = baggage.dynamicSamplingContextToSentryBaggageHeader; + exports.parseBaggageHeader = baggage.parseBaggageHeader; + exports.getNumberOfUrlSegments = url.getNumberOfUrlSegments; + exports.getSanitizedUrlString = url.getSanitizedUrlString; + exports.parseUrl = url.parseUrl; + exports.stripUrlQueryAndFragment = url.stripUrlQueryAndFragment; + exports.makeFifoCache = cache.makeFifoCache; + exports.eventFromMessage = eventbuilder.eventFromMessage; + exports.eventFromUnknownInput = eventbuilder.eventFromUnknownInput; + exports.exceptionFromError = eventbuilder.exceptionFromError; + exports.parseStackFrames = eventbuilder.parseStackFrames; + exports.callFrameToStackFrame = anr.callFrameToStackFrame; + exports.watchdogTimer = anr.watchdogTimer; + exports.LRUMap = lru.LRUMap; + exports._asyncNullishCoalesce = _asyncNullishCoalesce._asyncNullishCoalesce; + exports._asyncOptionalChain = _asyncOptionalChain._asyncOptionalChain; + exports._asyncOptionalChainDelete = _asyncOptionalChainDelete._asyncOptionalChainDelete; + exports._nullishCoalesce = _nullishCoalesce._nullishCoalesce; + exports._optionalChain = _optionalChain._optionalChain; + exports._optionalChainDelete = _optionalChainDelete._optionalChainDelete; + exports.generatePropagationContext = propagationContext.generatePropagationContext; + exports.SDK_VERSION = version.SDK_VERSION; + exports.escapeStringForRegex = escapeStringForRegex.escapeStringForRegex; + exports.supportsHistory = supportsHistory.supportsHistory; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/debug-build.js +var require_debug_build2 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/debug-build.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var DEBUG_BUILD = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__; + exports.DEBUG_BUILD = DEBUG_BUILD; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/carrier.js +var require_carrier = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/carrier.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(); + function getMainCarrier() { + return getSentryCarrier(utils.GLOBAL_OBJ), utils.GLOBAL_OBJ; + } + function getSentryCarrier(carrier) { + let __SENTRY__ = carrier.__SENTRY__ = carrier.__SENTRY__ || {}; + return __SENTRY__.version = __SENTRY__.version || utils.SDK_VERSION, __SENTRY__[utils.SDK_VERSION] = __SENTRY__[utils.SDK_VERSION] || {}; + } + exports.getMainCarrier = getMainCarrier; + exports.getSentryCarrier = getSentryCarrier; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/session.js +var require_session = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/session.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(); + function makeSession(context) { + let startingTime = utils.timestampInSeconds(), session = { + sid: utils.uuid4(), + init: !0, + timestamp: startingTime, + started: startingTime, + duration: 0, + status: "ok", + errors: 0, + ignoreDuration: !1, + toJSON: () => sessionToJSON(session) + }; + return context && updateSession(session, context), session; + } + function updateSession(session, context = {}) { + if (context.user && (!session.ipAddress && context.user.ip_address && (session.ipAddress = context.user.ip_address), !session.did && !context.did && (session.did = context.user.id || context.user.email || context.user.username)), session.timestamp = context.timestamp || utils.timestampInSeconds(), context.abnormal_mechanism && (session.abnormal_mechanism = context.abnormal_mechanism), context.ignoreDuration && (session.ignoreDuration = context.ignoreDuration), context.sid && (session.sid = context.sid.length === 32 ? context.sid : utils.uuid4()), context.init !== void 0 && (session.init = context.init), !session.did && context.did && (session.did = `${context.did}`), typeof context.started == "number" && (session.started = context.started), session.ignoreDuration) + session.duration = void 0; + else if (typeof context.duration == "number") + session.duration = context.duration; + else { + let duration = session.timestamp - session.started; + session.duration = duration >= 0 ? duration : 0; + } + context.release && (session.release = context.release), context.environment && (session.environment = context.environment), !session.ipAddress && context.ipAddress && (session.ipAddress = context.ipAddress), !session.userAgent && context.userAgent && (session.userAgent = context.userAgent), typeof context.errors == "number" && (session.errors = context.errors), context.status && (session.status = context.status); + } + function closeSession(session, status) { + let context = {}; + status ? context = { status } : session.status === "ok" && (context = { status: "exited" }), updateSession(session, context); + } + function sessionToJSON(session) { + return utils.dropUndefinedKeys({ + sid: `${session.sid}`, + init: session.init, + // Make sure that sec is converted to ms for date constructor + started: new Date(session.started * 1e3).toISOString(), + timestamp: new Date(session.timestamp * 1e3).toISOString(), + status: session.status, + errors: session.errors, + did: typeof session.did == "number" || typeof session.did == "string" ? `${session.did}` : void 0, + duration: session.duration, + abnormal_mechanism: session.abnormal_mechanism, + attrs: { + release: session.release, + environment: session.environment, + ip_address: session.ipAddress, + user_agent: session.userAgent + } + }); + } + exports.closeSession = closeSession; + exports.makeSession = makeSession; + exports.updateSession = updateSession; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/spanOnScope.js +var require_spanOnScope = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/spanOnScope.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), SCOPE_SPAN_FIELD = "_sentrySpan"; + function _setSpanForScope(scope, span) { + span ? utils.addNonEnumerableProperty(scope, SCOPE_SPAN_FIELD, span) : delete scope[SCOPE_SPAN_FIELD]; + } + function _getSpanForScope(scope) { + return scope[SCOPE_SPAN_FIELD]; + } + exports._getSpanForScope = _getSpanForScope; + exports._setSpanForScope = _setSpanForScope; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/scope.js +var require_scope = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/scope.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), session = require_session(), spanOnScope = require_spanOnScope(), DEFAULT_MAX_BREADCRUMBS = 100, ScopeClass = class _ScopeClass { + /** Flag if notifying is happening. */ + /** Callback for client to receive scope changes. */ + /** Callback list that will be called during event processing. */ + /** Array of breadcrumbs. */ + /** User */ + /** Tags */ + /** Extra */ + /** Contexts */ + /** Attachments */ + /** Propagation Context for distributed tracing */ + /** + * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get + * sent to Sentry + */ + /** Fingerprint */ + /** Severity */ + /** + * Transaction Name + * + * IMPORTANT: The transaction name on the scope has nothing to do with root spans/transaction objects. + * It's purpose is to assign a transaction to the scope that's added to non-transaction events. + */ + /** Session */ + /** Request Mode Session Status */ + /** The client on this scope */ + /** Contains the last event id of a captured event. */ + // NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method. + constructor() { + this._notifyingListeners = !1, this._scopeListeners = [], this._eventProcessors = [], this._breadcrumbs = [], this._attachments = [], this._user = {}, this._tags = {}, this._extra = {}, this._contexts = {}, this._sdkProcessingMetadata = {}, this._propagationContext = utils.generatePropagationContext(); + } + /** + * @inheritDoc + */ + clone() { + let newScope = new _ScopeClass(); + return newScope._breadcrumbs = [...this._breadcrumbs], newScope._tags = { ...this._tags }, newScope._extra = { ...this._extra }, newScope._contexts = { ...this._contexts }, newScope._user = this._user, newScope._level = this._level, newScope._session = this._session, newScope._transactionName = this._transactionName, newScope._fingerprint = this._fingerprint, newScope._eventProcessors = [...this._eventProcessors], newScope._requestSession = this._requestSession, newScope._attachments = [...this._attachments], newScope._sdkProcessingMetadata = { ...this._sdkProcessingMetadata }, newScope._propagationContext = { ...this._propagationContext }, newScope._client = this._client, newScope._lastEventId = this._lastEventId, spanOnScope._setSpanForScope(newScope, spanOnScope._getSpanForScope(this)), newScope; + } + /** + * @inheritDoc + */ + setClient(client) { + this._client = client; + } + /** + * @inheritDoc + */ + setLastEventId(lastEventId) { + this._lastEventId = lastEventId; + } + /** + * @inheritDoc + */ + getClient() { + return this._client; + } + /** + * @inheritDoc + */ + lastEventId() { + return this._lastEventId; + } + /** + * @inheritDoc + */ + addScopeListener(callback) { + this._scopeListeners.push(callback); + } + /** + * @inheritDoc + */ + addEventProcessor(callback) { + return this._eventProcessors.push(callback), this; + } + /** + * @inheritDoc + */ + setUser(user) { + return this._user = user || { + email: void 0, + id: void 0, + ip_address: void 0, + username: void 0 + }, this._session && session.updateSession(this._session, { user }), this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + getUser() { + return this._user; + } + /** + * @inheritDoc + */ + getRequestSession() { + return this._requestSession; + } + /** + * @inheritDoc + */ + setRequestSession(requestSession) { + return this._requestSession = requestSession, this; + } + /** + * @inheritDoc + */ + setTags(tags) { + return this._tags = { + ...this._tags, + ...tags + }, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + setTag(key, value) { + return this._tags = { ...this._tags, [key]: value }, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + setExtras(extras) { + return this._extra = { + ...this._extra, + ...extras + }, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + setExtra(key, extra) { + return this._extra = { ...this._extra, [key]: extra }, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + setFingerprint(fingerprint) { + return this._fingerprint = fingerprint, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + setLevel(level) { + return this._level = level, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + setTransactionName(name) { + return this._transactionName = name, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + setContext(key, context) { + return context === null ? delete this._contexts[key] : this._contexts[key] = context, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + setSession(session2) { + return session2 ? this._session = session2 : delete this._session, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + getSession() { + return this._session; + } + /** + * @inheritDoc + */ + update(captureContext) { + if (!captureContext) + return this; + let scopeToMerge = typeof captureContext == "function" ? captureContext(this) : captureContext, [scopeInstance, requestSession] = scopeToMerge instanceof Scope ? [scopeToMerge.getScopeData(), scopeToMerge.getRequestSession()] : utils.isPlainObject(scopeToMerge) ? [captureContext, captureContext.requestSession] : [], { tags, extra, user, contexts, level, fingerprint = [], propagationContext } = scopeInstance || {}; + return this._tags = { ...this._tags, ...tags }, this._extra = { ...this._extra, ...extra }, this._contexts = { ...this._contexts, ...contexts }, user && Object.keys(user).length && (this._user = user), level && (this._level = level), fingerprint.length && (this._fingerprint = fingerprint), propagationContext && (this._propagationContext = propagationContext), requestSession && (this._requestSession = requestSession), this; + } + /** + * @inheritDoc + */ + clear() { + return this._breadcrumbs = [], this._tags = {}, this._extra = {}, this._user = {}, this._contexts = {}, this._level = void 0, this._transactionName = void 0, this._fingerprint = void 0, this._requestSession = void 0, this._session = void 0, spanOnScope._setSpanForScope(this, void 0), this._attachments = [], this._propagationContext = utils.generatePropagationContext(), this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + addBreadcrumb(breadcrumb, maxBreadcrumbs) { + let maxCrumbs = typeof maxBreadcrumbs == "number" ? maxBreadcrumbs : DEFAULT_MAX_BREADCRUMBS; + if (maxCrumbs <= 0) + return this; + let mergedBreadcrumb = { + timestamp: utils.dateTimestampInSeconds(), + ...breadcrumb + }, breadcrumbs = this._breadcrumbs; + return breadcrumbs.push(mergedBreadcrumb), this._breadcrumbs = breadcrumbs.length > maxCrumbs ? breadcrumbs.slice(-maxCrumbs) : breadcrumbs, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + getLastBreadcrumb() { + return this._breadcrumbs[this._breadcrumbs.length - 1]; + } + /** + * @inheritDoc + */ + clearBreadcrumbs() { + return this._breadcrumbs = [], this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + addAttachment(attachment) { + return this._attachments.push(attachment), this; + } + /** + * @inheritDoc + */ + clearAttachments() { + return this._attachments = [], this; + } + /** @inheritDoc */ + getScopeData() { + return { + breadcrumbs: this._breadcrumbs, + attachments: this._attachments, + contexts: this._contexts, + tags: this._tags, + extra: this._extra, + user: this._user, + level: this._level, + fingerprint: this._fingerprint || [], + eventProcessors: this._eventProcessors, + propagationContext: this._propagationContext, + sdkProcessingMetadata: this._sdkProcessingMetadata, + transactionName: this._transactionName, + span: spanOnScope._getSpanForScope(this) + }; + } + /** + * @inheritDoc + */ + setSDKProcessingMetadata(newData) { + return this._sdkProcessingMetadata = { ...this._sdkProcessingMetadata, ...newData }, this; + } + /** + * @inheritDoc + */ + setPropagationContext(context) { + return this._propagationContext = context, this; + } + /** + * @inheritDoc + */ + getPropagationContext() { + return this._propagationContext; + } + /** + * @inheritDoc + */ + captureException(exception, hint) { + let eventId = hint && hint.event_id ? hint.event_id : utils.uuid4(); + if (!this._client) + return utils.logger.warn("No client configured on scope - will not capture exception!"), eventId; + let syntheticException = new Error("Sentry syntheticException"); + return this._client.captureException( + exception, + { + originalException: exception, + syntheticException, + ...hint, + event_id: eventId + }, + this + ), eventId; + } + /** + * @inheritDoc + */ + captureMessage(message, level, hint) { + let eventId = hint && hint.event_id ? hint.event_id : utils.uuid4(); + if (!this._client) + return utils.logger.warn("No client configured on scope - will not capture message!"), eventId; + let syntheticException = new Error(message); + return this._client.captureMessage( + message, + level, + { + originalException: message, + syntheticException, + ...hint, + event_id: eventId + }, + this + ), eventId; + } + /** + * @inheritDoc + */ + captureEvent(event, hint) { + let eventId = hint && hint.event_id ? hint.event_id : utils.uuid4(); + return this._client ? (this._client.captureEvent(event, { ...hint, event_id: eventId }, this), eventId) : (utils.logger.warn("No client configured on scope - will not capture event!"), eventId); + } + /** + * This will be called on every set call. + */ + _notifyScopeListeners() { + this._notifyingListeners || (this._notifyingListeners = !0, this._scopeListeners.forEach((callback) => { + callback(this); + }), this._notifyingListeners = !1); + } + }, Scope = ScopeClass; + exports.Scope = Scope; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/defaultScopes.js +var require_defaultScopes = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/defaultScopes.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), scope = require_scope(); + function getDefaultCurrentScope() { + return utils.getGlobalSingleton("defaultCurrentScope", () => new scope.Scope()); + } + function getDefaultIsolationScope() { + return utils.getGlobalSingleton("defaultIsolationScope", () => new scope.Scope()); + } + exports.getDefaultCurrentScope = getDefaultCurrentScope; + exports.getDefaultIsolationScope = getDefaultIsolationScope; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/asyncContext/stackStrategy.js +var require_stackStrategy = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/asyncContext/stackStrategy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), defaultScopes = require_defaultScopes(), scope = require_scope(), carrier = require_carrier(), AsyncContextStack = class { + constructor(scope$1, isolationScope) { + let assignedScope; + scope$1 ? assignedScope = scope$1 : assignedScope = new scope.Scope(); + let assignedIsolationScope; + isolationScope ? assignedIsolationScope = isolationScope : assignedIsolationScope = new scope.Scope(), this._stack = [{ scope: assignedScope }], this._isolationScope = assignedIsolationScope; + } + /** + * Fork a scope for the stack. + */ + withScope(callback) { + let scope2 = this._pushScope(), maybePromiseResult; + try { + maybePromiseResult = callback(scope2); + } catch (e) { + throw this._popScope(), e; + } + return utils.isThenable(maybePromiseResult) ? maybePromiseResult.then( + (res) => (this._popScope(), res), + (e) => { + throw this._popScope(), e; + } + ) : (this._popScope(), maybePromiseResult); + } + /** + * Get the client of the stack. + */ + getClient() { + return this.getStackTop().client; + } + /** + * Returns the scope of the top stack. + */ + getScope() { + return this.getStackTop().scope; + } + /** + * Get the isolation scope for the stack. + */ + getIsolationScope() { + return this._isolationScope; + } + /** + * Returns the scope stack for domains or the process. + */ + getStack() { + return this._stack; + } + /** + * Returns the topmost scope layer in the order domain > local > process. + */ + getStackTop() { + return this._stack[this._stack.length - 1]; + } + /** + * Push a scope to the stack. + */ + _pushScope() { + let scope2 = this.getScope().clone(); + return this.getStack().push({ + client: this.getClient(), + scope: scope2 + }), scope2; + } + /** + * Pop a scope from the stack. + */ + _popScope() { + return this.getStack().length <= 1 ? !1 : !!this.getStack().pop(); + } + }; + function getAsyncContextStack() { + let registry = carrier.getMainCarrier(), sentry = carrier.getSentryCarrier(registry); + return sentry.stack = sentry.stack || new AsyncContextStack(defaultScopes.getDefaultCurrentScope(), defaultScopes.getDefaultIsolationScope()); + } + function withScope(callback) { + return getAsyncContextStack().withScope(callback); + } + function withSetScope(scope2, callback) { + let stack = getAsyncContextStack(); + return stack.withScope(() => (stack.getStackTop().scope = scope2, callback(scope2))); + } + function withIsolationScope(callback) { + return getAsyncContextStack().withScope(() => callback(getAsyncContextStack().getIsolationScope())); + } + function getStackAsyncContextStrategy() { + return { + withIsolationScope, + withScope, + withSetScope, + withSetIsolationScope: (_isolationScope, callback) => withIsolationScope(callback), + getCurrentScope: () => getAsyncContextStack().getScope(), + getIsolationScope: () => getAsyncContextStack().getIsolationScope() + }; + } + exports.AsyncContextStack = AsyncContextStack; + exports.getStackAsyncContextStrategy = getStackAsyncContextStrategy; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/asyncContext/index.js +var require_asyncContext = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/asyncContext/index.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var carrier = require_carrier(), stackStrategy = require_stackStrategy(); + function setAsyncContextStrategy(strategy) { + let registry = carrier.getMainCarrier(), sentry = carrier.getSentryCarrier(registry); + sentry.acs = strategy; + } + function getAsyncContextStrategy(carrier$1) { + let sentry = carrier.getSentryCarrier(carrier$1); + return sentry.acs ? sentry.acs : stackStrategy.getStackAsyncContextStrategy(); + } + exports.getAsyncContextStrategy = getAsyncContextStrategy; + exports.setAsyncContextStrategy = setAsyncContextStrategy; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/currentScopes.js +var require_currentScopes = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/currentScopes.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), index = require_asyncContext(), carrier = require_carrier(), scope = require_scope(); + function getCurrentScope() { + let carrier$1 = carrier.getMainCarrier(); + return index.getAsyncContextStrategy(carrier$1).getCurrentScope(); + } + function getIsolationScope() { + let carrier$1 = carrier.getMainCarrier(); + return index.getAsyncContextStrategy(carrier$1).getIsolationScope(); + } + function getGlobalScope() { + return utils.getGlobalSingleton("globalScope", () => new scope.Scope()); + } + function withScope(...rest) { + let carrier$1 = carrier.getMainCarrier(), acs = index.getAsyncContextStrategy(carrier$1); + if (rest.length === 2) { + let [scope2, callback] = rest; + return scope2 ? acs.withSetScope(scope2, callback) : acs.withScope(callback); + } + return acs.withScope(rest[0]); + } + function withIsolationScope(...rest) { + let carrier$1 = carrier.getMainCarrier(), acs = index.getAsyncContextStrategy(carrier$1); + if (rest.length === 2) { + let [isolationScope, callback] = rest; + return isolationScope ? acs.withSetIsolationScope(isolationScope, callback) : acs.withIsolationScope(callback); + } + return acs.withIsolationScope(rest[0]); + } + function getClient() { + return getCurrentScope().getClient(); + } + exports.getClient = getClient; + exports.getCurrentScope = getCurrentScope; + exports.getGlobalScope = getGlobalScope; + exports.getIsolationScope = getIsolationScope; + exports.withIsolationScope = withIsolationScope; + exports.withScope = withScope; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/metric-summary.js +var require_metric_summary = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/metric-summary.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), METRICS_SPAN_FIELD = "_sentryMetrics"; + function getMetricSummaryJsonForSpan(span) { + let storage = span[METRICS_SPAN_FIELD]; + if (!storage) + return; + let output = {}; + for (let [, [exportKey, summary]] of storage) + output[exportKey] || (output[exportKey] = []), output[exportKey].push(utils.dropUndefinedKeys(summary)); + return output; + } + function updateMetricSummaryOnSpan(span, metricType, sanitizedName, value, unit, tags, bucketKey) { + let storage = span[METRICS_SPAN_FIELD] || (span[METRICS_SPAN_FIELD] = /* @__PURE__ */ new Map()), exportKey = `${metricType}:${sanitizedName}@${unit}`, bucketItem = storage.get(bucketKey); + if (bucketItem) { + let [, summary] = bucketItem; + storage.set(bucketKey, [ + exportKey, + { + min: Math.min(summary.min, value), + max: Math.max(summary.max, value), + count: summary.count += 1, + sum: summary.sum += value, + tags: summary.tags + } + ]); + } else + storage.set(bucketKey, [ + exportKey, + { + min: value, + max: value, + count: 1, + sum: value, + tags + } + ]); + } + exports.getMetricSummaryJsonForSpan = getMetricSummaryJsonForSpan; + exports.updateMetricSummaryOnSpan = updateMetricSummaryOnSpan; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/semanticAttributes.js +var require_semanticAttributes = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/semanticAttributes.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = "sentry.source", SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = "sentry.sample_rate", SEMANTIC_ATTRIBUTE_SENTRY_OP = "sentry.op", SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = "sentry.origin", SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON = "sentry.idle_span_finish_reason", SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT = "sentry.measurement_unit", SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE = "sentry.measurement_value", SEMANTIC_ATTRIBUTE_PROFILE_ID = "sentry.profile_id", SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME = "sentry.exclusive_time", SEMANTIC_ATTRIBUTE_CACHE_HIT = "cache.hit", SEMANTIC_ATTRIBUTE_CACHE_KEY = "cache.key", SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE = "cache.item_size"; + exports.SEMANTIC_ATTRIBUTE_CACHE_HIT = SEMANTIC_ATTRIBUTE_CACHE_HIT; + exports.SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE = SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE; + exports.SEMANTIC_ATTRIBUTE_CACHE_KEY = SEMANTIC_ATTRIBUTE_CACHE_KEY; + exports.SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME = SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME; + exports.SEMANTIC_ATTRIBUTE_PROFILE_ID = SEMANTIC_ATTRIBUTE_PROFILE_ID; + exports.SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON = SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON; + exports.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT = SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT; + exports.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE = SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE; + exports.SEMANTIC_ATTRIBUTE_SENTRY_OP = SEMANTIC_ATTRIBUTE_SENTRY_OP; + exports.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN; + exports.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE; + exports.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = SEMANTIC_ATTRIBUTE_SENTRY_SOURCE; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/spanstatus.js +var require_spanstatus = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/spanstatus.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var SPAN_STATUS_UNSET = 0, SPAN_STATUS_OK = 1, SPAN_STATUS_ERROR = 2; + function getSpanStatusFromHttpCode(httpStatus) { + if (httpStatus < 400 && httpStatus >= 100) + return { code: SPAN_STATUS_OK }; + if (httpStatus >= 400 && httpStatus < 500) + switch (httpStatus) { + case 401: + return { code: SPAN_STATUS_ERROR, message: "unauthenticated" }; + case 403: + return { code: SPAN_STATUS_ERROR, message: "permission_denied" }; + case 404: + return { code: SPAN_STATUS_ERROR, message: "not_found" }; + case 409: + return { code: SPAN_STATUS_ERROR, message: "already_exists" }; + case 413: + return { code: SPAN_STATUS_ERROR, message: "failed_precondition" }; + case 429: + return { code: SPAN_STATUS_ERROR, message: "resource_exhausted" }; + case 499: + return { code: SPAN_STATUS_ERROR, message: "cancelled" }; + default: + return { code: SPAN_STATUS_ERROR, message: "invalid_argument" }; + } + if (httpStatus >= 500 && httpStatus < 600) + switch (httpStatus) { + case 501: + return { code: SPAN_STATUS_ERROR, message: "unimplemented" }; + case 503: + return { code: SPAN_STATUS_ERROR, message: "unavailable" }; + case 504: + return { code: SPAN_STATUS_ERROR, message: "deadline_exceeded" }; + default: + return { code: SPAN_STATUS_ERROR, message: "internal_error" }; + } + return { code: SPAN_STATUS_ERROR, message: "unknown_error" }; + } + function setHttpStatus(span, httpStatus) { + span.setAttribute("http.response.status_code", httpStatus); + let spanStatus = getSpanStatusFromHttpCode(httpStatus); + spanStatus.message !== "unknown_error" && span.setStatus(spanStatus); + } + exports.SPAN_STATUS_ERROR = SPAN_STATUS_ERROR; + exports.SPAN_STATUS_OK = SPAN_STATUS_OK; + exports.SPAN_STATUS_UNSET = SPAN_STATUS_UNSET; + exports.getSpanStatusFromHttpCode = getSpanStatusFromHttpCode; + exports.setHttpStatus = setHttpStatus; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/spanUtils.js +var require_spanUtils = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/spanUtils.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), index = require_asyncContext(), carrier = require_carrier(), currentScopes = require_currentScopes(), metricSummary = require_metric_summary(), semanticAttributes = require_semanticAttributes(), spanstatus = require_spanstatus(), spanOnScope = require_spanOnScope(), TRACE_FLAG_NONE = 0, TRACE_FLAG_SAMPLED = 1; + function spanToTransactionTraceContext(span) { + let { spanId: span_id, traceId: trace_id } = span.spanContext(), { data, op, parent_span_id, status, origin } = spanToJSON(span); + return utils.dropUndefinedKeys({ + parent_span_id, + span_id, + trace_id, + data, + op, + status, + origin + }); + } + function spanToTraceContext(span) { + let { spanId: span_id, traceId: trace_id } = span.spanContext(), { parent_span_id } = spanToJSON(span); + return utils.dropUndefinedKeys({ parent_span_id, span_id, trace_id }); + } + function spanToTraceHeader(span) { + let { traceId, spanId } = span.spanContext(), sampled = spanIsSampled(span); + return utils.generateSentryTraceHeader(traceId, spanId, sampled); + } + function spanTimeInputToSeconds(input) { + return typeof input == "number" ? ensureTimestampInSeconds(input) : Array.isArray(input) ? input[0] + input[1] / 1e9 : input instanceof Date ? ensureTimestampInSeconds(input.getTime()) : utils.timestampInSeconds(); + } + function ensureTimestampInSeconds(timestamp) { + return timestamp > 9999999999 ? timestamp / 1e3 : timestamp; + } + function spanToJSON(span) { + if (spanIsSentrySpan(span)) + return span.getSpanJSON(); + try { + let { spanId: span_id, traceId: trace_id } = span.spanContext(); + if (spanIsOpenTelemetrySdkTraceBaseSpan(span)) { + let { attributes, startTime, name, endTime, parentSpanId, status } = span; + return utils.dropUndefinedKeys({ + span_id, + trace_id, + data: attributes, + description: name, + parent_span_id: parentSpanId, + start_timestamp: spanTimeInputToSeconds(startTime), + // This is [0,0] by default in OTEL, in which case we want to interpret this as no end time + timestamp: spanTimeInputToSeconds(endTime) || void 0, + status: getStatusMessage(status), + op: attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP], + origin: attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN], + _metrics_summary: metricSummary.getMetricSummaryJsonForSpan(span) + }); + } + return { + span_id, + trace_id + }; + } catch { + return {}; + } + } + function spanIsOpenTelemetrySdkTraceBaseSpan(span) { + let castSpan = span; + return !!castSpan.attributes && !!castSpan.startTime && !!castSpan.name && !!castSpan.endTime && !!castSpan.status; + } + function spanIsSentrySpan(span) { + return typeof span.getSpanJSON == "function"; + } + function spanIsSampled(span) { + let { traceFlags } = span.spanContext(); + return traceFlags === TRACE_FLAG_SAMPLED; + } + function getStatusMessage(status) { + if (!(!status || status.code === spanstatus.SPAN_STATUS_UNSET)) + return status.code === spanstatus.SPAN_STATUS_OK ? "ok" : status.message || "unknown_error"; + } + var CHILD_SPANS_FIELD = "_sentryChildSpans", ROOT_SPAN_FIELD = "_sentryRootSpan"; + function addChildSpanToSpan(span, childSpan) { + let rootSpan = span[ROOT_SPAN_FIELD] || span; + utils.addNonEnumerableProperty(childSpan, ROOT_SPAN_FIELD, rootSpan), span[CHILD_SPANS_FIELD] ? span[CHILD_SPANS_FIELD].add(childSpan) : utils.addNonEnumerableProperty(span, CHILD_SPANS_FIELD, /* @__PURE__ */ new Set([childSpan])); + } + function removeChildSpanFromSpan(span, childSpan) { + span[CHILD_SPANS_FIELD] && span[CHILD_SPANS_FIELD].delete(childSpan); + } + function getSpanDescendants(span) { + let resultSet = /* @__PURE__ */ new Set(); + function addSpanChildren(span2) { + if (!resultSet.has(span2) && spanIsSampled(span2)) { + resultSet.add(span2); + let childSpans = span2[CHILD_SPANS_FIELD] ? Array.from(span2[CHILD_SPANS_FIELD]) : []; + for (let childSpan of childSpans) + addSpanChildren(childSpan); + } + } + return addSpanChildren(span), Array.from(resultSet); + } + function getRootSpan(span) { + return span[ROOT_SPAN_FIELD] || span; + } + function getActiveSpan() { + let carrier$1 = carrier.getMainCarrier(), acs = index.getAsyncContextStrategy(carrier$1); + return acs.getActiveSpan ? acs.getActiveSpan() : spanOnScope._getSpanForScope(currentScopes.getCurrentScope()); + } + function updateMetricSummaryOnActiveSpan(metricType, sanitizedName, value, unit, tags, bucketKey) { + let span = getActiveSpan(); + span && metricSummary.updateMetricSummaryOnSpan(span, metricType, sanitizedName, value, unit, tags, bucketKey); + } + exports.TRACE_FLAG_NONE = TRACE_FLAG_NONE; + exports.TRACE_FLAG_SAMPLED = TRACE_FLAG_SAMPLED; + exports.addChildSpanToSpan = addChildSpanToSpan; + exports.getActiveSpan = getActiveSpan; + exports.getRootSpan = getRootSpan; + exports.getSpanDescendants = getSpanDescendants; + exports.getStatusMessage = getStatusMessage; + exports.removeChildSpanFromSpan = removeChildSpanFromSpan; + exports.spanIsSampled = spanIsSampled; + exports.spanTimeInputToSeconds = spanTimeInputToSeconds; + exports.spanToJSON = spanToJSON; + exports.spanToTraceContext = spanToTraceContext; + exports.spanToTraceHeader = spanToTraceHeader; + exports.spanToTransactionTraceContext = spanToTransactionTraceContext; + exports.updateMetricSummaryOnActiveSpan = updateMetricSummaryOnActiveSpan; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/errors.js +var require_errors = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/errors.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), debugBuild = require_debug_build2(), spanUtils = require_spanUtils(), spanstatus = require_spanstatus(), errorsInstrumented = !1; + function registerSpanErrorInstrumentation() { + errorsInstrumented || (errorsInstrumented = !0, utils.addGlobalErrorInstrumentationHandler(errorCallback), utils.addGlobalUnhandledRejectionInstrumentationHandler(errorCallback)); + } + function errorCallback() { + let activeSpan = spanUtils.getActiveSpan(), rootSpan = activeSpan && spanUtils.getRootSpan(activeSpan); + if (rootSpan) { + let message = "internal_error"; + debugBuild.DEBUG_BUILD && utils.logger.log(`[Tracing] Root span: ${message} -> Global error occured`), rootSpan.setStatus({ code: spanstatus.SPAN_STATUS_ERROR, message }); + } + } + errorCallback.tag = "sentry_tracingErrorCallback"; + exports.registerSpanErrorInstrumentation = registerSpanErrorInstrumentation; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/utils.js +var require_utils = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/utils.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), SCOPE_ON_START_SPAN_FIELD = "_sentryScope", ISOLATION_SCOPE_ON_START_SPAN_FIELD = "_sentryIsolationScope"; + function setCapturedScopesOnSpan(span, scope, isolationScope) { + span && (utils.addNonEnumerableProperty(span, ISOLATION_SCOPE_ON_START_SPAN_FIELD, isolationScope), utils.addNonEnumerableProperty(span, SCOPE_ON_START_SPAN_FIELD, scope)); + } + function getCapturedScopesOnSpan(span) { + return { + scope: span[SCOPE_ON_START_SPAN_FIELD], + isolationScope: span[ISOLATION_SCOPE_ON_START_SPAN_FIELD] + }; + } + exports.stripUrlQueryAndFragment = utils.stripUrlQueryAndFragment; + exports.getCapturedScopesOnSpan = getCapturedScopesOnSpan; + exports.setCapturedScopesOnSpan = setCapturedScopesOnSpan; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/hubextensions.js +var require_hubextensions = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/hubextensions.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var errors = require_errors(); + function addTracingExtensions() { + errors.registerSpanErrorInstrumentation(); + } + exports.addTracingExtensions = addTracingExtensions; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/hasTracingEnabled.js +var require_hasTracingEnabled = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/hasTracingEnabled.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var currentScopes = require_currentScopes(); + function hasTracingEnabled(maybeOptions) { + if (typeof __SENTRY_TRACING__ == "boolean" && !__SENTRY_TRACING__) + return !1; + let options = maybeOptions || getClientOptions(); + return !!options && (options.enableTracing || "tracesSampleRate" in options || "tracesSampler" in options); + } + function getClientOptions() { + let client = currentScopes.getClient(); + return client && client.getOptions(); + } + exports.hasTracingEnabled = hasTracingEnabled; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/sentryNonRecordingSpan.js +var require_sentryNonRecordingSpan = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/sentryNonRecordingSpan.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), spanUtils = require_spanUtils(), SentryNonRecordingSpan = class { + constructor(spanContext = {}) { + this._traceId = spanContext.traceId || utils.uuid4(), this._spanId = spanContext.spanId || utils.uuid4().substring(16); + } + /** @inheritdoc */ + spanContext() { + return { + spanId: this._spanId, + traceId: this._traceId, + traceFlags: spanUtils.TRACE_FLAG_NONE + }; + } + /** @inheritdoc */ + // eslint-disable-next-line @typescript-eslint/no-empty-function + end(_timestamp) { + } + /** @inheritdoc */ + setAttribute(_key, _value) { + return this; + } + /** @inheritdoc */ + setAttributes(_values) { + return this; + } + /** @inheritdoc */ + setStatus(_status) { + return this; + } + /** @inheritdoc */ + updateName(_name) { + return this; + } + /** @inheritdoc */ + isRecording() { + return !1; + } + /** @inheritdoc */ + addEvent(_name, _attributesOrStartTime, _startTime) { + return this; + } + }; + exports.SentryNonRecordingSpan = SentryNonRecordingSpan; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/handleCallbackErrors.js +var require_handleCallbackErrors = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/handleCallbackErrors.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(); + function handleCallbackErrors(fn, onError, onFinally = () => { + }) { + let maybePromiseResult; + try { + maybePromiseResult = fn(); + } catch (e) { + throw onError(e), onFinally(), e; + } + return maybeHandlePromiseRejection(maybePromiseResult, onError, onFinally); + } + function maybeHandlePromiseRejection(value, onError, onFinally) { + return utils.isThenable(value) ? value.then( + (res) => (onFinally(), res), + (e) => { + throw onError(e), onFinally(), e; + } + ) : (onFinally(), value); + } + exports.handleCallbackErrors = handleCallbackErrors; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/constants.js +var require_constants = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/constants.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var DEFAULT_ENVIRONMENT = "production"; + exports.DEFAULT_ENVIRONMENT = DEFAULT_ENVIRONMENT; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/dynamicSamplingContext.js +var require_dynamicSamplingContext = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/dynamicSamplingContext.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), constants = require_constants(), currentScopes = require_currentScopes(), semanticAttributes = require_semanticAttributes(), spanUtils = require_spanUtils(), FROZEN_DSC_FIELD = "_frozenDsc"; + function freezeDscOnSpan(span, dsc) { + let spanWithMaybeDsc = span; + utils.addNonEnumerableProperty(spanWithMaybeDsc, FROZEN_DSC_FIELD, dsc); + } + function getDynamicSamplingContextFromClient(trace_id, client) { + let options = client.getOptions(), { publicKey: public_key } = client.getDsn() || {}, dsc = utils.dropUndefinedKeys({ + environment: options.environment || constants.DEFAULT_ENVIRONMENT, + release: options.release, + public_key, + trace_id + }); + return client.emit("createDsc", dsc), dsc; + } + function getDynamicSamplingContextFromSpan(span) { + let client = currentScopes.getClient(); + if (!client) + return {}; + let dsc = getDynamicSamplingContextFromClient(spanUtils.spanToJSON(span).trace_id || "", client), rootSpan = spanUtils.getRootSpan(span); + if (!rootSpan) + return dsc; + let frozenDsc = rootSpan[FROZEN_DSC_FIELD]; + if (frozenDsc) + return frozenDsc; + let jsonSpan = spanUtils.spanToJSON(rootSpan), attributes = jsonSpan.data || {}, maybeSampleRate = attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]; + maybeSampleRate != null && (dsc.sample_rate = `${maybeSampleRate}`); + let source = attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]; + return source && source !== "url" && (dsc.transaction = jsonSpan.description), dsc.sampled = String(spanUtils.spanIsSampled(rootSpan)), client.emit("createDsc", dsc), dsc; + } + function spanToBaggageHeader(span) { + let dsc = getDynamicSamplingContextFromSpan(span); + return utils.dynamicSamplingContextToSentryBaggageHeader(dsc); + } + exports.freezeDscOnSpan = freezeDscOnSpan; + exports.getDynamicSamplingContextFromClient = getDynamicSamplingContextFromClient; + exports.getDynamicSamplingContextFromSpan = getDynamicSamplingContextFromSpan; + exports.spanToBaggageHeader = spanToBaggageHeader; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/logSpans.js +var require_logSpans = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/logSpans.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), debugBuild = require_debug_build2(), spanUtils = require_spanUtils(); + function logSpanStart(span) { + if (!debugBuild.DEBUG_BUILD) return; + let { description = "< unknown name >", op = "< unknown op >", parent_span_id: parentSpanId } = spanUtils.spanToJSON(span), { spanId } = span.spanContext(), sampled = spanUtils.spanIsSampled(span), rootSpan = spanUtils.getRootSpan(span), isRootSpan = rootSpan === span, header = `[Tracing] Starting ${sampled ? "sampled" : "unsampled"} ${isRootSpan ? "root " : ""}span`, infoParts = [`op: ${op}`, `name: ${description}`, `ID: ${spanId}`]; + if (parentSpanId && infoParts.push(`parent ID: ${parentSpanId}`), !isRootSpan) { + let { op: op2, description: description2 } = spanUtils.spanToJSON(rootSpan); + infoParts.push(`root ID: ${rootSpan.spanContext().spanId}`), op2 && infoParts.push(`root op: ${op2}`), description2 && infoParts.push(`root description: ${description2}`); + } + utils.logger.log(`${header} + ${infoParts.join(` + `)}`); + } + function logSpanEnd(span) { + if (!debugBuild.DEBUG_BUILD) return; + let { description = "< unknown name >", op = "< unknown op >" } = spanUtils.spanToJSON(span), { spanId } = span.spanContext(), isRootSpan = spanUtils.getRootSpan(span) === span, msg = `[Tracing] Finishing "${op}" ${isRootSpan ? "root " : ""}span "${description}" with ID ${spanId}`; + utils.logger.log(msg); + } + exports.logSpanEnd = logSpanEnd; + exports.logSpanStart = logSpanStart; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/parseSampleRate.js +var require_parseSampleRate = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/parseSampleRate.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), debugBuild = require_debug_build2(); + function parseSampleRate(sampleRate) { + if (typeof sampleRate == "boolean") + return Number(sampleRate); + let rate = typeof sampleRate == "string" ? parseFloat(sampleRate) : sampleRate; + if (typeof rate != "number" || isNaN(rate) || rate < 0 || rate > 1) { + debugBuild.DEBUG_BUILD && utils.logger.warn( + `[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify( + sampleRate + )} of type ${JSON.stringify(typeof sampleRate)}.` + ); + return; + } + return rate; + } + exports.parseSampleRate = parseSampleRate; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/sampling.js +var require_sampling = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/sampling.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), debugBuild = require_debug_build2(), hasTracingEnabled = require_hasTracingEnabled(), parseSampleRate = require_parseSampleRate(); + function sampleSpan(options, samplingContext) { + if (!hasTracingEnabled.hasTracingEnabled(options)) + return [!1]; + let sampleRate; + typeof options.tracesSampler == "function" ? sampleRate = options.tracesSampler(samplingContext) : samplingContext.parentSampled !== void 0 ? sampleRate = samplingContext.parentSampled : typeof options.tracesSampleRate < "u" ? sampleRate = options.tracesSampleRate : sampleRate = 1; + let parsedSampleRate = parseSampleRate.parseSampleRate(sampleRate); + return parsedSampleRate === void 0 ? (debugBuild.DEBUG_BUILD && utils.logger.warn("[Tracing] Discarding transaction because of invalid sample rate."), [!1]) : parsedSampleRate ? Math.random() < parsedSampleRate ? [!0, parsedSampleRate] : (debugBuild.DEBUG_BUILD && utils.logger.log( + `[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number( + sampleRate + )})` + ), [!1, parsedSampleRate]) : (debugBuild.DEBUG_BUILD && utils.logger.log( + `[Tracing] Discarding transaction because ${typeof options.tracesSampler == "function" ? "tracesSampler returned 0 or false" : "a negative sampling decision was inherited or tracesSampleRate is set to 0"}` + ), [!1, parsedSampleRate]); + } + exports.sampleSpan = sampleSpan; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/envelope.js +var require_envelope2 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/envelope.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), dynamicSamplingContext = require_dynamicSamplingContext(), spanUtils = require_spanUtils(); + function enhanceEventWithSdkInfo(event, sdkInfo) { + return sdkInfo && (event.sdk = event.sdk || {}, event.sdk.name = event.sdk.name || sdkInfo.name, event.sdk.version = event.sdk.version || sdkInfo.version, event.sdk.integrations = [...event.sdk.integrations || [], ...sdkInfo.integrations || []], event.sdk.packages = [...event.sdk.packages || [], ...sdkInfo.packages || []]), event; + } + function createSessionEnvelope(session, dsn, metadata, tunnel) { + let sdkInfo = utils.getSdkMetadataForEnvelopeHeader(metadata), envelopeHeaders = { + sent_at: (/* @__PURE__ */ new Date()).toISOString(), + ...sdkInfo && { sdk: sdkInfo }, + ...!!tunnel && dsn && { dsn: utils.dsnToString(dsn) } + }, envelopeItem = "aggregates" in session ? [{ type: "sessions" }, session] : [{ type: "session" }, session.toJSON()]; + return utils.createEnvelope(envelopeHeaders, [envelopeItem]); + } + function createEventEnvelope(event, dsn, metadata, tunnel) { + let sdkInfo = utils.getSdkMetadataForEnvelopeHeader(metadata), eventType = event.type && event.type !== "replay_event" ? event.type : "event"; + enhanceEventWithSdkInfo(event, metadata && metadata.sdk); + let envelopeHeaders = utils.createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn); + delete event.sdkProcessingMetadata; + let eventItem = [{ type: eventType }, event]; + return utils.createEnvelope(envelopeHeaders, [eventItem]); + } + function createSpanEnvelope(spans, client) { + function dscHasRequiredProps(dsc2) { + return !!dsc2.trace_id && !!dsc2.public_key; + } + let dsc = dynamicSamplingContext.getDynamicSamplingContextFromSpan(spans[0]), dsn = client && client.getDsn(), tunnel = client && client.getOptions().tunnel, headers = { + sent_at: (/* @__PURE__ */ new Date()).toISOString(), + ...dscHasRequiredProps(dsc) && { trace: dsc }, + ...!!tunnel && dsn && { dsn: utils.dsnToString(dsn) } + }, beforeSendSpan = client && client.getOptions().beforeSendSpan, convertToSpanJSON = beforeSendSpan ? (span) => beforeSendSpan(spanUtils.spanToJSON(span)) : (span) => spanUtils.spanToJSON(span), items = []; + for (let span of spans) { + let spanJson = convertToSpanJSON(span); + spanJson && items.push(utils.createSpanEnvelopeItem(spanJson)); + } + return utils.createEnvelope(headers, items); + } + exports.createEventEnvelope = createEventEnvelope; + exports.createSessionEnvelope = createSessionEnvelope; + exports.createSpanEnvelope = createSpanEnvelope; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/measurement.js +var require_measurement = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/measurement.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var semanticAttributes = require_semanticAttributes(), spanUtils = require_spanUtils(); + function setMeasurement(name, value, unit) { + let activeSpan = spanUtils.getActiveSpan(), rootSpan = activeSpan && spanUtils.getRootSpan(activeSpan); + rootSpan && rootSpan.addEvent(name, { + [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]: value, + [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]: unit + }); + } + function timedEventsToMeasurements(events) { + if (!events || events.length === 0) + return; + let measurements = {}; + return events.forEach((event) => { + let attributes = event.attributes || {}, unit = attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT], value = attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]; + typeof unit == "string" && typeof value == "number" && (measurements[event.name] = { value, unit }); + }), measurements; + } + exports.setMeasurement = setMeasurement; + exports.timedEventsToMeasurements = timedEventsToMeasurements; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/sentrySpan.js +var require_sentrySpan = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/sentrySpan.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), debugBuild = require_debug_build2(), envelope = require_envelope2(), metricSummary = require_metric_summary(), semanticAttributes = require_semanticAttributes(), spanUtils = require_spanUtils(), dynamicSamplingContext = require_dynamicSamplingContext(), logSpans = require_logSpans(), measurement = require_measurement(), utils$1 = require_utils(), MAX_SPAN_COUNT = 1e3, SentrySpan = class { + /** Epoch timestamp in seconds when the span started. */ + /** Epoch timestamp in seconds when the span ended. */ + /** Internal keeper of the status */ + /** The timed events added to this span. */ + /** if true, treat span as a standalone span (not part of a transaction) */ + /** + * You should never call the constructor manually, always use `Sentry.startSpan()` + * or other span methods. + * @internal + * @hideconstructor + * @hidden + */ + constructor(spanContext = {}) { + this._traceId = spanContext.traceId || utils.uuid4(), this._spanId = spanContext.spanId || utils.uuid4().substring(16), this._startTime = spanContext.startTimestamp || utils.timestampInSeconds(), this._attributes = {}, this.setAttributes({ + [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "manual", + [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP]: spanContext.op, + ...spanContext.attributes + }), this._name = spanContext.name, spanContext.parentSpanId && (this._parentSpanId = spanContext.parentSpanId), "sampled" in spanContext && (this._sampled = spanContext.sampled), spanContext.endTimestamp && (this._endTime = spanContext.endTimestamp), this._events = [], this._isStandaloneSpan = spanContext.isStandalone, this._endTime && this._onSpanEnded(); + } + /** @inheritdoc */ + spanContext() { + let { _spanId: spanId, _traceId: traceId, _sampled: sampled } = this; + return { + spanId, + traceId, + traceFlags: sampled ? spanUtils.TRACE_FLAG_SAMPLED : spanUtils.TRACE_FLAG_NONE + }; + } + /** @inheritdoc */ + setAttribute(key, value) { + value === void 0 ? delete this._attributes[key] : this._attributes[key] = value; + } + /** @inheritdoc */ + setAttributes(attributes) { + Object.keys(attributes).forEach((key) => this.setAttribute(key, attributes[key])); + } + /** + * This should generally not be used, + * but we need it for browser tracing where we want to adjust the start time afterwards. + * USE THIS WITH CAUTION! + * + * @hidden + * @internal + */ + updateStartTime(timeInput) { + this._startTime = spanUtils.spanTimeInputToSeconds(timeInput); + } + /** + * @inheritDoc + */ + setStatus(value) { + return this._status = value, this; + } + /** + * @inheritDoc + */ + updateName(name) { + return this._name = name, this; + } + /** @inheritdoc */ + end(endTimestamp) { + this._endTime || (this._endTime = spanUtils.spanTimeInputToSeconds(endTimestamp), logSpans.logSpanEnd(this), this._onSpanEnded()); + } + /** + * Get JSON representation of this span. + * + * @hidden + * @internal This method is purely for internal purposes and should not be used outside + * of SDK code. If you need to get a JSON representation of a span, + * use `spanToJSON(span)` instead. + */ + getSpanJSON() { + return utils.dropUndefinedKeys({ + data: this._attributes, + description: this._name, + op: this._attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP], + parent_span_id: this._parentSpanId, + span_id: this._spanId, + start_timestamp: this._startTime, + status: spanUtils.getStatusMessage(this._status), + timestamp: this._endTime, + trace_id: this._traceId, + origin: this._attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN], + _metrics_summary: metricSummary.getMetricSummaryJsonForSpan(this), + profile_id: this._attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_PROFILE_ID], + exclusive_time: this._attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME], + measurements: measurement.timedEventsToMeasurements(this._events), + is_segment: this._isStandaloneSpan && spanUtils.getRootSpan(this) === this || void 0, + segment_id: this._isStandaloneSpan ? spanUtils.getRootSpan(this).spanContext().spanId : void 0 + }); + } + /** @inheritdoc */ + isRecording() { + return !this._endTime && !!this._sampled; + } + /** + * @inheritdoc + */ + addEvent(name, attributesOrStartTime, startTime) { + debugBuild.DEBUG_BUILD && utils.logger.log("[Tracing] Adding an event to span:", name); + let time = isSpanTimeInput(attributesOrStartTime) ? attributesOrStartTime : startTime || utils.timestampInSeconds(), attributes = isSpanTimeInput(attributesOrStartTime) ? {} : attributesOrStartTime || {}, event = { + name, + time: spanUtils.spanTimeInputToSeconds(time), + attributes + }; + return this._events.push(event), this; + } + /** + * This method should generally not be used, + * but for now we need a way to publicly check if the `_isStandaloneSpan` flag is set. + * USE THIS WITH CAUTION! + * @internal + * @hidden + * @experimental + */ + isStandaloneSpan() { + return !!this._isStandaloneSpan; + } + /** Emit `spanEnd` when the span is ended. */ + _onSpanEnded() { + let client = currentScopes.getClient(); + if (client && client.emit("spanEnd", this), !(this._isStandaloneSpan || this === spanUtils.getRootSpan(this))) + return; + if (this._isStandaloneSpan) { + sendSpanEnvelope(envelope.createSpanEnvelope([this], client)); + return; + } + let transactionEvent = this._convertSpanToTransaction(); + transactionEvent && (utils$1.getCapturedScopesOnSpan(this).scope || currentScopes.getCurrentScope()).captureEvent(transactionEvent); + } + /** + * Finish the transaction & prepare the event to send to Sentry. + */ + _convertSpanToTransaction() { + if (!isFullFinishedSpan(spanUtils.spanToJSON(this))) + return; + this._name || (debugBuild.DEBUG_BUILD && utils.logger.warn("Transaction has no name, falling back to ``."), this._name = ""); + let { scope: capturedSpanScope, isolationScope: capturedSpanIsolationScope } = utils$1.getCapturedScopesOnSpan(this), client = (capturedSpanScope || currentScopes.getCurrentScope()).getClient() || currentScopes.getClient(); + if (this._sampled !== !0) { + debugBuild.DEBUG_BUILD && utils.logger.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."), client && client.recordDroppedEvent("sample_rate", "transaction"); + return; + } + let spans = spanUtils.getSpanDescendants(this).filter((span) => span !== this && !isStandaloneSpan(span)).map((span) => spanUtils.spanToJSON(span)).filter(isFullFinishedSpan), source = this._attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE], transaction = { + contexts: { + trace: spanUtils.spanToTransactionTraceContext(this) + }, + spans: ( + // spans.sort() mutates the array, but `spans` is already a copy so we can safely do this here + // we do not use spans anymore after this point + spans.length > MAX_SPAN_COUNT ? spans.sort((a, b) => a.start_timestamp - b.start_timestamp).slice(0, MAX_SPAN_COUNT) : spans + ), + start_timestamp: this._startTime, + timestamp: this._endTime, + transaction: this._name, + type: "transaction", + sdkProcessingMetadata: { + capturedSpanScope, + capturedSpanIsolationScope, + ...utils.dropUndefinedKeys({ + dynamicSamplingContext: dynamicSamplingContext.getDynamicSamplingContextFromSpan(this) + }) + }, + _metrics_summary: metricSummary.getMetricSummaryJsonForSpan(this), + ...source && { + transaction_info: { + source + } + } + }, measurements = measurement.timedEventsToMeasurements(this._events); + return measurements && Object.keys(measurements).length && (debugBuild.DEBUG_BUILD && utils.logger.log( + "[Measurements] Adding measurements to transaction event", + JSON.stringify(measurements, void 0, 2) + ), transaction.measurements = measurements), transaction; + } + }; + function isSpanTimeInput(value) { + return value && typeof value == "number" || value instanceof Date || Array.isArray(value); + } + function isFullFinishedSpan(input) { + return !!input.start_timestamp && !!input.timestamp && !!input.span_id && !!input.trace_id; + } + function isStandaloneSpan(span) { + return span instanceof SentrySpan && span.isStandaloneSpan(); + } + function sendSpanEnvelope(envelope2) { + let client = currentScopes.getClient(); + if (!client) + return; + let spanItems = envelope2[1]; + if (!spanItems || spanItems.length === 0) { + client.recordDroppedEvent("before_send", "span"); + return; + } + let transport = client.getTransport(); + transport && transport.send(envelope2).then(null, (reason) => { + debugBuild.DEBUG_BUILD && utils.logger.error("Error while sending span:", reason); + }); + } + exports.SentrySpan = SentrySpan; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/trace.js +var require_trace = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/trace.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), carrier = require_carrier(), currentScopes = require_currentScopes(), index = require_asyncContext(), debugBuild = require_debug_build2(), semanticAttributes = require_semanticAttributes(), handleCallbackErrors = require_handleCallbackErrors(), hasTracingEnabled = require_hasTracingEnabled(), spanOnScope = require_spanOnScope(), spanUtils = require_spanUtils(), dynamicSamplingContext = require_dynamicSamplingContext(), logSpans = require_logSpans(), sampling = require_sampling(), sentryNonRecordingSpan = require_sentryNonRecordingSpan(), sentrySpan = require_sentrySpan(), spanstatus = require_spanstatus(), utils$1 = require_utils(), SUPPRESS_TRACING_KEY = "__SENTRY_SUPPRESS_TRACING__"; + function startSpan(context, callback) { + let acs = getAcs(); + if (acs.startSpan) + return acs.startSpan(context, callback); + let spanContext = normalizeContext(context); + return currentScopes.withScope(context.scope, (scope) => { + let parentSpan = getParentSpan(scope), activeSpan = context.onlyIfParent && !parentSpan ? new sentryNonRecordingSpan.SentryNonRecordingSpan() : createChildOrRootSpan({ + parentSpan, + spanContext, + forceTransaction: context.forceTransaction, + scope + }); + return spanOnScope._setSpanForScope(scope, activeSpan), handleCallbackErrors.handleCallbackErrors( + () => callback(activeSpan), + () => { + let { status } = spanUtils.spanToJSON(activeSpan); + activeSpan.isRecording() && (!status || status === "ok") && activeSpan.setStatus({ code: spanstatus.SPAN_STATUS_ERROR, message: "internal_error" }); + }, + () => activeSpan.end() + ); + }); + } + function startSpanManual(context, callback) { + let acs = getAcs(); + if (acs.startSpanManual) + return acs.startSpanManual(context, callback); + let spanContext = normalizeContext(context); + return currentScopes.withScope(context.scope, (scope) => { + let parentSpan = getParentSpan(scope), activeSpan = context.onlyIfParent && !parentSpan ? new sentryNonRecordingSpan.SentryNonRecordingSpan() : createChildOrRootSpan({ + parentSpan, + spanContext, + forceTransaction: context.forceTransaction, + scope + }); + spanOnScope._setSpanForScope(scope, activeSpan); + function finishAndSetSpan() { + activeSpan.end(); + } + return handleCallbackErrors.handleCallbackErrors( + () => callback(activeSpan, finishAndSetSpan), + () => { + let { status } = spanUtils.spanToJSON(activeSpan); + activeSpan.isRecording() && (!status || status === "ok") && activeSpan.setStatus({ code: spanstatus.SPAN_STATUS_ERROR, message: "internal_error" }); + } + ); + }); + } + function startInactiveSpan(context) { + let acs = getAcs(); + if (acs.startInactiveSpan) + return acs.startInactiveSpan(context); + let spanContext = normalizeContext(context), scope = context.scope || currentScopes.getCurrentScope(), parentSpan = getParentSpan(scope); + return context.onlyIfParent && !parentSpan ? new sentryNonRecordingSpan.SentryNonRecordingSpan() : createChildOrRootSpan({ + parentSpan, + spanContext, + forceTransaction: context.forceTransaction, + scope + }); + } + var continueTrace = ({ + sentryTrace, + baggage + }, callback) => currentScopes.withScope((scope) => { + let propagationContext = utils.propagationContextFromHeaders(sentryTrace, baggage); + return scope.setPropagationContext(propagationContext), callback(); + }); + function withActiveSpan(span, callback) { + let acs = getAcs(); + return acs.withActiveSpan ? acs.withActiveSpan(span, callback) : currentScopes.withScope((scope) => (spanOnScope._setSpanForScope(scope, span || void 0), callback(scope))); + } + function suppressTracing(callback) { + let acs = getAcs(); + return acs.suppressTracing ? acs.suppressTracing(callback) : currentScopes.withScope((scope) => (scope.setSDKProcessingMetadata({ [SUPPRESS_TRACING_KEY]: !0 }), callback())); + } + function startNewTrace(callback) { + return currentScopes.withScope((scope) => (scope.setPropagationContext(utils.generatePropagationContext()), debugBuild.DEBUG_BUILD && utils.logger.info(`Starting a new trace with id ${scope.getPropagationContext().traceId}`), withActiveSpan(null, callback))); + } + function createChildOrRootSpan({ + parentSpan, + spanContext, + forceTransaction, + scope + }) { + if (!hasTracingEnabled.hasTracingEnabled()) + return new sentryNonRecordingSpan.SentryNonRecordingSpan(); + let isolationScope = currentScopes.getIsolationScope(), span; + if (parentSpan && !forceTransaction) + span = _startChildSpan(parentSpan, scope, spanContext), spanUtils.addChildSpanToSpan(parentSpan, span); + else if (parentSpan) { + let dsc = dynamicSamplingContext.getDynamicSamplingContextFromSpan(parentSpan), { traceId, spanId: parentSpanId } = parentSpan.spanContext(), parentSampled = spanUtils.spanIsSampled(parentSpan); + span = _startRootSpan( + { + traceId, + parentSpanId, + ...spanContext + }, + scope, + parentSampled + ), dynamicSamplingContext.freezeDscOnSpan(span, dsc); + } else { + let { + traceId, + dsc, + parentSpanId, + sampled: parentSampled + } = { + ...isolationScope.getPropagationContext(), + ...scope.getPropagationContext() + }; + span = _startRootSpan( + { + traceId, + parentSpanId, + ...spanContext + }, + scope, + parentSampled + ), dsc && dynamicSamplingContext.freezeDscOnSpan(span, dsc); + } + return logSpans.logSpanStart(span), utils$1.setCapturedScopesOnSpan(span, scope, isolationScope), span; + } + function normalizeContext(context) { + let initialCtx = { + isStandalone: (context.experimental || {}).standalone, + ...context + }; + if (context.startTime) { + let ctx = { ...initialCtx }; + return ctx.startTimestamp = spanUtils.spanTimeInputToSeconds(context.startTime), delete ctx.startTime, ctx; + } + return initialCtx; + } + function getAcs() { + let carrier$1 = carrier.getMainCarrier(); + return index.getAsyncContextStrategy(carrier$1); + } + function _startRootSpan(spanArguments, scope, parentSampled) { + let client = currentScopes.getClient(), options = client && client.getOptions() || {}, { name = "", attributes } = spanArguments, [sampled, sampleRate] = scope.getScopeData().sdkProcessingMetadata[SUPPRESS_TRACING_KEY] ? [!1] : sampling.sampleSpan(options, { + name, + parentSampled, + attributes, + transactionContext: { + name, + parentSampled + } + }), rootSpan = new sentrySpan.SentrySpan({ + ...spanArguments, + attributes: { + [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: "custom", + ...spanArguments.attributes + }, + sampled + }); + return sampleRate !== void 0 && rootSpan.setAttribute(semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, sampleRate), client && client.emit("spanStart", rootSpan), rootSpan; + } + function _startChildSpan(parentSpan, scope, spanArguments) { + let { spanId, traceId } = parentSpan.spanContext(), sampled = scope.getScopeData().sdkProcessingMetadata[SUPPRESS_TRACING_KEY] ? !1 : spanUtils.spanIsSampled(parentSpan), childSpan = sampled ? new sentrySpan.SentrySpan({ + ...spanArguments, + parentSpanId: spanId, + traceId, + sampled + }) : new sentryNonRecordingSpan.SentryNonRecordingSpan({ traceId }); + spanUtils.addChildSpanToSpan(parentSpan, childSpan); + let client = currentScopes.getClient(); + return client && (client.emit("spanStart", childSpan), spanArguments.endTimestamp && client.emit("spanEnd", childSpan)), childSpan; + } + function getParentSpan(scope) { + let span = spanOnScope._getSpanForScope(scope); + if (!span) + return; + let client = currentScopes.getClient(); + return (client ? client.getOptions() : {}).parentSpanIsAlwaysRootSpan ? spanUtils.getRootSpan(span) : span; + } + exports.continueTrace = continueTrace; + exports.startInactiveSpan = startInactiveSpan; + exports.startNewTrace = startNewTrace; + exports.startSpan = startSpan; + exports.startSpanManual = startSpanManual; + exports.suppressTracing = suppressTracing; + exports.withActiveSpan = withActiveSpan; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/idleSpan.js +var require_idleSpan = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/idleSpan.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), debugBuild = require_debug_build2(), semanticAttributes = require_semanticAttributes(), hasTracingEnabled = require_hasTracingEnabled(), spanOnScope = require_spanOnScope(), spanUtils = require_spanUtils(), sentryNonRecordingSpan = require_sentryNonRecordingSpan(), spanstatus = require_spanstatus(), trace = require_trace(), TRACING_DEFAULTS = { + idleTimeout: 1e3, + finalTimeout: 3e4, + childSpanTimeout: 15e3 + }, FINISH_REASON_HEARTBEAT_FAILED = "heartbeatFailed", FINISH_REASON_IDLE_TIMEOUT = "idleTimeout", FINISH_REASON_FINAL_TIMEOUT = "finalTimeout", FINISH_REASON_EXTERNAL_FINISH = "externalFinish"; + function startIdleSpan(startSpanOptions, options = {}) { + let activities = /* @__PURE__ */ new Map(), _finished = !1, _idleTimeoutID, _finishReason = FINISH_REASON_EXTERNAL_FINISH, _autoFinishAllowed = !options.disableAutoFinish, { + idleTimeout = TRACING_DEFAULTS.idleTimeout, + finalTimeout = TRACING_DEFAULTS.finalTimeout, + childSpanTimeout = TRACING_DEFAULTS.childSpanTimeout, + beforeSpanEnd + } = options, client = currentScopes.getClient(); + if (!client || !hasTracingEnabled.hasTracingEnabled()) + return new sentryNonRecordingSpan.SentryNonRecordingSpan(); + let scope = currentScopes.getCurrentScope(), previousActiveSpan = spanUtils.getActiveSpan(), span = _startIdleSpan(startSpanOptions); + span.end = new Proxy(span.end, { + apply(target, thisArg, args) { + beforeSpanEnd && beforeSpanEnd(span); + let [definedEndTimestamp, ...rest] = args, timestamp = definedEndTimestamp || utils.timestampInSeconds(), spanEndTimestamp = spanUtils.spanTimeInputToSeconds(timestamp), spans = spanUtils.getSpanDescendants(span).filter((child) => child !== span); + if (!spans.length) + return onIdleSpanEnded(spanEndTimestamp), Reflect.apply(target, thisArg, [spanEndTimestamp, ...rest]); + let childEndTimestamps = spans.map((span2) => spanUtils.spanToJSON(span2).timestamp).filter((timestamp2) => !!timestamp2), latestSpanEndTimestamp = childEndTimestamps.length ? Math.max(...childEndTimestamps) : void 0, spanStartTimestamp = spanUtils.spanToJSON(span).start_timestamp, endTimestamp = Math.min( + spanStartTimestamp ? spanStartTimestamp + finalTimeout / 1e3 : 1 / 0, + Math.max(spanStartTimestamp || -1 / 0, Math.min(spanEndTimestamp, latestSpanEndTimestamp || 1 / 0)) + ); + return onIdleSpanEnded(endTimestamp), Reflect.apply(target, thisArg, [endTimestamp, ...rest]); + } + }); + function _cancelIdleTimeout() { + _idleTimeoutID && (clearTimeout(_idleTimeoutID), _idleTimeoutID = void 0); + } + function _restartIdleTimeout(endTimestamp) { + _cancelIdleTimeout(), _idleTimeoutID = setTimeout(() => { + !_finished && activities.size === 0 && _autoFinishAllowed && (_finishReason = FINISH_REASON_IDLE_TIMEOUT, span.end(endTimestamp)); + }, idleTimeout); + } + function _restartChildSpanTimeout(endTimestamp) { + _idleTimeoutID = setTimeout(() => { + !_finished && _autoFinishAllowed && (_finishReason = FINISH_REASON_HEARTBEAT_FAILED, span.end(endTimestamp)); + }, childSpanTimeout); + } + function _pushActivity(spanId) { + _cancelIdleTimeout(), activities.set(spanId, !0); + let endTimestamp = utils.timestampInSeconds(); + _restartChildSpanTimeout(endTimestamp + childSpanTimeout / 1e3); + } + function _popActivity(spanId) { + if (activities.has(spanId) && activities.delete(spanId), activities.size === 0) { + let endTimestamp = utils.timestampInSeconds(); + _restartIdleTimeout(endTimestamp + idleTimeout / 1e3); + } + } + function onIdleSpanEnded(endTimestamp) { + _finished = !0, activities.clear(), spanOnScope._setSpanForScope(scope, previousActiveSpan); + let spanJSON = spanUtils.spanToJSON(span), { start_timestamp: startTimestamp } = spanJSON; + if (!startTimestamp) + return; + (spanJSON.data || {})[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON] || span.setAttribute(semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON, _finishReason), utils.logger.log(`[Tracing] Idle span "${spanJSON.op}" finished`); + let childSpans = spanUtils.getSpanDescendants(span).filter((child) => child !== span), discardedSpans = 0; + childSpans.forEach((childSpan) => { + childSpan.isRecording() && (childSpan.setStatus({ code: spanstatus.SPAN_STATUS_ERROR, message: "cancelled" }), childSpan.end(endTimestamp), debugBuild.DEBUG_BUILD && utils.logger.log("[Tracing] Cancelling span since span ended early", JSON.stringify(childSpan, void 0, 2))); + let childSpanJSON = spanUtils.spanToJSON(childSpan), { timestamp: childEndTimestamp = 0, start_timestamp: childStartTimestamp = 0 } = childSpanJSON, spanStartedBeforeIdleSpanEnd = childStartTimestamp <= endTimestamp, timeoutWithMarginOfError = (finalTimeout + idleTimeout) / 1e3, spanEndedBeforeFinalTimeout = childEndTimestamp - childStartTimestamp <= timeoutWithMarginOfError; + if (debugBuild.DEBUG_BUILD) { + let stringifiedSpan = JSON.stringify(childSpan, void 0, 2); + spanStartedBeforeIdleSpanEnd ? spanEndedBeforeFinalTimeout || utils.logger.log("[Tracing] Discarding span since it finished after idle span final timeout", stringifiedSpan) : utils.logger.log("[Tracing] Discarding span since it happened after idle span was finished", stringifiedSpan); + } + (!spanEndedBeforeFinalTimeout || !spanStartedBeforeIdleSpanEnd) && (spanUtils.removeChildSpanFromSpan(span, childSpan), discardedSpans++); + }), discardedSpans > 0 && span.setAttribute("sentry.idle_span_discarded_spans", discardedSpans); + } + return client.on("spanStart", (startedSpan) => { + if (_finished || startedSpan === span || spanUtils.spanToJSON(startedSpan).timestamp) + return; + spanUtils.getSpanDescendants(span).includes(startedSpan) && _pushActivity(startedSpan.spanContext().spanId); + }), client.on("spanEnd", (endedSpan) => { + _finished || _popActivity(endedSpan.spanContext().spanId); + }), client.on("idleSpanEnableAutoFinish", (spanToAllowAutoFinish) => { + spanToAllowAutoFinish === span && (_autoFinishAllowed = !0, _restartIdleTimeout(), activities.size && _restartChildSpanTimeout()); + }), options.disableAutoFinish || _restartIdleTimeout(), setTimeout(() => { + _finished || (span.setStatus({ code: spanstatus.SPAN_STATUS_ERROR, message: "deadline_exceeded" }), _finishReason = FINISH_REASON_FINAL_TIMEOUT, span.end()); + }, finalTimeout), span; + } + function _startIdleSpan(options) { + let span = trace.startInactiveSpan(options); + return spanOnScope._setSpanForScope(currentScopes.getCurrentScope(), span), debugBuild.DEBUG_BUILD && utils.logger.log("[Tracing] Started span is an idle span"), span; + } + exports.TRACING_DEFAULTS = TRACING_DEFAULTS; + exports.startIdleSpan = startIdleSpan; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/eventProcessors.js +var require_eventProcessors = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/eventProcessors.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), debugBuild = require_debug_build2(); + function notifyEventProcessors(processors, event, hint, index = 0) { + return new utils.SyncPromise((resolve, reject) => { + let processor = processors[index]; + if (event === null || typeof processor != "function") + resolve(event); + else { + let result = processor({ ...event }, hint); + debugBuild.DEBUG_BUILD && processor.id && result === null && utils.logger.log(`Event processor "${processor.id}" dropped event`), utils.isThenable(result) ? result.then((final) => notifyEventProcessors(processors, final, hint, index + 1).then(resolve)).then(null, reject) : notifyEventProcessors(processors, result, hint, index + 1).then(resolve).then(null, reject); + } + }); + } + exports.notifyEventProcessors = notifyEventProcessors; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/applyScopeDataToEvent.js +var require_applyScopeDataToEvent = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/applyScopeDataToEvent.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), dynamicSamplingContext = require_dynamicSamplingContext(), spanUtils = require_spanUtils(); + function applyScopeDataToEvent(event, data) { + let { fingerprint, span, breadcrumbs, sdkProcessingMetadata } = data; + applyDataToEvent(event, data), span && applySpanToEvent(event, span), applyFingerprintToEvent(event, fingerprint), applyBreadcrumbsToEvent(event, breadcrumbs), applySdkMetadataToEvent(event, sdkProcessingMetadata); + } + function mergeScopeData(data, mergeData) { + let { + extra, + tags, + user, + contexts, + level, + sdkProcessingMetadata, + breadcrumbs, + fingerprint, + eventProcessors, + attachments, + propagationContext, + transactionName, + span + } = mergeData; + mergeAndOverwriteScopeData(data, "extra", extra), mergeAndOverwriteScopeData(data, "tags", tags), mergeAndOverwriteScopeData(data, "user", user), mergeAndOverwriteScopeData(data, "contexts", contexts), mergeAndOverwriteScopeData(data, "sdkProcessingMetadata", sdkProcessingMetadata), level && (data.level = level), transactionName && (data.transactionName = transactionName), span && (data.span = span), breadcrumbs.length && (data.breadcrumbs = [...data.breadcrumbs, ...breadcrumbs]), fingerprint.length && (data.fingerprint = [...data.fingerprint, ...fingerprint]), eventProcessors.length && (data.eventProcessors = [...data.eventProcessors, ...eventProcessors]), attachments.length && (data.attachments = [...data.attachments, ...attachments]), data.propagationContext = { ...data.propagationContext, ...propagationContext }; + } + function mergeAndOverwriteScopeData(data, prop, mergeVal) { + if (mergeVal && Object.keys(mergeVal).length) { + data[prop] = { ...data[prop] }; + for (let key in mergeVal) + Object.prototype.hasOwnProperty.call(mergeVal, key) && (data[prop][key] = mergeVal[key]); + } + } + function applyDataToEvent(event, data) { + let { extra, tags, user, contexts, level, transactionName } = data, cleanedExtra = utils.dropUndefinedKeys(extra); + cleanedExtra && Object.keys(cleanedExtra).length && (event.extra = { ...cleanedExtra, ...event.extra }); + let cleanedTags = utils.dropUndefinedKeys(tags); + cleanedTags && Object.keys(cleanedTags).length && (event.tags = { ...cleanedTags, ...event.tags }); + let cleanedUser = utils.dropUndefinedKeys(user); + cleanedUser && Object.keys(cleanedUser).length && (event.user = { ...cleanedUser, ...event.user }); + let cleanedContexts = utils.dropUndefinedKeys(contexts); + cleanedContexts && Object.keys(cleanedContexts).length && (event.contexts = { ...cleanedContexts, ...event.contexts }), level && (event.level = level), transactionName && event.type !== "transaction" && (event.transaction = transactionName); + } + function applyBreadcrumbsToEvent(event, breadcrumbs) { + let mergedBreadcrumbs = [...event.breadcrumbs || [], ...breadcrumbs]; + event.breadcrumbs = mergedBreadcrumbs.length ? mergedBreadcrumbs : void 0; + } + function applySdkMetadataToEvent(event, sdkProcessingMetadata) { + event.sdkProcessingMetadata = { + ...event.sdkProcessingMetadata, + ...sdkProcessingMetadata + }; + } + function applySpanToEvent(event, span) { + event.contexts = { + trace: spanUtils.spanToTraceContext(span), + ...event.contexts + }, event.sdkProcessingMetadata = { + dynamicSamplingContext: dynamicSamplingContext.getDynamicSamplingContextFromSpan(span), + ...event.sdkProcessingMetadata + }; + let rootSpan = spanUtils.getRootSpan(span), transactionName = spanUtils.spanToJSON(rootSpan).description; + transactionName && !event.transaction && event.type === "transaction" && (event.transaction = transactionName); + } + function applyFingerprintToEvent(event, fingerprint) { + event.fingerprint = event.fingerprint ? utils.arrayify(event.fingerprint) : [], fingerprint && (event.fingerprint = event.fingerprint.concat(fingerprint)), event.fingerprint && !event.fingerprint.length && delete event.fingerprint; + } + exports.applyScopeDataToEvent = applyScopeDataToEvent; + exports.mergeAndOverwriteScopeData = mergeAndOverwriteScopeData; + exports.mergeScopeData = mergeScopeData; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/prepareEvent.js +var require_prepareEvent = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/prepareEvent.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), constants = require_constants(), currentScopes = require_currentScopes(), eventProcessors = require_eventProcessors(), scope = require_scope(), applyScopeDataToEvent = require_applyScopeDataToEvent(); + function prepareEvent(options, event, hint, scope2, client, isolationScope) { + let { normalizeDepth = 3, normalizeMaxBreadth = 1e3 } = options, prepared = { + ...event, + event_id: event.event_id || hint.event_id || utils.uuid4(), + timestamp: event.timestamp || utils.dateTimestampInSeconds() + }, integrations = hint.integrations || options.integrations.map((i) => i.name); + applyClientOptions(prepared, options), applyIntegrationsMetadata(prepared, integrations), event.type === void 0 && applyDebugIds(prepared, options.stackParser); + let finalScope = getFinalScope(scope2, hint.captureContext); + hint.mechanism && utils.addExceptionMechanism(prepared, hint.mechanism); + let clientEventProcessors = client ? client.getEventProcessors() : [], data = currentScopes.getGlobalScope().getScopeData(); + if (isolationScope) { + let isolationData = isolationScope.getScopeData(); + applyScopeDataToEvent.mergeScopeData(data, isolationData); + } + if (finalScope) { + let finalScopeData = finalScope.getScopeData(); + applyScopeDataToEvent.mergeScopeData(data, finalScopeData); + } + let attachments = [...hint.attachments || [], ...data.attachments]; + attachments.length && (hint.attachments = attachments), applyScopeDataToEvent.applyScopeDataToEvent(prepared, data); + let eventProcessors$1 = [ + ...clientEventProcessors, + // Run scope event processors _after_ all other processors + ...data.eventProcessors + ]; + return eventProcessors.notifyEventProcessors(eventProcessors$1, prepared, hint).then((evt) => (evt && applyDebugMeta(evt), typeof normalizeDepth == "number" && normalizeDepth > 0 ? normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth) : evt)); + } + function applyClientOptions(event, options) { + let { environment, release, dist, maxValueLength = 250 } = options; + "environment" in event || (event.environment = "environment" in options ? environment : constants.DEFAULT_ENVIRONMENT), event.release === void 0 && release !== void 0 && (event.release = release), event.dist === void 0 && dist !== void 0 && (event.dist = dist), event.message && (event.message = utils.truncate(event.message, maxValueLength)); + let exception = event.exception && event.exception.values && event.exception.values[0]; + exception && exception.value && (exception.value = utils.truncate(exception.value, maxValueLength)); + let request = event.request; + request && request.url && (request.url = utils.truncate(request.url, maxValueLength)); + } + var debugIdStackParserCache = /* @__PURE__ */ new WeakMap(); + function applyDebugIds(event, stackParser) { + let debugIdMap = utils.GLOBAL_OBJ._sentryDebugIds; + if (!debugIdMap) + return; + let debugIdStackFramesCache, cachedDebugIdStackFrameCache = debugIdStackParserCache.get(stackParser); + cachedDebugIdStackFrameCache ? debugIdStackFramesCache = cachedDebugIdStackFrameCache : (debugIdStackFramesCache = /* @__PURE__ */ new Map(), debugIdStackParserCache.set(stackParser, debugIdStackFramesCache)); + let filenameDebugIdMap = Object.keys(debugIdMap).reduce((acc, debugIdStackTrace) => { + let parsedStack, cachedParsedStack = debugIdStackFramesCache.get(debugIdStackTrace); + cachedParsedStack ? parsedStack = cachedParsedStack : (parsedStack = stackParser(debugIdStackTrace), debugIdStackFramesCache.set(debugIdStackTrace, parsedStack)); + for (let i = parsedStack.length - 1; i >= 0; i--) { + let stackFrame = parsedStack[i]; + if (stackFrame.filename) { + acc[stackFrame.filename] = debugIdMap[debugIdStackTrace]; + break; + } + } + return acc; + }, {}); + try { + event.exception.values.forEach((exception) => { + exception.stacktrace.frames.forEach((frame) => { + frame.filename && (frame.debug_id = filenameDebugIdMap[frame.filename]); + }); + }); + } catch { + } + } + function applyDebugMeta(event) { + let filenameDebugIdMap = {}; + try { + event.exception.values.forEach((exception) => { + exception.stacktrace.frames.forEach((frame) => { + frame.debug_id && (frame.abs_path ? filenameDebugIdMap[frame.abs_path] = frame.debug_id : frame.filename && (filenameDebugIdMap[frame.filename] = frame.debug_id), delete frame.debug_id); + }); + }); + } catch { + } + if (Object.keys(filenameDebugIdMap).length === 0) + return; + event.debug_meta = event.debug_meta || {}, event.debug_meta.images = event.debug_meta.images || []; + let images = event.debug_meta.images; + Object.keys(filenameDebugIdMap).forEach((filename) => { + images.push({ + type: "sourcemap", + code_file: filename, + debug_id: filenameDebugIdMap[filename] + }); + }); + } + function applyIntegrationsMetadata(event, integrationNames) { + integrationNames.length > 0 && (event.sdk = event.sdk || {}, event.sdk.integrations = [...event.sdk.integrations || [], ...integrationNames]); + } + function normalizeEvent(event, depth, maxBreadth) { + if (!event) + return null; + let normalized = { + ...event, + ...event.breadcrumbs && { + breadcrumbs: event.breadcrumbs.map((b) => ({ + ...b, + ...b.data && { + data: utils.normalize(b.data, depth, maxBreadth) + } + })) + }, + ...event.user && { + user: utils.normalize(event.user, depth, maxBreadth) + }, + ...event.contexts && { + contexts: utils.normalize(event.contexts, depth, maxBreadth) + }, + ...event.extra && { + extra: utils.normalize(event.extra, depth, maxBreadth) + } + }; + return event.contexts && event.contexts.trace && normalized.contexts && (normalized.contexts.trace = event.contexts.trace, event.contexts.trace.data && (normalized.contexts.trace.data = utils.normalize(event.contexts.trace.data, depth, maxBreadth))), event.spans && (normalized.spans = event.spans.map((span) => ({ + ...span, + ...span.data && { + data: utils.normalize(span.data, depth, maxBreadth) + } + }))), normalized; + } + function getFinalScope(scope$1, captureContext) { + if (!captureContext) + return scope$1; + let finalScope = scope$1 ? scope$1.clone() : new scope.Scope(); + return finalScope.update(captureContext), finalScope; + } + function parseEventHintOrCaptureContext(hint) { + if (hint) + return hintIsScopeOrFunction(hint) ? { captureContext: hint } : hintIsScopeContext(hint) ? { + captureContext: hint + } : hint; + } + function hintIsScopeOrFunction(hint) { + return hint instanceof scope.Scope || typeof hint == "function"; + } + var captureContextKeys = [ + "user", + "level", + "extra", + "contexts", + "tags", + "fingerprint", + "requestSession", + "propagationContext" + ]; + function hintIsScopeContext(hint) { + return Object.keys(hint).some((key) => captureContextKeys.includes(key)); + } + exports.applyDebugIds = applyDebugIds; + exports.applyDebugMeta = applyDebugMeta; + exports.parseEventHintOrCaptureContext = parseEventHintOrCaptureContext; + exports.prepareEvent = prepareEvent; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/exports.js +var require_exports = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/exports.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), constants = require_constants(), currentScopes = require_currentScopes(), debugBuild = require_debug_build2(), session = require_session(), prepareEvent = require_prepareEvent(); + function captureException(exception, hint) { + return currentScopes.getCurrentScope().captureException(exception, prepareEvent.parseEventHintOrCaptureContext(hint)); + } + function captureMessage(message, captureContext) { + let level = typeof captureContext == "string" ? captureContext : void 0, context = typeof captureContext != "string" ? { captureContext } : void 0; + return currentScopes.getCurrentScope().captureMessage(message, level, context); + } + function captureEvent(event, hint) { + return currentScopes.getCurrentScope().captureEvent(event, hint); + } + function setContext(name, context) { + currentScopes.getIsolationScope().setContext(name, context); + } + function setExtras(extras) { + currentScopes.getIsolationScope().setExtras(extras); + } + function setExtra(key, extra) { + currentScopes.getIsolationScope().setExtra(key, extra); + } + function setTags(tags) { + currentScopes.getIsolationScope().setTags(tags); + } + function setTag(key, value) { + currentScopes.getIsolationScope().setTag(key, value); + } + function setUser(user) { + currentScopes.getIsolationScope().setUser(user); + } + function lastEventId() { + return currentScopes.getIsolationScope().lastEventId(); + } + function captureCheckIn(checkIn, upsertMonitorConfig) { + let scope = currentScopes.getCurrentScope(), client = currentScopes.getClient(); + if (!client) + debugBuild.DEBUG_BUILD && utils.logger.warn("Cannot capture check-in. No client defined."); + else if (!client.captureCheckIn) + debugBuild.DEBUG_BUILD && utils.logger.warn("Cannot capture check-in. Client does not support sending check-ins."); + else + return client.captureCheckIn(checkIn, upsertMonitorConfig, scope); + return utils.uuid4(); + } + function withMonitor(monitorSlug, callback, upsertMonitorConfig) { + let checkInId = captureCheckIn({ monitorSlug, status: "in_progress" }, upsertMonitorConfig), now = utils.timestampInSeconds(); + function finishCheckIn(status) { + captureCheckIn({ monitorSlug, status, checkInId, duration: utils.timestampInSeconds() - now }); + } + return currentScopes.withIsolationScope(() => { + let maybePromiseResult; + try { + maybePromiseResult = callback(); + } catch (e) { + throw finishCheckIn("error"), e; + } + return utils.isThenable(maybePromiseResult) ? Promise.resolve(maybePromiseResult).then( + () => { + finishCheckIn("ok"); + }, + () => { + finishCheckIn("error"); + } + ) : finishCheckIn("ok"), maybePromiseResult; + }); + } + async function flush(timeout) { + let client = currentScopes.getClient(); + return client ? client.flush(timeout) : (debugBuild.DEBUG_BUILD && utils.logger.warn("Cannot flush events. No client defined."), Promise.resolve(!1)); + } + async function close(timeout) { + let client = currentScopes.getClient(); + return client ? client.close(timeout) : (debugBuild.DEBUG_BUILD && utils.logger.warn("Cannot flush events and disable SDK. No client defined."), Promise.resolve(!1)); + } + function isInitialized() { + return !!currentScopes.getClient(); + } + function isEnabled() { + let client = currentScopes.getClient(); + return !!client && client.getOptions().enabled !== !1 && !!client.getTransport(); + } + function addEventProcessor(callback) { + currentScopes.getIsolationScope().addEventProcessor(callback); + } + function startSession(context) { + let client = currentScopes.getClient(), isolationScope = currentScopes.getIsolationScope(), currentScope = currentScopes.getCurrentScope(), { release, environment = constants.DEFAULT_ENVIRONMENT } = client && client.getOptions() || {}, { userAgent } = utils.GLOBAL_OBJ.navigator || {}, session$1 = session.makeSession({ + release, + environment, + user: currentScope.getUser() || isolationScope.getUser(), + ...userAgent && { userAgent }, + ...context + }), currentSession = isolationScope.getSession(); + return currentSession && currentSession.status === "ok" && session.updateSession(currentSession, { status: "exited" }), endSession(), isolationScope.setSession(session$1), currentScope.setSession(session$1), session$1; + } + function endSession() { + let isolationScope = currentScopes.getIsolationScope(), currentScope = currentScopes.getCurrentScope(), session$1 = currentScope.getSession() || isolationScope.getSession(); + session$1 && session.closeSession(session$1), _sendSessionUpdate(), isolationScope.setSession(), currentScope.setSession(); + } + function _sendSessionUpdate() { + let isolationScope = currentScopes.getIsolationScope(), currentScope = currentScopes.getCurrentScope(), client = currentScopes.getClient(), session2 = currentScope.getSession() || isolationScope.getSession(); + session2 && client && client.captureSession(session2); + } + function captureSession(end = !1) { + if (end) { + endSession(); + return; + } + _sendSessionUpdate(); + } + exports.addEventProcessor = addEventProcessor; + exports.captureCheckIn = captureCheckIn; + exports.captureEvent = captureEvent; + exports.captureException = captureException; + exports.captureMessage = captureMessage; + exports.captureSession = captureSession; + exports.close = close; + exports.endSession = endSession; + exports.flush = flush; + exports.isEnabled = isEnabled; + exports.isInitialized = isInitialized; + exports.lastEventId = lastEventId; + exports.setContext = setContext; + exports.setExtra = setExtra; + exports.setExtras = setExtras; + exports.setTag = setTag; + exports.setTags = setTags; + exports.setUser = setUser; + exports.startSession = startSession; + exports.withMonitor = withMonitor; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/sessionflusher.js +var require_sessionflusher = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/sessionflusher.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), SessionFlusher = class { + // Cast to any so that it can use Node.js timeout + // eslint-disable-next-line @typescript-eslint/no-explicit-any + constructor(client, attrs) { + this._client = client, this.flushTimeout = 60, this._pendingAggregates = {}, this._isEnabled = !0, this._intervalId = setInterval(() => this.flush(), this.flushTimeout * 1e3), this._intervalId.unref && this._intervalId.unref(), this._sessionAttrs = attrs; + } + /** Checks if `pendingAggregates` has entries, and if it does flushes them by calling `sendSession` */ + flush() { + let sessionAggregates = this.getSessionAggregates(); + sessionAggregates.aggregates.length !== 0 && (this._pendingAggregates = {}, this._client.sendSession(sessionAggregates)); + } + /** Massages the entries in `pendingAggregates` and returns aggregated sessions */ + getSessionAggregates() { + let aggregates = Object.keys(this._pendingAggregates).map((key) => this._pendingAggregates[parseInt(key)]), sessionAggregates = { + attrs: this._sessionAttrs, + aggregates + }; + return utils.dropUndefinedKeys(sessionAggregates); + } + /** JSDoc */ + close() { + clearInterval(this._intervalId), this._isEnabled = !1, this.flush(); + } + /** + * Wrapper function for _incrementSessionStatusCount that checks if the instance of SessionFlusher is enabled then + * fetches the session status of the request from `Scope.getRequestSession().status` on the scope and passes them to + * `_incrementSessionStatusCount` along with the start date + */ + incrementSessionStatusCount() { + if (!this._isEnabled) + return; + let isolationScope = currentScopes.getIsolationScope(), requestSession = isolationScope.getRequestSession(); + requestSession && requestSession.status && (this._incrementSessionStatusCount(requestSession.status, /* @__PURE__ */ new Date()), isolationScope.setRequestSession(void 0)); + } + /** + * Increments status bucket in pendingAggregates buffer (internal state) corresponding to status of + * the session received + */ + _incrementSessionStatusCount(status, date) { + let sessionStartedTrunc = new Date(date).setSeconds(0, 0); + this._pendingAggregates[sessionStartedTrunc] = this._pendingAggregates[sessionStartedTrunc] || {}; + let aggregationCounts = this._pendingAggregates[sessionStartedTrunc]; + switch (aggregationCounts.started || (aggregationCounts.started = new Date(sessionStartedTrunc).toISOString()), status) { + case "errored": + return aggregationCounts.errored = (aggregationCounts.errored || 0) + 1, aggregationCounts.errored; + case "ok": + return aggregationCounts.exited = (aggregationCounts.exited || 0) + 1, aggregationCounts.exited; + default: + return aggregationCounts.crashed = (aggregationCounts.crashed || 0) + 1, aggregationCounts.crashed; + } + } + }; + exports.SessionFlusher = SessionFlusher; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/api.js +var require_api = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/api.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), SENTRY_API_VERSION = "7"; + function getBaseApiEndpoint(dsn) { + let protocol = dsn.protocol ? `${dsn.protocol}:` : "", port = dsn.port ? `:${dsn.port}` : ""; + return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : ""}/api/`; + } + function _getIngestEndpoint(dsn) { + return `${getBaseApiEndpoint(dsn)}${dsn.projectId}/envelope/`; + } + function _encodedAuth(dsn, sdkInfo) { + return utils.urlEncode({ + // We send only the minimum set of required information. See + // https://github.com/getsentry/sentry-javascript/issues/2572. + sentry_key: dsn.publicKey, + sentry_version: SENTRY_API_VERSION, + ...sdkInfo && { sentry_client: `${sdkInfo.name}/${sdkInfo.version}` } + }); + } + function getEnvelopeEndpointWithUrlEncodedAuth(dsn, tunnel, sdkInfo) { + return tunnel || `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, sdkInfo)}`; + } + function getReportDialogEndpoint(dsnLike, dialogOptions) { + let dsn = utils.makeDsn(dsnLike); + if (!dsn) + return ""; + let endpoint = `${getBaseApiEndpoint(dsn)}embed/error-page/`, encodedOptions = `dsn=${utils.dsnToString(dsn)}`; + for (let key in dialogOptions) + if (key !== "dsn" && key !== "onClose") + if (key === "user") { + let user = dialogOptions.user; + if (!user) + continue; + user.name && (encodedOptions += `&name=${encodeURIComponent(user.name)}`), user.email && (encodedOptions += `&email=${encodeURIComponent(user.email)}`); + } else + encodedOptions += `&${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key])}`; + return `${endpoint}?${encodedOptions}`; + } + exports.getEnvelopeEndpointWithUrlEncodedAuth = getEnvelopeEndpointWithUrlEncodedAuth; + exports.getReportDialogEndpoint = getReportDialogEndpoint; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integration.js +var require_integration = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integration.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), debugBuild = require_debug_build2(), installedIntegrations = []; + function filterDuplicates(integrations) { + let integrationsByName = {}; + return integrations.forEach((currentInstance) => { + let { name } = currentInstance, existingInstance = integrationsByName[name]; + existingInstance && !existingInstance.isDefaultInstance && currentInstance.isDefaultInstance || (integrationsByName[name] = currentInstance); + }), Object.keys(integrationsByName).map((k) => integrationsByName[k]); + } + function getIntegrationsToSetup(options) { + let defaultIntegrations = options.defaultIntegrations || [], userIntegrations = options.integrations; + defaultIntegrations.forEach((integration) => { + integration.isDefaultInstance = !0; + }); + let integrations; + Array.isArray(userIntegrations) ? integrations = [...defaultIntegrations, ...userIntegrations] : typeof userIntegrations == "function" ? integrations = utils.arrayify(userIntegrations(defaultIntegrations)) : integrations = defaultIntegrations; + let finalIntegrations = filterDuplicates(integrations), debugIndex = findIndex(finalIntegrations, (integration) => integration.name === "Debug"); + if (debugIndex !== -1) { + let [debugInstance] = finalIntegrations.splice(debugIndex, 1); + finalIntegrations.push(debugInstance); + } + return finalIntegrations; + } + function setupIntegrations(client, integrations) { + let integrationIndex = {}; + return integrations.forEach((integration) => { + integration && setupIntegration(client, integration, integrationIndex); + }), integrationIndex; + } + function afterSetupIntegrations(client, integrations) { + for (let integration of integrations) + integration && integration.afterAllSetup && integration.afterAllSetup(client); + } + function setupIntegration(client, integration, integrationIndex) { + if (integrationIndex[integration.name]) { + debugBuild.DEBUG_BUILD && utils.logger.log(`Integration skipped because it was already installed: ${integration.name}`); + return; + } + if (integrationIndex[integration.name] = integration, installedIntegrations.indexOf(integration.name) === -1 && typeof integration.setupOnce == "function" && (integration.setupOnce(), installedIntegrations.push(integration.name)), integration.setup && typeof integration.setup == "function" && integration.setup(client), typeof integration.preprocessEvent == "function") { + let callback = integration.preprocessEvent.bind(integration); + client.on("preprocessEvent", (event, hint) => callback(event, hint, client)); + } + if (typeof integration.processEvent == "function") { + let callback = integration.processEvent.bind(integration), processor = Object.assign((event, hint) => callback(event, hint, client), { + id: integration.name + }); + client.addEventProcessor(processor); + } + debugBuild.DEBUG_BUILD && utils.logger.log(`Integration installed: ${integration.name}`); + } + function addIntegration(integration) { + let client = currentScopes.getClient(); + if (!client) { + debugBuild.DEBUG_BUILD && utils.logger.warn(`Cannot add integration "${integration.name}" because no SDK Client is available.`); + return; + } + client.addIntegration(integration); + } + function findIndex(arr, callback) { + for (let i = 0; i < arr.length; i++) + if (callback(arr[i]) === !0) + return i; + return -1; + } + function defineIntegration(fn) { + return fn; + } + exports.addIntegration = addIntegration; + exports.afterSetupIntegrations = afterSetupIntegrations; + exports.defineIntegration = defineIntegration; + exports.getIntegrationsToSetup = getIntegrationsToSetup; + exports.installedIntegrations = installedIntegrations; + exports.setupIntegration = setupIntegration; + exports.setupIntegrations = setupIntegrations; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/baseclient.js +var require_baseclient = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/baseclient.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), api = require_api(), currentScopes = require_currentScopes(), debugBuild = require_debug_build2(), envelope = require_envelope2(), integration = require_integration(), session = require_session(), dynamicSamplingContext = require_dynamicSamplingContext(), parseSampleRate = require_parseSampleRate(), prepareEvent = require_prepareEvent(), ALREADY_SEEN_ERROR = "Not capturing exception because it's already been captured.", BaseClient = class { + /** Options passed to the SDK. */ + /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */ + /** Array of set up integrations. */ + /** Number of calls being processed */ + /** Holds flushable */ + // eslint-disable-next-line @typescript-eslint/ban-types + /** + * Initializes this client instance. + * + * @param options Options for the client. + */ + constructor(options) { + if (this._options = options, this._integrations = {}, this._numProcessing = 0, this._outcomes = {}, this._hooks = {}, this._eventProcessors = [], options.dsn ? this._dsn = utils.makeDsn(options.dsn) : debugBuild.DEBUG_BUILD && utils.logger.warn("No DSN provided, client will not send events."), this._dsn) { + let url = api.getEnvelopeEndpointWithUrlEncodedAuth( + this._dsn, + options.tunnel, + options._metadata ? options._metadata.sdk : void 0 + ); + this._transport = options.transport({ + tunnel: this._options.tunnel, + recordDroppedEvent: this.recordDroppedEvent.bind(this), + ...options.transportOptions, + url + }); + } + } + /** + * @inheritDoc + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + captureException(exception, hint, scope) { + let eventId = utils.uuid4(); + if (utils.checkOrSetAlreadyCaught(exception)) + return debugBuild.DEBUG_BUILD && utils.logger.log(ALREADY_SEEN_ERROR), eventId; + let hintWithEventId = { + event_id: eventId, + ...hint + }; + return this._process( + this.eventFromException(exception, hintWithEventId).then( + (event) => this._captureEvent(event, hintWithEventId, scope) + ) + ), hintWithEventId.event_id; + } + /** + * @inheritDoc + */ + captureMessage(message, level, hint, currentScope) { + let hintWithEventId = { + event_id: utils.uuid4(), + ...hint + }, eventMessage = utils.isParameterizedString(message) ? message : String(message), promisedEvent = utils.isPrimitive(message) ? this.eventFromMessage(eventMessage, level, hintWithEventId) : this.eventFromException(message, hintWithEventId); + return this._process(promisedEvent.then((event) => this._captureEvent(event, hintWithEventId, currentScope))), hintWithEventId.event_id; + } + /** + * @inheritDoc + */ + captureEvent(event, hint, currentScope) { + let eventId = utils.uuid4(); + if (hint && hint.originalException && utils.checkOrSetAlreadyCaught(hint.originalException)) + return debugBuild.DEBUG_BUILD && utils.logger.log(ALREADY_SEEN_ERROR), eventId; + let hintWithEventId = { + event_id: eventId, + ...hint + }, capturedSpanScope = (event.sdkProcessingMetadata || {}).capturedSpanScope; + return this._process(this._captureEvent(event, hintWithEventId, capturedSpanScope || currentScope)), hintWithEventId.event_id; + } + /** + * @inheritDoc + */ + captureSession(session$1) { + typeof session$1.release != "string" ? debugBuild.DEBUG_BUILD && utils.logger.warn("Discarded session because of missing or non-string release") : (this.sendSession(session$1), session.updateSession(session$1, { init: !1 })); + } + /** + * @inheritDoc + */ + getDsn() { + return this._dsn; + } + /** + * @inheritDoc + */ + getOptions() { + return this._options; + } + /** + * @see SdkMetadata in @sentry/types + * + * @return The metadata of the SDK + */ + getSdkMetadata() { + return this._options._metadata; + } + /** + * @inheritDoc + */ + getTransport() { + return this._transport; + } + /** + * @inheritDoc + */ + flush(timeout) { + let transport = this._transport; + return transport ? (this.emit("flush"), this._isClientDoneProcessing(timeout).then((clientFinished) => transport.flush(timeout).then((transportFlushed) => clientFinished && transportFlushed))) : utils.resolvedSyncPromise(!0); + } + /** + * @inheritDoc + */ + close(timeout) { + return this.flush(timeout).then((result) => (this.getOptions().enabled = !1, this.emit("close"), result)); + } + /** Get all installed event processors. */ + getEventProcessors() { + return this._eventProcessors; + } + /** @inheritDoc */ + addEventProcessor(eventProcessor) { + this._eventProcessors.push(eventProcessor); + } + /** @inheritdoc */ + init() { + this._isEnabled() && this._setupIntegrations(); + } + /** + * Gets an installed integration by its name. + * + * @returns The installed integration or `undefined` if no integration with that `name` was installed. + */ + getIntegrationByName(integrationName) { + return this._integrations[integrationName]; + } + /** + * @inheritDoc + */ + addIntegration(integration$1) { + let isAlreadyInstalled = this._integrations[integration$1.name]; + integration.setupIntegration(this, integration$1, this._integrations), isAlreadyInstalled || integration.afterSetupIntegrations(this, [integration$1]); + } + /** + * @inheritDoc + */ + sendEvent(event, hint = {}) { + this.emit("beforeSendEvent", event, hint); + let env = envelope.createEventEnvelope(event, this._dsn, this._options._metadata, this._options.tunnel); + for (let attachment of hint.attachments || []) + env = utils.addItemToEnvelope(env, utils.createAttachmentEnvelopeItem(attachment)); + let promise = this.sendEnvelope(env); + promise && promise.then((sendResponse) => this.emit("afterSendEvent", event, sendResponse), null); + } + /** + * @inheritDoc + */ + sendSession(session2) { + let env = envelope.createSessionEnvelope(session2, this._dsn, this._options._metadata, this._options.tunnel); + this.sendEnvelope(env); + } + /** + * @inheritDoc + */ + recordDroppedEvent(reason, category, _event) { + if (this._options.sendClientReports) { + let key = `${reason}:${category}`; + debugBuild.DEBUG_BUILD && utils.logger.log(`Adding outcome: "${key}"`), this._outcomes[key] = this._outcomes[key] + 1 || 1; + } + } + // Keep on() & emit() signatures in sync with types' client.ts interface + /* eslint-disable @typescript-eslint/unified-signatures */ + /** @inheritdoc */ + /** @inheritdoc */ + on(hook, callback) { + this._hooks[hook] || (this._hooks[hook] = []), this._hooks[hook].push(callback); + } + /** @inheritdoc */ + /** @inheritdoc */ + emit(hook, ...rest) { + this._hooks[hook] && this._hooks[hook].forEach((callback) => callback(...rest)); + } + /** + * @inheritdoc + */ + sendEnvelope(envelope2) { + return this.emit("beforeEnvelope", envelope2), this._isEnabled() && this._transport ? this._transport.send(envelope2).then(null, (reason) => (debugBuild.DEBUG_BUILD && utils.logger.error("Error while sending event:", reason), reason)) : (debugBuild.DEBUG_BUILD && utils.logger.error("Transport disabled"), utils.resolvedSyncPromise({})); + } + /* eslint-enable @typescript-eslint/unified-signatures */ + /** Setup integrations for this client. */ + _setupIntegrations() { + let { integrations } = this._options; + this._integrations = integration.setupIntegrations(this, integrations), integration.afterSetupIntegrations(this, integrations); + } + /** Updates existing session based on the provided event */ + _updateSessionFromEvent(session$1, event) { + let crashed = !1, errored = !1, exceptions = event.exception && event.exception.values; + if (exceptions) { + errored = !0; + for (let ex of exceptions) { + let mechanism = ex.mechanism; + if (mechanism && mechanism.handled === !1) { + crashed = !0; + break; + } + } + } + let sessionNonTerminal = session$1.status === "ok"; + (sessionNonTerminal && session$1.errors === 0 || sessionNonTerminal && crashed) && (session.updateSession(session$1, { + ...crashed && { status: "crashed" }, + errors: session$1.errors || Number(errored || crashed) + }), this.captureSession(session$1)); + } + /** + * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying + * "no" (resolving to `false`) in order to give the client a chance to potentially finish first. + * + * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not + * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to + * `true`. + * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and + * `false` otherwise + */ + _isClientDoneProcessing(timeout) { + return new utils.SyncPromise((resolve) => { + let ticked = 0, tick = 1, interval = setInterval(() => { + this._numProcessing == 0 ? (clearInterval(interval), resolve(!0)) : (ticked += tick, timeout && ticked >= timeout && (clearInterval(interval), resolve(!1))); + }, tick); + }); + } + /** Determines whether this SDK is enabled and a transport is present. */ + _isEnabled() { + return this.getOptions().enabled !== !1 && this._transport !== void 0; + } + /** + * Adds common information to events. + * + * The information includes release and environment from `options`, + * breadcrumbs and context (extra, tags and user) from the scope. + * + * Information that is already present in the event is never overwritten. For + * nested objects, such as the context, keys are merged. + * + * @param event The original event. + * @param hint May contain additional information about the original exception. + * @param currentScope A scope containing event metadata. + * @returns A new event with more information. + */ + _prepareEvent(event, hint, currentScope, isolationScope = currentScopes.getIsolationScope()) { + let options = this.getOptions(), integrations = Object.keys(this._integrations); + return !hint.integrations && integrations.length > 0 && (hint.integrations = integrations), this.emit("preprocessEvent", event, hint), event.type || isolationScope.setLastEventId(event.event_id || hint.event_id), prepareEvent.prepareEvent(options, event, hint, currentScope, this, isolationScope).then((evt) => { + if (evt === null) + return evt; + let propagationContext = { + ...isolationScope.getPropagationContext(), + ...currentScope ? currentScope.getPropagationContext() : void 0 + }; + if (!(evt.contexts && evt.contexts.trace) && propagationContext) { + let { traceId: trace_id, spanId, parentSpanId, dsc } = propagationContext; + evt.contexts = { + trace: utils.dropUndefinedKeys({ + trace_id, + span_id: spanId, + parent_span_id: parentSpanId + }), + ...evt.contexts + }; + let dynamicSamplingContext$1 = dsc || dynamicSamplingContext.getDynamicSamplingContextFromClient(trace_id, this); + evt.sdkProcessingMetadata = { + dynamicSamplingContext: dynamicSamplingContext$1, + ...evt.sdkProcessingMetadata + }; + } + return evt; + }); + } + /** + * Processes the event and logs an error in case of rejection + * @param event + * @param hint + * @param scope + */ + _captureEvent(event, hint = {}, scope) { + return this._processEvent(event, hint, scope).then( + (finalEvent) => finalEvent.event_id, + (reason) => { + if (debugBuild.DEBUG_BUILD) { + let sentryError = reason; + sentryError.logLevel === "log" ? utils.logger.log(sentryError.message) : utils.logger.warn(sentryError); + } + } + ); + } + /** + * Processes an event (either error or message) and sends it to Sentry. + * + * This also adds breadcrumbs and context information to the event. However, + * platform specific meta data (such as the User's IP address) must be added + * by the SDK implementor. + * + * + * @param event The event to send to Sentry. + * @param hint May contain additional information about the original exception. + * @param currentScope A scope containing event metadata. + * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send. + */ + _processEvent(event, hint, currentScope) { + let options = this.getOptions(), { sampleRate } = options, isTransaction = isTransactionEvent(event), isError = isErrorEvent(event), eventType = event.type || "error", beforeSendLabel = `before send for type \`${eventType}\``, parsedSampleRate = typeof sampleRate > "u" ? void 0 : parseSampleRate.parseSampleRate(sampleRate); + if (isError && typeof parsedSampleRate == "number" && Math.random() > parsedSampleRate) + return this.recordDroppedEvent("sample_rate", "error", event), utils.rejectedSyncPromise( + new utils.SentryError( + `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`, + "log" + ) + ); + let dataCategory = eventType === "replay_event" ? "replay" : eventType, capturedSpanIsolationScope = (event.sdkProcessingMetadata || {}).capturedSpanIsolationScope; + return this._prepareEvent(event, hint, currentScope, capturedSpanIsolationScope).then((prepared) => { + if (prepared === null) + throw this.recordDroppedEvent("event_processor", dataCategory, event), new utils.SentryError("An event processor returned `null`, will not send event.", "log"); + if (hint.data && hint.data.__sentry__ === !0) + return prepared; + let result = processBeforeSend(options, prepared, hint); + return _validateBeforeSendResult(result, beforeSendLabel); + }).then((processedEvent) => { + if (processedEvent === null) + throw this.recordDroppedEvent("before_send", dataCategory, event), new utils.SentryError(`${beforeSendLabel} returned \`null\`, will not send event.`, "log"); + let session2 = currentScope && currentScope.getSession(); + !isTransaction && session2 && this._updateSessionFromEvent(session2, processedEvent); + let transactionInfo = processedEvent.transaction_info; + if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) { + let source = "custom"; + processedEvent.transaction_info = { + ...transactionInfo, + source + }; + } + return this.sendEvent(processedEvent, hint), processedEvent; + }).then(null, (reason) => { + throw reason instanceof utils.SentryError ? reason : (this.captureException(reason, { + data: { + __sentry__: !0 + }, + originalException: reason + }), new utils.SentryError( + `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. +Reason: ${reason}` + )); + }); + } + /** + * Occupies the client with processing and event + */ + _process(promise) { + this._numProcessing++, promise.then( + (value) => (this._numProcessing--, value), + (reason) => (this._numProcessing--, reason) + ); + } + /** + * Clears outcomes on this client and returns them. + */ + _clearOutcomes() { + let outcomes = this._outcomes; + return this._outcomes = {}, Object.keys(outcomes).map((key) => { + let [reason, category] = key.split(":"); + return { + reason, + category, + quantity: outcomes[key] + }; + }); + } + /** + * @inheritDoc + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + }; + function _validateBeforeSendResult(beforeSendResult, beforeSendLabel) { + let invalidValueError = `${beforeSendLabel} must return \`null\` or a valid event.`; + if (utils.isThenable(beforeSendResult)) + return beforeSendResult.then( + (event) => { + if (!utils.isPlainObject(event) && event !== null) + throw new utils.SentryError(invalidValueError); + return event; + }, + (e) => { + throw new utils.SentryError(`${beforeSendLabel} rejected with ${e}`); + } + ); + if (!utils.isPlainObject(beforeSendResult) && beforeSendResult !== null) + throw new utils.SentryError(invalidValueError); + return beforeSendResult; + } + function processBeforeSend(options, event, hint) { + let { beforeSend, beforeSendTransaction, beforeSendSpan } = options; + if (isErrorEvent(event) && beforeSend) + return beforeSend(event, hint); + if (isTransactionEvent(event)) { + if (event.spans && beforeSendSpan) { + let processedSpans = []; + for (let span of event.spans) { + let processedSpan = beforeSendSpan(span); + processedSpan && processedSpans.push(processedSpan); + } + event.spans = processedSpans; + } + if (beforeSendTransaction) + return beforeSendTransaction(event, hint); + } + return event; + } + function isErrorEvent(event) { + return event.type === void 0; + } + function isTransactionEvent(event) { + return event.type === "transaction"; + } + exports.BaseClient = BaseClient; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/checkin.js +var require_checkin = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/checkin.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(); + function createCheckInEnvelope(checkIn, dynamicSamplingContext, metadata, tunnel, dsn) { + let headers = { + sent_at: (/* @__PURE__ */ new Date()).toISOString() + }; + metadata && metadata.sdk && (headers.sdk = { + name: metadata.sdk.name, + version: metadata.sdk.version + }), tunnel && dsn && (headers.dsn = utils.dsnToString(dsn)), dynamicSamplingContext && (headers.trace = utils.dropUndefinedKeys(dynamicSamplingContext)); + let item = createCheckInEnvelopeItem(checkIn); + return utils.createEnvelope(headers, [item]); + } + function createCheckInEnvelopeItem(checkIn) { + return [{ + type: "check_in" + }, checkIn]; + } + exports.createCheckInEnvelope = createCheckInEnvelope; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/server-runtime-client.js +var require_server_runtime_client = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/server-runtime-client.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), baseclient = require_baseclient(), checkin = require_checkin(), currentScopes = require_currentScopes(), debugBuild = require_debug_build2(), sessionflusher = require_sessionflusher(), errors = require_errors(), spanOnScope = require_spanOnScope(), spanUtils = require_spanUtils(), dynamicSamplingContext = require_dynamicSamplingContext(), ServerRuntimeClient = class extends baseclient.BaseClient { + /** + * Creates a new Edge SDK instance. + * @param options Configuration options for this SDK. + */ + constructor(options) { + errors.registerSpanErrorInstrumentation(), super(options); + } + /** + * @inheritDoc + */ + eventFromException(exception, hint) { + return utils.resolvedSyncPromise(utils.eventFromUnknownInput(this, this._options.stackParser, exception, hint)); + } + /** + * @inheritDoc + */ + eventFromMessage(message, level = "info", hint) { + return utils.resolvedSyncPromise( + utils.eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace) + ); + } + /** + * @inheritDoc + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + captureException(exception, hint, scope) { + if (this._options.autoSessionTracking && this._sessionFlusher) { + let requestSession = currentScopes.getIsolationScope().getRequestSession(); + requestSession && requestSession.status === "ok" && (requestSession.status = "errored"); + } + return super.captureException(exception, hint, scope); + } + /** + * @inheritDoc + */ + captureEvent(event, hint, scope) { + if (this._options.autoSessionTracking && this._sessionFlusher && (event.type || "exception") === "exception" && event.exception && event.exception.values && event.exception.values.length > 0) { + let requestSession = currentScopes.getIsolationScope().getRequestSession(); + requestSession && requestSession.status === "ok" && (requestSession.status = "errored"); + } + return super.captureEvent(event, hint, scope); + } + /** + * + * @inheritdoc + */ + close(timeout) { + return this._sessionFlusher && this._sessionFlusher.close(), super.close(timeout); + } + /** Method that initialises an instance of SessionFlusher on Client */ + initSessionFlusher() { + let { release, environment } = this._options; + release ? this._sessionFlusher = new sessionflusher.SessionFlusher(this, { + release, + environment + }) : debugBuild.DEBUG_BUILD && utils.logger.warn("Cannot initialise an instance of SessionFlusher if no release is provided!"); + } + /** + * Create a cron monitor check in and send it to Sentry. + * + * @param checkIn An object that describes a check in. + * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want + * to create a monitor automatically when sending a check in. + */ + captureCheckIn(checkIn, monitorConfig, scope) { + let id = "checkInId" in checkIn && checkIn.checkInId ? checkIn.checkInId : utils.uuid4(); + if (!this._isEnabled()) + return debugBuild.DEBUG_BUILD && utils.logger.warn("SDK not enabled, will not capture checkin."), id; + let options = this.getOptions(), { release, environment, tunnel } = options, serializedCheckIn = { + check_in_id: id, + monitor_slug: checkIn.monitorSlug, + status: checkIn.status, + release, + environment + }; + "duration" in checkIn && (serializedCheckIn.duration = checkIn.duration), monitorConfig && (serializedCheckIn.monitor_config = { + schedule: monitorConfig.schedule, + checkin_margin: monitorConfig.checkinMargin, + max_runtime: monitorConfig.maxRuntime, + timezone: monitorConfig.timezone, + failure_issue_threshold: monitorConfig.failureIssueThreshold, + recovery_threshold: monitorConfig.recoveryThreshold + }); + let [dynamicSamplingContext2, traceContext] = this._getTraceInfoFromScope(scope); + traceContext && (serializedCheckIn.contexts = { + trace: traceContext + }); + let envelope = checkin.createCheckInEnvelope( + serializedCheckIn, + dynamicSamplingContext2, + this.getSdkMetadata(), + tunnel, + this.getDsn() + ); + return debugBuild.DEBUG_BUILD && utils.logger.info("Sending checkin:", checkIn.monitorSlug, checkIn.status), this.sendEnvelope(envelope), id; + } + /** + * Method responsible for capturing/ending a request session by calling `incrementSessionStatusCount` to increment + * appropriate session aggregates bucket + */ + _captureRequestSession() { + this._sessionFlusher ? this._sessionFlusher.incrementSessionStatusCount() : debugBuild.DEBUG_BUILD && utils.logger.warn("Discarded request mode session because autoSessionTracking option was disabled"); + } + /** + * @inheritDoc + */ + _prepareEvent(event, hint, scope, isolationScope) { + return this._options.platform && (event.platform = event.platform || this._options.platform), this._options.runtime && (event.contexts = { + ...event.contexts, + runtime: (event.contexts || {}).runtime || this._options.runtime + }), this._options.serverName && (event.server_name = event.server_name || this._options.serverName), super._prepareEvent(event, hint, scope, isolationScope); + } + /** Extract trace information from scope */ + _getTraceInfoFromScope(scope) { + if (!scope) + return [void 0, void 0]; + let span = spanOnScope._getSpanForScope(scope); + if (span) { + let rootSpan = spanUtils.getRootSpan(span); + return [dynamicSamplingContext.getDynamicSamplingContextFromSpan(rootSpan), spanUtils.spanToTraceContext(rootSpan)]; + } + let { traceId, spanId, parentSpanId, dsc } = scope.getPropagationContext(), traceContext = { + trace_id: traceId, + span_id: spanId, + parent_span_id: parentSpanId + }; + return dsc ? [dsc, traceContext] : [dynamicSamplingContext.getDynamicSamplingContextFromClient(traceId, this), traceContext]; + } + }; + exports.ServerRuntimeClient = ServerRuntimeClient; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/sdk.js +var require_sdk = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/sdk.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), debugBuild = require_debug_build2(); + function initAndBind(clientClass, options) { + options.debug === !0 && (debugBuild.DEBUG_BUILD ? utils.logger.enable() : utils.consoleSandbox(() => { + console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."); + })), currentScopes.getCurrentScope().update(options.initialScope); + let client = new clientClass(options); + setCurrentClient(client), client.init(); + } + function setCurrentClient(client) { + currentScopes.getCurrentScope().setClient(client); + } + exports.initAndBind = initAndBind; + exports.setCurrentClient = setCurrentClient; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/transports/base.js +var require_base = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/transports/base.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), debugBuild = require_debug_build2(), DEFAULT_TRANSPORT_BUFFER_SIZE = 64; + function createTransport(options, makeRequest, buffer = utils.makePromiseBuffer( + options.bufferSize || DEFAULT_TRANSPORT_BUFFER_SIZE + )) { + let rateLimits = {}, flush = (timeout) => buffer.drain(timeout); + function send(envelope) { + let filteredEnvelopeItems = []; + if (utils.forEachEnvelopeItem(envelope, (item, type) => { + let dataCategory = utils.envelopeItemTypeToDataCategory(type); + if (utils.isRateLimited(rateLimits, dataCategory)) { + let event = getEventForEnvelopeItem(item, type); + options.recordDroppedEvent("ratelimit_backoff", dataCategory, event); + } else + filteredEnvelopeItems.push(item); + }), filteredEnvelopeItems.length === 0) + return utils.resolvedSyncPromise({}); + let filteredEnvelope = utils.createEnvelope(envelope[0], filteredEnvelopeItems), recordEnvelopeLoss = (reason) => { + utils.forEachEnvelopeItem(filteredEnvelope, (item, type) => { + let event = getEventForEnvelopeItem(item, type); + options.recordDroppedEvent(reason, utils.envelopeItemTypeToDataCategory(type), event); + }); + }, requestTask = () => makeRequest({ body: utils.serializeEnvelope(filteredEnvelope) }).then( + (response) => (response.statusCode !== void 0 && (response.statusCode < 200 || response.statusCode >= 300) && debugBuild.DEBUG_BUILD && utils.logger.warn(`Sentry responded with status code ${response.statusCode} to sent event.`), rateLimits = utils.updateRateLimits(rateLimits, response), response), + (error) => { + throw recordEnvelopeLoss("network_error"), error; + } + ); + return buffer.add(requestTask).then( + (result) => result, + (error) => { + if (error instanceof utils.SentryError) + return debugBuild.DEBUG_BUILD && utils.logger.error("Skipped sending event because buffer is full."), recordEnvelopeLoss("queue_overflow"), utils.resolvedSyncPromise({}); + throw error; + } + ); + } + return { + send, + flush + }; + } + function getEventForEnvelopeItem(item, type) { + if (!(type !== "event" && type !== "transaction")) + return Array.isArray(item) ? item[1] : void 0; + } + exports.DEFAULT_TRANSPORT_BUFFER_SIZE = DEFAULT_TRANSPORT_BUFFER_SIZE; + exports.createTransport = createTransport; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/transports/offline.js +var require_offline = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/transports/offline.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), debugBuild = require_debug_build2(), MIN_DELAY = 100, START_DELAY = 5e3, MAX_DELAY = 36e5; + function makeOfflineTransport(createTransport) { + function log(...args) { + debugBuild.DEBUG_BUILD && utils.logger.info("[Offline]:", ...args); + } + return (options) => { + let transport = createTransport(options); + if (!options.createStore) + throw new Error("No `createStore` function was provided"); + let store = options.createStore(options), retryDelay = START_DELAY, flushTimer; + function shouldQueue(env, error, retryDelay2) { + return utils.envelopeContainsItemType(env, ["client_report"]) ? !1 : options.shouldStore ? options.shouldStore(env, error, retryDelay2) : !0; + } + function flushIn(delay) { + flushTimer && clearTimeout(flushTimer), flushTimer = setTimeout(async () => { + flushTimer = void 0; + let found = await store.shift(); + found && (log("Attempting to send previously queued event"), found[0].sent_at = (/* @__PURE__ */ new Date()).toISOString(), send(found, !0).catch((e) => { + log("Failed to retry sending", e); + })); + }, delay), typeof flushTimer != "number" && flushTimer.unref && flushTimer.unref(); + } + function flushWithBackOff() { + flushTimer || (flushIn(retryDelay), retryDelay = Math.min(retryDelay * 2, MAX_DELAY)); + } + async function send(envelope, isRetry = !1) { + if (!isRetry && utils.envelopeContainsItemType(envelope, ["replay_event", "replay_recording"])) + return await store.push(envelope), flushIn(MIN_DELAY), {}; + try { + let result = await transport.send(envelope), delay = MIN_DELAY; + if (result) { + if (result.headers && result.headers["retry-after"]) + delay = utils.parseRetryAfterHeader(result.headers["retry-after"]); + else if (result.headers && result.headers["x-sentry-rate-limits"]) + delay = 6e4; + else if ((result.statusCode || 0) >= 400) + return result; + } + return flushIn(delay), retryDelay = START_DELAY, result; + } catch (e) { + if (await shouldQueue(envelope, e, retryDelay)) + return isRetry ? await store.unshift(envelope) : await store.push(envelope), flushWithBackOff(), log("Error sending. Event queued.", e), {}; + throw e; + } + } + return options.flushAtStartup && flushWithBackOff(), { + send, + flush: (t) => transport.flush(t) + }; + }; + } + exports.MIN_DELAY = MIN_DELAY; + exports.START_DELAY = START_DELAY; + exports.makeOfflineTransport = makeOfflineTransport; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/transports/multiplexed.js +var require_multiplexed = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/transports/multiplexed.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), api = require_api(); + function eventFromEnvelope(env, types) { + let event; + return utils.forEachEnvelopeItem(env, (item, type) => (types.includes(type) && (event = Array.isArray(item) ? item[1] : void 0), !!event)), event; + } + function makeOverrideReleaseTransport(createTransport, release) { + return (options) => { + let transport = createTransport(options); + return { + ...transport, + send: async (envelope) => { + let event = eventFromEnvelope(envelope, ["event", "transaction", "profile", "replay_event"]); + return event && (event.release = release), transport.send(envelope); + } + }; + }; + } + function overrideDsn(envelope, dsn) { + return utils.createEnvelope( + dsn ? { + ...envelope[0], + dsn + } : envelope[0], + envelope[1] + ); + } + function makeMultiplexedTransport(createTransport, matcher) { + return (options) => { + let fallbackTransport = createTransport(options), otherTransports = /* @__PURE__ */ new Map(); + function getTransport(dsn, release) { + let key = release ? `${dsn}:${release}` : dsn, transport = otherTransports.get(key); + if (!transport) { + let validatedDsn = utils.dsnFromString(dsn); + if (!validatedDsn) + return; + let url = api.getEnvelopeEndpointWithUrlEncodedAuth(validatedDsn, options.tunnel); + transport = release ? makeOverrideReleaseTransport(createTransport, release)({ ...options, url }) : createTransport({ ...options, url }), otherTransports.set(key, transport); + } + return [dsn, transport]; + } + async function send(envelope) { + function getEvent(types) { + let eventTypes = types && types.length ? types : ["event"]; + return eventFromEnvelope(envelope, eventTypes); + } + let transports = matcher({ envelope, getEvent }).map((result) => typeof result == "string" ? getTransport(result, void 0) : getTransport(result.dsn, result.release)).filter((t) => !!t); + return transports.length === 0 && transports.push(["", fallbackTransport]), (await Promise.all( + transports.map(([dsn, transport]) => transport.send(overrideDsn(envelope, dsn))) + ))[0]; + } + async function flush(timeout) { + let allTransports = [...otherTransports.values(), fallbackTransport]; + return (await Promise.all(allTransports.map((transport) => transport.flush(timeout)))).every((r) => r); + } + return { + send, + flush + }; + }; + } + exports.eventFromEnvelope = eventFromEnvelope; + exports.makeMultiplexedTransport = makeMultiplexedTransport; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/isSentryRequestUrl.js +var require_isSentryRequestUrl = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/isSentryRequestUrl.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function isSentryRequestUrl(url, client) { + let dsn = client && client.getDsn(), tunnel = client && client.getOptions().tunnel; + return checkDsn(url, dsn) || checkTunnel(url, tunnel); + } + function checkTunnel(url, tunnel) { + return tunnel ? removeTrailingSlash(url) === removeTrailingSlash(tunnel) : !1; + } + function checkDsn(url, dsn) { + return dsn ? url.includes(dsn.host) : !1; + } + function removeTrailingSlash(str) { + return str[str.length - 1] === "/" ? str.slice(0, -1) : str; + } + exports.isSentryRequestUrl = isSentryRequestUrl; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/parameterize.js +var require_parameterize = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/parameterize.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function parameterize(strings, ...values) { + let formatted = new String(String.raw(strings, ...values)); + return formatted.__sentry_template_string__ = strings.join("\0").replace(/%/g, "%%").replace(/\0/g, "%s"), formatted.__sentry_template_values__ = values, formatted; + } + exports.parameterize = parameterize; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/sdkMetadata.js +var require_sdkMetadata = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/sdkMetadata.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(); + function applySdkMetadata(options, name, names = [name], source = "npm") { + let metadata = options._metadata || {}; + metadata.sdk || (metadata.sdk = { + name: `sentry.javascript.${name}`, + packages: names.map((name2) => ({ + name: `${source}:@sentry/${name2}`, + version: utils.SDK_VERSION + })), + version: utils.SDK_VERSION + }), options._metadata = metadata; + } + exports.applySdkMetadata = applySdkMetadata; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/breadcrumbs.js +var require_breadcrumbs = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/breadcrumbs.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), DEFAULT_BREADCRUMBS = 100; + function addBreadcrumb(breadcrumb, hint) { + let client = currentScopes.getClient(), isolationScope = currentScopes.getIsolationScope(); + if (!client) return; + let { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } = client.getOptions(); + if (maxBreadcrumbs <= 0) return; + let mergedBreadcrumb = { timestamp: utils.dateTimestampInSeconds(), ...breadcrumb }, finalBreadcrumb = beforeBreadcrumb ? utils.consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint)) : mergedBreadcrumb; + finalBreadcrumb !== null && (client.emit && client.emit("beforeAddBreadcrumb", finalBreadcrumb, hint), isolationScope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs)); + } + exports.addBreadcrumb = addBreadcrumb; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/functiontostring.js +var require_functiontostring = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/functiontostring.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), integration = require_integration(), originalFunctionToString, INTEGRATION_NAME = "FunctionToString", SETUP_CLIENTS = /* @__PURE__ */ new WeakMap(), _functionToStringIntegration = () => ({ + name: INTEGRATION_NAME, + setupOnce() { + originalFunctionToString = Function.prototype.toString; + try { + Function.prototype.toString = function(...args) { + let originalFunction = utils.getOriginalFunction(this), context = SETUP_CLIENTS.has(currentScopes.getClient()) && originalFunction !== void 0 ? originalFunction : this; + return originalFunctionToString.apply(context, args); + }; + } catch { + } + }, + setup(client) { + SETUP_CLIENTS.set(client, !0); + } + }), functionToStringIntegration = integration.defineIntegration(_functionToStringIntegration); + exports.functionToStringIntegration = functionToStringIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/inboundfilters.js +var require_inboundfilters = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/inboundfilters.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), debugBuild = require_debug_build2(), integration = require_integration(), DEFAULT_IGNORE_ERRORS = [ + /^Script error\.?$/, + /^Javascript error: Script error\.? on line 0$/, + /^ResizeObserver loop completed with undelivered notifications.$/, + // The browser logs this when a ResizeObserver handler takes a bit longer. Usually this is not an actual issue though. It indicates slowness. + /^Cannot redefine property: googletag$/, + // This is thrown when google tag manager is used in combination with an ad blocker + "undefined is not an object (evaluating 'a.L')", + // Random error that happens but not actionable or noticeable to end-users. + `can't redefine non-configurable property "solana"`, + // Probably a browser extension or custom browser (Brave) throwing this error + "vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)", + // Error thrown by GTM, seemingly not affecting end-users + "Can't find variable: _AutofillCallbackHandler" + // Unactionable error in instagram webview https://developers.facebook.com/community/threads/320013549791141/ + ], INTEGRATION_NAME = "InboundFilters", _inboundFiltersIntegration = (options = {}) => ({ + name: INTEGRATION_NAME, + processEvent(event, _hint, client) { + let clientOptions = client.getOptions(), mergedOptions = _mergeOptions(options, clientOptions); + return _shouldDropEvent(event, mergedOptions) ? null : event; + } + }), inboundFiltersIntegration = integration.defineIntegration(_inboundFiltersIntegration); + function _mergeOptions(internalOptions = {}, clientOptions = {}) { + return { + allowUrls: [...internalOptions.allowUrls || [], ...clientOptions.allowUrls || []], + denyUrls: [...internalOptions.denyUrls || [], ...clientOptions.denyUrls || []], + ignoreErrors: [ + ...internalOptions.ignoreErrors || [], + ...clientOptions.ignoreErrors || [], + ...internalOptions.disableErrorDefaults ? [] : DEFAULT_IGNORE_ERRORS + ], + ignoreTransactions: [...internalOptions.ignoreTransactions || [], ...clientOptions.ignoreTransactions || []], + ignoreInternal: internalOptions.ignoreInternal !== void 0 ? internalOptions.ignoreInternal : !0 + }; + } + function _shouldDropEvent(event, options) { + return options.ignoreInternal && _isSentryError(event) ? (debugBuild.DEBUG_BUILD && utils.logger.warn(`Event dropped due to being internal Sentry Error. +Event: ${utils.getEventDescription(event)}`), !0) : _isIgnoredError(event, options.ignoreErrors) ? (debugBuild.DEBUG_BUILD && utils.logger.warn( + `Event dropped due to being matched by \`ignoreErrors\` option. +Event: ${utils.getEventDescription(event)}` + ), !0) : _isUselessError(event) ? (debugBuild.DEBUG_BUILD && utils.logger.warn( + `Event dropped due to not having an error message, error type or stacktrace. +Event: ${utils.getEventDescription( + event + )}` + ), !0) : _isIgnoredTransaction(event, options.ignoreTransactions) ? (debugBuild.DEBUG_BUILD && utils.logger.warn( + `Event dropped due to being matched by \`ignoreTransactions\` option. +Event: ${utils.getEventDescription(event)}` + ), !0) : _isDeniedUrl(event, options.denyUrls) ? (debugBuild.DEBUG_BUILD && utils.logger.warn( + `Event dropped due to being matched by \`denyUrls\` option. +Event: ${utils.getEventDescription( + event + )}. +Url: ${_getEventFilterUrl(event)}` + ), !0) : _isAllowedUrl(event, options.allowUrls) ? !1 : (debugBuild.DEBUG_BUILD && utils.logger.warn( + `Event dropped due to not being matched by \`allowUrls\` option. +Event: ${utils.getEventDescription( + event + )}. +Url: ${_getEventFilterUrl(event)}` + ), !0); + } + function _isIgnoredError(event, ignoreErrors) { + return event.type || !ignoreErrors || !ignoreErrors.length ? !1 : _getPossibleEventMessages(event).some((message) => utils.stringMatchesSomePattern(message, ignoreErrors)); + } + function _isIgnoredTransaction(event, ignoreTransactions) { + if (event.type !== "transaction" || !ignoreTransactions || !ignoreTransactions.length) + return !1; + let name = event.transaction; + return name ? utils.stringMatchesSomePattern(name, ignoreTransactions) : !1; + } + function _isDeniedUrl(event, denyUrls) { + if (!denyUrls || !denyUrls.length) + return !1; + let url = _getEventFilterUrl(event); + return url ? utils.stringMatchesSomePattern(url, denyUrls) : !1; + } + function _isAllowedUrl(event, allowUrls) { + if (!allowUrls || !allowUrls.length) + return !0; + let url = _getEventFilterUrl(event); + return url ? utils.stringMatchesSomePattern(url, allowUrls) : !0; + } + function _getPossibleEventMessages(event) { + let possibleMessages = []; + event.message && possibleMessages.push(event.message); + let lastException; + try { + lastException = event.exception.values[event.exception.values.length - 1]; + } catch { + } + return lastException && lastException.value && (possibleMessages.push(lastException.value), lastException.type && possibleMessages.push(`${lastException.type}: ${lastException.value}`)), possibleMessages; + } + function _isSentryError(event) { + try { + return event.exception.values[0].type === "SentryError"; + } catch { + } + return !1; + } + function _getLastValidUrl(frames = []) { + for (let i = frames.length - 1; i >= 0; i--) { + let frame = frames[i]; + if (frame && frame.filename !== "" && frame.filename !== "[native code]") + return frame.filename || null; + } + return null; + } + function _getEventFilterUrl(event) { + try { + let frames; + try { + frames = event.exception.values[0].stacktrace.frames; + } catch { + } + return frames ? _getLastValidUrl(frames) : null; + } catch { + return debugBuild.DEBUG_BUILD && utils.logger.error(`Cannot extract url for event ${utils.getEventDescription(event)}`), null; + } + } + function _isUselessError(event) { + return event.type || !event.exception || !event.exception.values || event.exception.values.length === 0 ? !1 : ( + // No top-level message + !event.message && // There are no exception values that have a stacktrace, a non-generic-Error type or value + !event.exception.values.some((value) => value.stacktrace || value.type && value.type !== "Error" || value.value) + ); + } + exports.inboundFiltersIntegration = inboundFiltersIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/linkederrors.js +var require_linkederrors = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/linkederrors.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), DEFAULT_KEY = "cause", DEFAULT_LIMIT = 5, INTEGRATION_NAME = "LinkedErrors", _linkedErrorsIntegration = (options = {}) => { + let limit = options.limit || DEFAULT_LIMIT, key = options.key || DEFAULT_KEY; + return { + name: INTEGRATION_NAME, + preprocessEvent(event, hint, client) { + let options2 = client.getOptions(); + utils.applyAggregateErrorsToEvent( + utils.exceptionFromError, + options2.stackParser, + options2.maxValueLength, + key, + limit, + event, + hint + ); + } + }; + }, linkedErrorsIntegration = integration.defineIntegration(_linkedErrorsIntegration); + exports.linkedErrorsIntegration = linkedErrorsIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metadata.js +var require_metadata = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metadata.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), filenameMetadataMap = /* @__PURE__ */ new Map(), parsedStacks = /* @__PURE__ */ new Set(); + function ensureMetadataStacksAreParsed(parser) { + if (utils.GLOBAL_OBJ._sentryModuleMetadata) + for (let stack of Object.keys(utils.GLOBAL_OBJ._sentryModuleMetadata)) { + let metadata = utils.GLOBAL_OBJ._sentryModuleMetadata[stack]; + if (parsedStacks.has(stack)) + continue; + parsedStacks.add(stack); + let frames = parser(stack); + for (let frame of frames.reverse()) + if (frame.filename) { + filenameMetadataMap.set(frame.filename, metadata); + break; + } + } + } + function getMetadataForUrl(parser, filename) { + return ensureMetadataStacksAreParsed(parser), filenameMetadataMap.get(filename); + } + function addMetadataToStackFrames(parser, event) { + try { + event.exception.values.forEach((exception) => { + if (exception.stacktrace) + for (let frame of exception.stacktrace.frames || []) { + if (!frame.filename || frame.module_metadata) + continue; + let metadata = getMetadataForUrl(parser, frame.filename); + metadata && (frame.module_metadata = metadata); + } + }); + } catch { + } + } + function stripMetadataFromStackFrames(event) { + try { + event.exception.values.forEach((exception) => { + if (exception.stacktrace) + for (let frame of exception.stacktrace.frames || []) + delete frame.module_metadata; + }); + } catch { + } + } + exports.addMetadataToStackFrames = addMetadataToStackFrames; + exports.getMetadataForUrl = getMetadataForUrl; + exports.stripMetadataFromStackFrames = stripMetadataFromStackFrames; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/metadata.js +var require_metadata2 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/metadata.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), metadata = require_metadata(), INTEGRATION_NAME = "ModuleMetadata", _moduleMetadataIntegration = () => ({ + name: INTEGRATION_NAME, + setup(client) { + client.on("beforeEnvelope", (envelope) => { + utils.forEachEnvelopeItem(envelope, (item, type) => { + if (type === "event") { + let event = Array.isArray(item) ? item[1] : void 0; + event && (metadata.stripMetadataFromStackFrames(event), item[1] = event); + } + }); + }); + }, + processEvent(event, _hint, client) { + let stackParser = client.getOptions().stackParser; + return metadata.addMetadataToStackFrames(stackParser, event), event; + } + }), moduleMetadataIntegration = integration.defineIntegration(_moduleMetadataIntegration); + exports.moduleMetadataIntegration = moduleMetadataIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/requestdata.js +var require_requestdata2 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/requestdata.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), DEFAULT_OPTIONS = { + include: { + cookies: !0, + data: !0, + headers: !0, + ip: !1, + query_string: !0, + url: !0, + user: { + id: !0, + username: !0, + email: !0 + } + }, + transactionNamingScheme: "methodPath" + }, INTEGRATION_NAME = "RequestData", _requestDataIntegration = (options = {}) => { + let _options = { + ...DEFAULT_OPTIONS, + ...options, + include: { + ...DEFAULT_OPTIONS.include, + ...options.include, + user: options.include && typeof options.include.user == "boolean" ? options.include.user : { + ...DEFAULT_OPTIONS.include.user, + // Unclear why TS still thinks `options.include.user` could be a boolean at this point + ...(options.include || {}).user + } + } + }; + return { + name: INTEGRATION_NAME, + processEvent(event) { + let { sdkProcessingMetadata = {} } = event, req = sdkProcessingMetadata.request; + if (!req) + return event; + let addRequestDataOptions = convertReqDataIntegrationOptsToAddReqDataOpts(_options); + return utils.addRequestDataToEvent(event, req, addRequestDataOptions); + } + }; + }, requestDataIntegration = integration.defineIntegration(_requestDataIntegration); + function convertReqDataIntegrationOptsToAddReqDataOpts(integrationOptions) { + let { + transactionNamingScheme, + include: { ip, user, ...requestOptions } + } = integrationOptions, requestIncludeKeys = ["method"]; + for (let [key, value] of Object.entries(requestOptions)) + value && requestIncludeKeys.push(key); + let addReqDataUserOpt; + if (user === void 0) + addReqDataUserOpt = !0; + else if (typeof user == "boolean") + addReqDataUserOpt = user; + else { + let userIncludeKeys = []; + for (let [key, value] of Object.entries(user)) + value && userIncludeKeys.push(key); + addReqDataUserOpt = userIncludeKeys; + } + return { + include: { + ip, + user: addReqDataUserOpt, + request: requestIncludeKeys.length !== 0 ? requestIncludeKeys : void 0, + transaction: transactionNamingScheme + } + }; + } + exports.requestDataIntegration = requestDataIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/captureconsole.js +var require_captureconsole = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/captureconsole.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), exports$1 = require_exports(), integration = require_integration(), INTEGRATION_NAME = "CaptureConsole", _captureConsoleIntegration = (options = {}) => { + let levels = options.levels || utils.CONSOLE_LEVELS; + return { + name: INTEGRATION_NAME, + setup(client) { + "console" in utils.GLOBAL_OBJ && utils.addConsoleInstrumentationHandler(({ args, level }) => { + currentScopes.getClient() !== client || !levels.includes(level) || consoleHandler(args, level); + }); + } + }; + }, captureConsoleIntegration = integration.defineIntegration(_captureConsoleIntegration); + function consoleHandler(args, level) { + let captureContext = { + level: utils.severityLevelFromString(level), + extra: { + arguments: args + } + }; + currentScopes.withScope((scope) => { + if (scope.addEventProcessor((event) => (event.logger = "console", utils.addExceptionMechanism(event, { + handled: !1, + type: "console" + }), event)), level === "assert") { + if (!args[0]) { + let message2 = `Assertion failed: ${utils.safeJoin(args.slice(1), " ") || "console.assert"}`; + scope.setExtra("arguments", args.slice(1)), exports$1.captureMessage(message2, captureContext); + } + return; + } + let error = args.find((arg) => arg instanceof Error); + if (error) { + exports$1.captureException(error, captureContext); + return; + } + let message = utils.safeJoin(args, " "); + exports$1.captureMessage(message, captureContext); + }); + } + exports.captureConsoleIntegration = captureConsoleIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/debug.js +var require_debug = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/debug.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), INTEGRATION_NAME = "Debug", _debugIntegration = (options = {}) => { + let _options = { + debugger: !1, + stringify: !1, + ...options + }; + return { + name: INTEGRATION_NAME, + setup(client) { + client.on("beforeSendEvent", (event, hint) => { + if (_options.debugger) + debugger; + utils.consoleSandbox(() => { + _options.stringify ? (console.log(JSON.stringify(event, null, 2)), hint && Object.keys(hint).length && console.log(JSON.stringify(hint, null, 2))) : (console.log(event), hint && Object.keys(hint).length && console.log(hint)); + }); + }); + } + }; + }, debugIntegration = integration.defineIntegration(_debugIntegration); + exports.debugIntegration = debugIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/dedupe.js +var require_dedupe = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/dedupe.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), debugBuild = require_debug_build2(), INTEGRATION_NAME = "Dedupe", _dedupeIntegration = () => { + let previousEvent; + return { + name: INTEGRATION_NAME, + processEvent(currentEvent) { + if (currentEvent.type) + return currentEvent; + try { + if (_shouldDropEvent(currentEvent, previousEvent)) + return debugBuild.DEBUG_BUILD && utils.logger.warn("Event dropped due to being a duplicate of previously captured event."), null; + } catch { + } + return previousEvent = currentEvent; + } + }; + }, dedupeIntegration = integration.defineIntegration(_dedupeIntegration); + function _shouldDropEvent(currentEvent, previousEvent) { + return previousEvent ? !!(_isSameMessageEvent(currentEvent, previousEvent) || _isSameExceptionEvent(currentEvent, previousEvent)) : !1; + } + function _isSameMessageEvent(currentEvent, previousEvent) { + let currentMessage = currentEvent.message, previousMessage = previousEvent.message; + return !(!currentMessage && !previousMessage || currentMessage && !previousMessage || !currentMessage && previousMessage || currentMessage !== previousMessage || !_isSameFingerprint(currentEvent, previousEvent) || !_isSameStacktrace(currentEvent, previousEvent)); + } + function _isSameExceptionEvent(currentEvent, previousEvent) { + let previousException = _getExceptionFromEvent(previousEvent), currentException = _getExceptionFromEvent(currentEvent); + return !(!previousException || !currentException || previousException.type !== currentException.type || previousException.value !== currentException.value || !_isSameFingerprint(currentEvent, previousEvent) || !_isSameStacktrace(currentEvent, previousEvent)); + } + function _isSameStacktrace(currentEvent, previousEvent) { + let currentFrames = utils.getFramesFromEvent(currentEvent), previousFrames = utils.getFramesFromEvent(previousEvent); + if (!currentFrames && !previousFrames) + return !0; + if (currentFrames && !previousFrames || !currentFrames && previousFrames || (currentFrames = currentFrames, previousFrames = previousFrames, previousFrames.length !== currentFrames.length)) + return !1; + for (let i = 0; i < previousFrames.length; i++) { + let frameA = previousFrames[i], frameB = currentFrames[i]; + if (frameA.filename !== frameB.filename || frameA.lineno !== frameB.lineno || frameA.colno !== frameB.colno || frameA.function !== frameB.function) + return !1; + } + return !0; + } + function _isSameFingerprint(currentEvent, previousEvent) { + let currentFingerprint = currentEvent.fingerprint, previousFingerprint = previousEvent.fingerprint; + if (!currentFingerprint && !previousFingerprint) + return !0; + if (currentFingerprint && !previousFingerprint || !currentFingerprint && previousFingerprint) + return !1; + currentFingerprint = currentFingerprint, previousFingerprint = previousFingerprint; + try { + return currentFingerprint.join("") === previousFingerprint.join(""); + } catch { + return !1; + } + } + function _getExceptionFromEvent(event) { + return event.exception && event.exception.values && event.exception.values[0]; + } + exports._shouldDropEvent = _shouldDropEvent; + exports.dedupeIntegration = dedupeIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/extraerrordata.js +var require_extraerrordata = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/extraerrordata.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), debugBuild = require_debug_build2(), INTEGRATION_NAME = "ExtraErrorData", _extraErrorDataIntegration = (options = {}) => { + let { depth = 3, captureErrorCause = !0 } = options; + return { + name: INTEGRATION_NAME, + processEvent(event, hint) { + return _enhanceEventWithErrorData(event, hint, depth, captureErrorCause); + } + }; + }, extraErrorDataIntegration = integration.defineIntegration(_extraErrorDataIntegration); + function _enhanceEventWithErrorData(event, hint = {}, depth, captureErrorCause) { + if (!hint.originalException || !utils.isError(hint.originalException)) + return event; + let exceptionName = hint.originalException.name || hint.originalException.constructor.name, errorData = _extractErrorData(hint.originalException, captureErrorCause); + if (errorData) { + let contexts = { + ...event.contexts + }, normalizedErrorData = utils.normalize(errorData, depth); + return utils.isPlainObject(normalizedErrorData) && (utils.addNonEnumerableProperty(normalizedErrorData, "__sentry_skip_normalization__", !0), contexts[exceptionName] = normalizedErrorData), { + ...event, + contexts + }; + } + return event; + } + function _extractErrorData(error, captureErrorCause) { + try { + let nativeKeys = [ + "name", + "message", + "stack", + "line", + "column", + "fileName", + "lineNumber", + "columnNumber", + "toJSON" + ], extraErrorInfo = {}; + for (let key of Object.keys(error)) { + if (nativeKeys.indexOf(key) !== -1) + continue; + let value = error[key]; + extraErrorInfo[key] = utils.isError(value) ? value.toString() : value; + } + if (captureErrorCause && error.cause !== void 0 && (extraErrorInfo.cause = utils.isError(error.cause) ? error.cause.toString() : error.cause), typeof error.toJSON == "function") { + let serializedError = error.toJSON(); + for (let key of Object.keys(serializedError)) { + let value = serializedError[key]; + extraErrorInfo[key] = utils.isError(value) ? value.toString() : value; + } + } + return extraErrorInfo; + } catch (oO) { + debugBuild.DEBUG_BUILD && utils.logger.error("Unable to extract extra data from the Error object:", oO); + } + return null; + } + exports.extraErrorDataIntegration = extraErrorDataIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/rewriteframes.js +var require_rewriteframes = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/rewriteframes.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), INTEGRATION_NAME = "RewriteFrames", rewriteFramesIntegration2 = integration.defineIntegration((options = {}) => { + let root = options.root, prefix = options.prefix || "app:///", isBrowser = "window" in utils.GLOBAL_OBJ && utils.GLOBAL_OBJ.window !== void 0, iteratee = options.iteratee || generateIteratee({ isBrowser, root, prefix }); + function _processExceptionsEvent(event) { + try { + return { + ...event, + exception: { + ...event.exception, + // The check for this is performed inside `process` call itself, safe to skip here + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + values: event.exception.values.map((value) => ({ + ...value, + ...value.stacktrace && { stacktrace: _processStacktrace(value.stacktrace) } + })) + } + }; + } catch { + return event; + } + } + function _processStacktrace(stacktrace) { + return { + ...stacktrace, + frames: stacktrace && stacktrace.frames && stacktrace.frames.map((f) => iteratee(f)) + }; + } + return { + name: INTEGRATION_NAME, + processEvent(originalEvent) { + let processedEvent = originalEvent; + return originalEvent.exception && Array.isArray(originalEvent.exception.values) && (processedEvent = _processExceptionsEvent(processedEvent)), processedEvent; + } + }; + }); + function generateIteratee({ + isBrowser, + root, + prefix + }) { + return (frame) => { + if (!frame.filename) + return frame; + let isWindowsFrame = /^[a-zA-Z]:\\/.test(frame.filename) || // or the presence of a backslash without a forward slash (which are not allowed on Windows) + frame.filename.includes("\\") && !frame.filename.includes("/"), startsWithSlash = /^\//.test(frame.filename); + if (isBrowser) { + if (root) { + let oldFilename = frame.filename; + oldFilename.indexOf(root) === 0 && (frame.filename = oldFilename.replace(root, prefix)); + } + } else if (isWindowsFrame || startsWithSlash) { + let filename = isWindowsFrame ? frame.filename.replace(/^[a-zA-Z]:/, "").replace(/\\/g, "/") : frame.filename, base = root ? utils.relative(root, filename) : utils.basename(filename); + frame.filename = `${prefix}${base}`; + } + return frame; + }; + } + exports.generateIteratee = generateIteratee; + exports.rewriteFramesIntegration = rewriteFramesIntegration2; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/sessiontiming.js +var require_sessiontiming = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/sessiontiming.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), INTEGRATION_NAME = "SessionTiming", _sessionTimingIntegration = () => { + let startTime = utils.timestampInSeconds() * 1e3; + return { + name: INTEGRATION_NAME, + processEvent(event) { + let now = utils.timestampInSeconds() * 1e3; + return { + ...event, + extra: { + ...event.extra, + "session:start": startTime, + "session:duration": now - startTime, + "session:end": now + } + }; + } + }; + }, sessionTimingIntegration = integration.defineIntegration(_sessionTimingIntegration); + exports.sessionTimingIntegration = sessionTimingIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/zoderrors.js +var require_zoderrors = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/zoderrors.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), DEFAULT_LIMIT = 10, INTEGRATION_NAME = "ZodErrors"; + function originalExceptionIsZodError(originalException) { + return utils.isError(originalException) && originalException.name === "ZodError" && Array.isArray(originalException.errors); + } + function formatIssueTitle(issue) { + return { + ...issue, + path: "path" in issue && Array.isArray(issue.path) ? issue.path.join(".") : void 0, + keys: "keys" in issue ? JSON.stringify(issue.keys) : void 0, + unionErrors: "unionErrors" in issue ? JSON.stringify(issue.unionErrors) : void 0 + }; + } + function formatIssueMessage(zodError) { + let errorKeyMap = /* @__PURE__ */ new Set(); + for (let iss of zodError.issues) + iss.path && errorKeyMap.add(iss.path[0]); + let errorKeys = Array.from(errorKeyMap); + return `Failed to validate keys: ${utils.truncate(errorKeys.join(", "), 100)}`; + } + function applyZodErrorsToEvent(limit, event, hint) { + return !event.exception || !event.exception.values || !hint || !hint.originalException || !originalExceptionIsZodError(hint.originalException) || hint.originalException.issues.length === 0 ? event : { + ...event, + exception: { + ...event.exception, + values: [ + { + ...event.exception.values[0], + value: formatIssueMessage(hint.originalException) + }, + ...event.exception.values.slice(1) + ] + }, + extra: { + ...event.extra, + "zoderror.issues": hint.originalException.errors.slice(0, limit).map(formatIssueTitle) + } + }; + } + var _zodErrorsIntegration = (options = {}) => { + let limit = options.limit || DEFAULT_LIMIT; + return { + name: INTEGRATION_NAME, + processEvent(originalEvent, hint) { + return applyZodErrorsToEvent(limit, originalEvent, hint); + } + }; + }, zodErrorsIntegration = integration.defineIntegration(_zodErrorsIntegration); + exports.applyZodErrorsToEvent = applyZodErrorsToEvent; + exports.zodErrorsIntegration = zodErrorsIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/third-party-errors-filter.js +var require_third_party_errors_filter = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/third-party-errors-filter.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), metadata = require_metadata(), thirdPartyErrorFilterIntegration = integration.defineIntegration((options) => ({ + name: "ThirdPartyErrorsFilter", + setup(client) { + client.on("beforeEnvelope", (envelope) => { + utils.forEachEnvelopeItem(envelope, (item, type) => { + if (type === "event") { + let event = Array.isArray(item) ? item[1] : void 0; + event && (metadata.stripMetadataFromStackFrames(event), item[1] = event); + } + }); + }); + }, + processEvent(event, _hint, client) { + let stackParser = client.getOptions().stackParser; + metadata.addMetadataToStackFrames(stackParser, event); + let frameKeys = getBundleKeysForAllFramesWithFilenames(event); + if (frameKeys) { + let arrayMethod = options.behaviour === "drop-error-if-contains-third-party-frames" || options.behaviour === "apply-tag-if-contains-third-party-frames" ? "some" : "every"; + if (frameKeys[arrayMethod]((keys) => !keys.some((key) => options.filterKeys.includes(key)))) { + if (options.behaviour === "drop-error-if-contains-third-party-frames" || options.behaviour === "drop-error-if-exclusively-contains-third-party-frames") + return null; + event.tags = { + ...event.tags, + third_party_code: !0 + }; + } + } + return event; + } + })); + function getBundleKeysForAllFramesWithFilenames(event) { + let frames = utils.getFramesFromEvent(event); + if (frames) + return frames.filter((frame) => !!frame.filename).map((frame) => frame.module_metadata ? Object.keys(frame.module_metadata).filter((key) => key.startsWith(BUNDLER_PLUGIN_APP_KEY_PREFIX)).map((key) => key.slice(BUNDLER_PLUGIN_APP_KEY_PREFIX.length)) : []); + } + var BUNDLER_PLUGIN_APP_KEY_PREFIX = "_sentryBundlerPluginAppKey:"; + exports.thirdPartyErrorFilterIntegration = thirdPartyErrorFilterIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/constants.js +var require_constants2 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/constants.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var COUNTER_METRIC_TYPE = "c", GAUGE_METRIC_TYPE = "g", SET_METRIC_TYPE = "s", DISTRIBUTION_METRIC_TYPE = "d", DEFAULT_BROWSER_FLUSH_INTERVAL = 5e3, DEFAULT_FLUSH_INTERVAL = 1e4, MAX_WEIGHT = 1e4; + exports.COUNTER_METRIC_TYPE = COUNTER_METRIC_TYPE; + exports.DEFAULT_BROWSER_FLUSH_INTERVAL = DEFAULT_BROWSER_FLUSH_INTERVAL; + exports.DEFAULT_FLUSH_INTERVAL = DEFAULT_FLUSH_INTERVAL; + exports.DISTRIBUTION_METRIC_TYPE = DISTRIBUTION_METRIC_TYPE; + exports.GAUGE_METRIC_TYPE = GAUGE_METRIC_TYPE; + exports.MAX_WEIGHT = MAX_WEIGHT; + exports.SET_METRIC_TYPE = SET_METRIC_TYPE; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/exports.js +var require_exports2 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/exports.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), debugBuild = require_debug_build2(); + require_errors(); + var spanUtils = require_spanUtils(), trace = require_trace(), handleCallbackErrors = require_handleCallbackErrors(), constants = require_constants2(); + function getMetricsAggregatorForClient(client, Aggregator) { + let globalMetricsAggregators = utils.getGlobalSingleton( + "globalMetricsAggregators", + () => /* @__PURE__ */ new WeakMap() + ), aggregator = globalMetricsAggregators.get(client); + if (aggregator) + return aggregator; + let newAggregator = new Aggregator(client); + return client.on("flush", () => newAggregator.flush()), client.on("close", () => newAggregator.close()), globalMetricsAggregators.set(client, newAggregator), newAggregator; + } + function addToMetricsAggregator(Aggregator, metricType, name, value, data = {}) { + let client = data.client || currentScopes.getClient(); + if (!client) + return; + let span = spanUtils.getActiveSpan(), rootSpan = span ? spanUtils.getRootSpan(span) : void 0, transactionName = rootSpan && spanUtils.spanToJSON(rootSpan).description, { unit, tags, timestamp } = data, { release, environment } = client.getOptions(), metricTags = {}; + release && (metricTags.release = release), environment && (metricTags.environment = environment), transactionName && (metricTags.transaction = transactionName), debugBuild.DEBUG_BUILD && utils.logger.log(`Adding value of ${value} to ${metricType} metric ${name}`), getMetricsAggregatorForClient(client, Aggregator).add(metricType, name, value, unit, { ...metricTags, ...tags }, timestamp); + } + function increment(aggregator, name, value = 1, data) { + addToMetricsAggregator(aggregator, constants.COUNTER_METRIC_TYPE, name, ensureNumber(value), data); + } + function distribution(aggregator, name, value, data) { + addToMetricsAggregator(aggregator, constants.DISTRIBUTION_METRIC_TYPE, name, ensureNumber(value), data); + } + function timing(aggregator, name, value, unit = "second", data) { + if (typeof value == "function") { + let startTime = utils.timestampInSeconds(); + return trace.startSpanManual( + { + op: "metrics.timing", + name, + startTime, + onlyIfParent: !0 + }, + (span) => handleCallbackErrors.handleCallbackErrors( + () => value(), + () => { + }, + () => { + let endTime = utils.timestampInSeconds(), timeDiff = endTime - startTime; + distribution(aggregator, name, timeDiff, { ...data, unit: "second" }), span.end(endTime); + } + ) + ); + } + distribution(aggregator, name, value, { ...data, unit }); + } + function set(aggregator, name, value, data) { + addToMetricsAggregator(aggregator, constants.SET_METRIC_TYPE, name, value, data); + } + function gauge(aggregator, name, value, data) { + addToMetricsAggregator(aggregator, constants.GAUGE_METRIC_TYPE, name, ensureNumber(value), data); + } + var metrics = { + increment, + distribution, + set, + gauge, + timing, + /** + * @ignore This is for internal use only. + */ + getMetricsAggregatorForClient + }; + function ensureNumber(number) { + return typeof number == "string" ? parseInt(number) : number; + } + exports.metrics = metrics; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/utils.js +var require_utils2 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/utils.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(); + function getBucketKey(metricType, name, unit, tags) { + let stringifiedTags = Object.entries(utils.dropUndefinedKeys(tags)).sort((a, b) => a[0].localeCompare(b[0])); + return `${metricType}${name}${unit}${stringifiedTags}`; + } + function simpleHash(s) { + let rv = 0; + for (let i = 0; i < s.length; i++) { + let c = s.charCodeAt(i); + rv = (rv << 5) - rv + c, rv &= rv; + } + return rv >>> 0; + } + function serializeMetricBuckets(metricBucketItems) { + let out = ""; + for (let item of metricBucketItems) { + let tagEntries = Object.entries(item.tags), maybeTags = tagEntries.length > 0 ? `|#${tagEntries.map(([key, value]) => `${key}:${value}`).join(",")}` : ""; + out += `${item.name}@${item.unit}:${item.metric}|${item.metricType}${maybeTags}|T${item.timestamp} +`; + } + return out; + } + function sanitizeUnit(unit) { + return unit.replace(/[^\w]+/gi, "_"); + } + function sanitizeMetricKey(key) { + return key.replace(/[^\w\-.]+/gi, "_"); + } + function sanitizeTagKey(key) { + return key.replace(/[^\w\-./]+/gi, ""); + } + var tagValueReplacements = [ + [` +`, "\\n"], + ["\r", "\\r"], + [" ", "\\t"], + ["\\", "\\\\"], + ["|", "\\u{7c}"], + [",", "\\u{2c}"] + ]; + function getCharOrReplacement(input) { + for (let [search, replacement] of tagValueReplacements) + if (input === search) + return replacement; + return input; + } + function sanitizeTagValue(value) { + return [...value].reduce((acc, char) => acc + getCharOrReplacement(char), ""); + } + function sanitizeTags(unsanitizedTags) { + let tags = {}; + for (let key in unsanitizedTags) + if (Object.prototype.hasOwnProperty.call(unsanitizedTags, key)) { + let sanitizedKey = sanitizeTagKey(key); + tags[sanitizedKey] = sanitizeTagValue(String(unsanitizedTags[key])); + } + return tags; + } + exports.getBucketKey = getBucketKey; + exports.sanitizeMetricKey = sanitizeMetricKey; + exports.sanitizeTags = sanitizeTags; + exports.sanitizeUnit = sanitizeUnit; + exports.serializeMetricBuckets = serializeMetricBuckets; + exports.simpleHash = simpleHash; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/envelope.js +var require_envelope3 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/envelope.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), utils$1 = require_utils2(); + function captureAggregateMetrics(client, metricBucketItems) { + utils.logger.log(`Flushing aggregated metrics, number of metrics: ${metricBucketItems.length}`); + let dsn = client.getDsn(), metadata = client.getSdkMetadata(), tunnel = client.getOptions().tunnel, metricsEnvelope = createMetricEnvelope(metricBucketItems, dsn, metadata, tunnel); + client.sendEnvelope(metricsEnvelope); + } + function createMetricEnvelope(metricBucketItems, dsn, metadata, tunnel) { + let headers = { + sent_at: (/* @__PURE__ */ new Date()).toISOString() + }; + metadata && metadata.sdk && (headers.sdk = { + name: metadata.sdk.name, + version: metadata.sdk.version + }), tunnel && dsn && (headers.dsn = utils.dsnToString(dsn)); + let item = createMetricEnvelopeItem(metricBucketItems); + return utils.createEnvelope(headers, [item]); + } + function createMetricEnvelopeItem(metricBucketItems) { + let payload = utils$1.serializeMetricBuckets(metricBucketItems); + return [{ + type: "statsd", + length: payload.length + }, payload]; + } + exports.captureAggregateMetrics = captureAggregateMetrics; + exports.createMetricEnvelope = createMetricEnvelope; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/instance.js +var require_instance = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/instance.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var constants = require_constants2(), utils = require_utils2(), CounterMetric = class { + constructor(_value) { + this._value = _value; + } + /** @inheritDoc */ + get weight() { + return 1; + } + /** @inheritdoc */ + add(value) { + this._value += value; + } + /** @inheritdoc */ + toString() { + return `${this._value}`; + } + }, GaugeMetric = class { + constructor(value) { + this._last = value, this._min = value, this._max = value, this._sum = value, this._count = 1; + } + /** @inheritDoc */ + get weight() { + return 5; + } + /** @inheritdoc */ + add(value) { + this._last = value, value < this._min && (this._min = value), value > this._max && (this._max = value), this._sum += value, this._count++; + } + /** @inheritdoc */ + toString() { + return `${this._last}:${this._min}:${this._max}:${this._sum}:${this._count}`; + } + }, DistributionMetric = class { + constructor(first) { + this._value = [first]; + } + /** @inheritDoc */ + get weight() { + return this._value.length; + } + /** @inheritdoc */ + add(value) { + this._value.push(value); + } + /** @inheritdoc */ + toString() { + return this._value.join(":"); + } + }, SetMetric = class { + constructor(first) { + this.first = first, this._value = /* @__PURE__ */ new Set([first]); + } + /** @inheritDoc */ + get weight() { + return this._value.size; + } + /** @inheritdoc */ + add(value) { + this._value.add(value); + } + /** @inheritdoc */ + toString() { + return Array.from(this._value).map((val) => typeof val == "string" ? utils.simpleHash(val) : val).join(":"); + } + }, METRIC_MAP = { + [constants.COUNTER_METRIC_TYPE]: CounterMetric, + [constants.GAUGE_METRIC_TYPE]: GaugeMetric, + [constants.DISTRIBUTION_METRIC_TYPE]: DistributionMetric, + [constants.SET_METRIC_TYPE]: SetMetric + }; + exports.CounterMetric = CounterMetric; + exports.DistributionMetric = DistributionMetric; + exports.GaugeMetric = GaugeMetric; + exports.METRIC_MAP = METRIC_MAP; + exports.SetMetric = SetMetric; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/aggregator.js +var require_aggregator = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/aggregator.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils$1 = require_cjs(), spanUtils = require_spanUtils(), constants = require_constants2(), envelope = require_envelope3(), instance = require_instance(), utils = require_utils2(), MetricsAggregator = class { + // TODO(@anonrig): Use FinalizationRegistry to have a proper way of flushing the buckets + // when the aggregator is garbage collected. + // Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry + // Different metrics have different weights. We use this to limit the number of metrics + // that we store in memory. + // Cast to any so that it can use Node.js timeout + // eslint-disable-next-line @typescript-eslint/no-explicit-any + // SDKs are required to shift the flush interval by random() * rollup_in_seconds. + // That shift is determined once per startup to create jittering. + // An SDK is required to perform force flushing ahead of scheduled time if the memory + // pressure is too high. There is no rule for this other than that SDKs should be tracking + // abstract aggregation complexity (eg: a counter only carries a single float, whereas a + // distribution is a float per emission). + // + // Force flush is used on either shutdown, flush() or when we exceed the max weight. + constructor(_client) { + this._client = _client, this._buckets = /* @__PURE__ */ new Map(), this._bucketsTotalWeight = 0, this._interval = setInterval(() => this._flush(), constants.DEFAULT_FLUSH_INTERVAL), this._interval.unref && this._interval.unref(), this._flushShift = Math.floor(Math.random() * constants.DEFAULT_FLUSH_INTERVAL / 1e3), this._forceFlush = !1; + } + /** + * @inheritDoc + */ + add(metricType, unsanitizedName, value, unsanitizedUnit = "none", unsanitizedTags = {}, maybeFloatTimestamp = utils$1.timestampInSeconds()) { + let timestamp = Math.floor(maybeFloatTimestamp), name = utils.sanitizeMetricKey(unsanitizedName), tags = utils.sanitizeTags(unsanitizedTags), unit = utils.sanitizeUnit(unsanitizedUnit), bucketKey = utils.getBucketKey(metricType, name, unit, tags), bucketItem = this._buckets.get(bucketKey), previousWeight = bucketItem && metricType === constants.SET_METRIC_TYPE ? bucketItem.metric.weight : 0; + bucketItem ? (bucketItem.metric.add(value), bucketItem.timestamp < timestamp && (bucketItem.timestamp = timestamp)) : (bucketItem = { + // @ts-expect-error we don't need to narrow down the type of value here, saves bundle size. + metric: new instance.METRIC_MAP[metricType](value), + timestamp, + metricType, + name, + unit, + tags + }, this._buckets.set(bucketKey, bucketItem)); + let val = typeof value == "string" ? bucketItem.metric.weight - previousWeight : value; + spanUtils.updateMetricSummaryOnActiveSpan(metricType, name, val, unit, unsanitizedTags, bucketKey), this._bucketsTotalWeight += bucketItem.metric.weight, this._bucketsTotalWeight >= constants.MAX_WEIGHT && this.flush(); + } + /** + * Flushes the current metrics to the transport via the transport. + */ + flush() { + this._forceFlush = !0, this._flush(); + } + /** + * Shuts down metrics aggregator and clears all metrics. + */ + close() { + this._forceFlush = !0, clearInterval(this._interval), this._flush(); + } + /** + * Flushes the buckets according to the internal state of the aggregator. + * If it is a force flush, which happens on shutdown, it will flush all buckets. + * Otherwise, it will only flush buckets that are older than the flush interval, + * and according to the flush shift. + * + * This function mutates `_forceFlush` and `_bucketsTotalWeight` properties. + */ + _flush() { + if (this._forceFlush) { + this._forceFlush = !1, this._bucketsTotalWeight = 0, this._captureMetrics(this._buckets), this._buckets.clear(); + return; + } + let cutoffSeconds = Math.floor(utils$1.timestampInSeconds()) - constants.DEFAULT_FLUSH_INTERVAL / 1e3 - this._flushShift, flushedBuckets = /* @__PURE__ */ new Map(); + for (let [key, bucket] of this._buckets) + bucket.timestamp <= cutoffSeconds && (flushedBuckets.set(key, bucket), this._bucketsTotalWeight -= bucket.metric.weight); + for (let [key] of flushedBuckets) + this._buckets.delete(key); + this._captureMetrics(flushedBuckets); + } + /** + * Only captures a subset of the buckets passed to this function. + * @param flushedBuckets + */ + _captureMetrics(flushedBuckets) { + if (flushedBuckets.size > 0) { + let buckets = Array.from(flushedBuckets).map(([, bucketItem]) => bucketItem); + envelope.captureAggregateMetrics(this._client, buckets); + } + } + }; + exports.MetricsAggregator = MetricsAggregator; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/exports-default.js +var require_exports_default = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/exports-default.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var aggregator = require_aggregator(), exports$1 = require_exports2(); + function increment(name, value = 1, data) { + exports$1.metrics.increment(aggregator.MetricsAggregator, name, value, data); + } + function distribution(name, value, data) { + exports$1.metrics.distribution(aggregator.MetricsAggregator, name, value, data); + } + function set(name, value, data) { + exports$1.metrics.set(aggregator.MetricsAggregator, name, value, data); + } + function gauge(name, value, data) { + exports$1.metrics.gauge(aggregator.MetricsAggregator, name, value, data); + } + function timing(name, value, unit = "second", data) { + return exports$1.metrics.timing(aggregator.MetricsAggregator, name, value, unit, data); + } + function getMetricsAggregatorForClient(client) { + return exports$1.metrics.getMetricsAggregatorForClient(client, aggregator.MetricsAggregator); + } + var metricsDefault = { + increment, + distribution, + set, + gauge, + timing, + /** + * @ignore This is for internal use only. + */ + getMetricsAggregatorForClient + }; + exports.metricsDefault = metricsDefault; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/browser-aggregator.js +var require_browser_aggregator = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/browser-aggregator.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils$1 = require_cjs(), spanUtils = require_spanUtils(), constants = require_constants2(), envelope = require_envelope3(), instance = require_instance(), utils = require_utils2(), BrowserMetricsAggregator = class { + // TODO(@anonrig): Use FinalizationRegistry to have a proper way of flushing the buckets + // when the aggregator is garbage collected. + // Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry + constructor(_client) { + this._client = _client, this._buckets = /* @__PURE__ */ new Map(), this._interval = setInterval(() => this.flush(), constants.DEFAULT_BROWSER_FLUSH_INTERVAL); + } + /** + * @inheritDoc + */ + add(metricType, unsanitizedName, value, unsanitizedUnit = "none", unsanitizedTags = {}, maybeFloatTimestamp = utils$1.timestampInSeconds()) { + let timestamp = Math.floor(maybeFloatTimestamp), name = utils.sanitizeMetricKey(unsanitizedName), tags = utils.sanitizeTags(unsanitizedTags), unit = utils.sanitizeUnit(unsanitizedUnit), bucketKey = utils.getBucketKey(metricType, name, unit, tags), bucketItem = this._buckets.get(bucketKey), previousWeight = bucketItem && metricType === constants.SET_METRIC_TYPE ? bucketItem.metric.weight : 0; + bucketItem ? (bucketItem.metric.add(value), bucketItem.timestamp < timestamp && (bucketItem.timestamp = timestamp)) : (bucketItem = { + // @ts-expect-error we don't need to narrow down the type of value here, saves bundle size. + metric: new instance.METRIC_MAP[metricType](value), + timestamp, + metricType, + name, + unit, + tags + }, this._buckets.set(bucketKey, bucketItem)); + let val = typeof value == "string" ? bucketItem.metric.weight - previousWeight : value; + spanUtils.updateMetricSummaryOnActiveSpan(metricType, name, val, unit, unsanitizedTags, bucketKey); + } + /** + * @inheritDoc + */ + flush() { + if (this._buckets.size === 0) + return; + let metricBuckets = Array.from(this._buckets.values()); + envelope.captureAggregateMetrics(this._client, metricBuckets), this._buckets.clear(); + } + /** + * @inheritDoc + */ + close() { + clearInterval(this._interval), this.flush(); + } + }; + exports.BrowserMetricsAggregator = BrowserMetricsAggregator; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/fetch.js +var require_fetch2 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/fetch.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), semanticAttributes = require_semanticAttributes(); + require_errors(); + require_debug_build2(); + var hasTracingEnabled = require_hasTracingEnabled(), spanUtils = require_spanUtils(), sentryNonRecordingSpan = require_sentryNonRecordingSpan(), spanstatus = require_spanstatus(), trace = require_trace(), dynamicSamplingContext = require_dynamicSamplingContext(); + function instrumentFetchRequest(handlerData, shouldCreateSpan, shouldAttachHeaders, spans, spanOrigin = "auto.http.browser") { + if (!handlerData.fetchData) + return; + let shouldCreateSpanResult = hasTracingEnabled.hasTracingEnabled() && shouldCreateSpan(handlerData.fetchData.url); + if (handlerData.endTimestamp && shouldCreateSpanResult) { + let spanId = handlerData.fetchData.__span; + if (!spanId) return; + let span2 = spans[spanId]; + span2 && (endSpan(span2, handlerData), delete spans[spanId]); + return; + } + let scope = currentScopes.getCurrentScope(), client = currentScopes.getClient(), { method, url } = handlerData.fetchData, fullUrl = getFullURL(url), host = fullUrl ? utils.parseUrl(fullUrl).host : void 0, hasParent = !!spanUtils.getActiveSpan(), span = shouldCreateSpanResult && hasParent ? trace.startInactiveSpan({ + name: `${method} ${url}`, + attributes: { + url, + type: "fetch", + "http.method": method, + "http.url": fullUrl, + "server.address": host, + [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: spanOrigin, + [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP]: "http.client" + } + }) : new sentryNonRecordingSpan.SentryNonRecordingSpan(); + if (handlerData.fetchData.__span = span.spanContext().spanId, spans[span.spanContext().spanId] = span, shouldAttachHeaders(handlerData.fetchData.url) && client) { + let request = handlerData.args[0]; + handlerData.args[1] = handlerData.args[1] || {}; + let options = handlerData.args[1]; + options.headers = addTracingHeadersToFetchRequest( + request, + client, + scope, + options, + // If performance is disabled (TWP) or there's no active root span (pageload/navigation/interaction), + // we do not want to use the span as base for the trace headers, + // which means that the headers will be generated from the scope and the sampling decision is deferred + hasTracingEnabled.hasTracingEnabled() && hasParent ? span : void 0 + ); + } + return span; + } + function addTracingHeadersToFetchRequest(request, client, scope, options, span) { + let isolationScope = currentScopes.getIsolationScope(), { traceId, spanId, sampled, dsc } = { + ...isolationScope.getPropagationContext(), + ...scope.getPropagationContext() + }, sentryTraceHeader = span ? spanUtils.spanToTraceHeader(span) : utils.generateSentryTraceHeader(traceId, spanId, sampled), sentryBaggageHeader = utils.dynamicSamplingContextToSentryBaggageHeader( + dsc || (span ? dynamicSamplingContext.getDynamicSamplingContextFromSpan(span) : dynamicSamplingContext.getDynamicSamplingContextFromClient(traceId, client)) + ), headers = options.headers || (typeof Request < "u" && utils.isInstanceOf(request, Request) ? request.headers : void 0); + if (headers) + if (typeof Headers < "u" && utils.isInstanceOf(headers, Headers)) { + let newHeaders = new Headers(headers); + return newHeaders.append("sentry-trace", sentryTraceHeader), sentryBaggageHeader && newHeaders.append(utils.BAGGAGE_HEADER_NAME, sentryBaggageHeader), newHeaders; + } else if (Array.isArray(headers)) { + let newHeaders = [...headers, ["sentry-trace", sentryTraceHeader]]; + return sentryBaggageHeader && newHeaders.push([utils.BAGGAGE_HEADER_NAME, sentryBaggageHeader]), newHeaders; + } else { + let existingBaggageHeader = "baggage" in headers ? headers.baggage : void 0, newBaggageHeaders = []; + return Array.isArray(existingBaggageHeader) ? newBaggageHeaders.push(...existingBaggageHeader) : existingBaggageHeader && newBaggageHeaders.push(existingBaggageHeader), sentryBaggageHeader && newBaggageHeaders.push(sentryBaggageHeader), { + ...headers, + "sentry-trace": sentryTraceHeader, + baggage: newBaggageHeaders.length > 0 ? newBaggageHeaders.join(",") : void 0 + }; + } + else return { "sentry-trace": sentryTraceHeader, baggage: sentryBaggageHeader }; + } + function getFullURL(url) { + try { + return new URL(url).href; + } catch { + return; + } + } + function endSpan(span, handlerData) { + if (handlerData.response) { + spanstatus.setHttpStatus(span, handlerData.response.status); + let contentLength = handlerData.response && handlerData.response.headers && handlerData.response.headers.get("content-length"); + if (contentLength) { + let contentLengthNum = parseInt(contentLength); + contentLengthNum > 0 && span.setAttribute("http.response_content_length", contentLengthNum); + } + } else handlerData.error && span.setStatus({ code: spanstatus.SPAN_STATUS_ERROR, message: "internal_error" }); + span.end(); + } + exports.addTracingHeadersToFetchRequest = addTracingHeadersToFetchRequest; + exports.instrumentFetchRequest = instrumentFetchRequest; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/trpc.js +var require_trpc = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/trpc.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), exports$1 = require_exports(), semanticAttributes = require_semanticAttributes(); + require_errors(); + require_debug_build2(); + var trace = require_trace(), trpcCaptureContext = { mechanism: { handled: !1, data: { function: "trpcMiddleware" } } }; + function trpcMiddleware(options = {}) { + return function(opts) { + let { path, type, next, rawInput } = opts, client = currentScopes.getClient(), clientOptions = client && client.getOptions(), trpcContext = { + procedure_type: type + }; + (options.attachRpcInput !== void 0 ? options.attachRpcInput : clientOptions && clientOptions.sendDefaultPii) && (trpcContext.input = utils.normalize(rawInput)), exports$1.setContext("trpc", trpcContext); + function captureIfError(nextResult) { + typeof nextResult == "object" && nextResult !== null && "ok" in nextResult && !nextResult.ok && "error" in nextResult && exports$1.captureException(nextResult.error, trpcCaptureContext); + } + return trace.startSpanManual( + { + name: `trpc/${path}`, + op: "rpc.server", + attributes: { + [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: "route", + [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.rpc.trpc" + } + }, + (span) => { + let maybePromiseResult; + try { + maybePromiseResult = next(); + } catch (e) { + throw exports$1.captureException(e, trpcCaptureContext), span.end(), e; + } + return utils.isThenable(maybePromiseResult) ? maybePromiseResult.then( + (nextResult) => (captureIfError(nextResult), span.end(), nextResult), + (e) => { + throw exports$1.captureException(e, trpcCaptureContext), span.end(), e; + } + ) : (captureIfError(maybePromiseResult), span.end(), maybePromiseResult); + } + ); + }; + } + exports.trpcMiddleware = trpcMiddleware; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/feedback.js +var require_feedback = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/feedback.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(); + function captureFeedback(feedbackParams, hint = {}, scope = currentScopes.getCurrentScope()) { + let { message, name, email, url, source, associatedEventId } = feedbackParams, feedbackEvent = { + contexts: { + feedback: utils.dropUndefinedKeys({ + contact_email: email, + name, + message, + url, + source, + associated_event_id: associatedEventId + }) + }, + type: "feedback", + level: "info" + }, client = scope && scope.getClient() || currentScopes.getClient(); + return client && client.emit("beforeSendFeedback", feedbackEvent, hint), scope.captureEvent(feedbackEvent, hint); + } + exports.captureFeedback = captureFeedback; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/getCurrentHubShim.js +var require_getCurrentHubShim = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/getCurrentHubShim.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var breadcrumbs = require_breadcrumbs(), currentScopes = require_currentScopes(), exports$1 = require_exports(); + function getCurrentHubShim() { + return { + bindClient(client) { + currentScopes.getCurrentScope().setClient(client); + }, + withScope: currentScopes.withScope, + getClient: () => currentScopes.getClient(), + getScope: currentScopes.getCurrentScope, + getIsolationScope: currentScopes.getIsolationScope, + captureException: (exception, hint) => currentScopes.getCurrentScope().captureException(exception, hint), + captureMessage: (message, level, hint) => currentScopes.getCurrentScope().captureMessage(message, level, hint), + captureEvent: exports$1.captureEvent, + addBreadcrumb: breadcrumbs.addBreadcrumb, + setUser: exports$1.setUser, + setTags: exports$1.setTags, + setTag: exports$1.setTag, + setExtra: exports$1.setExtra, + setExtras: exports$1.setExtras, + setContext: exports$1.setContext, + getIntegration(integration) { + let client = currentScopes.getClient(); + return client && client.getIntegrationByName(integration.id) || null; + }, + startSession: exports$1.startSession, + endSession: exports$1.endSession, + captureSession(end) { + if (end) + return exports$1.endSession(); + _sendSessionUpdate(); + } + }; + } + var getCurrentHub = getCurrentHubShim; + function _sendSessionUpdate() { + let scope = currentScopes.getCurrentScope(), client = currentScopes.getClient(), session = scope.getSession(); + client && session && client.captureSession(session); + } + exports.getCurrentHub = getCurrentHub; + exports.getCurrentHubShim = getCurrentHubShim; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/index.js +var require_cjs2 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/index.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var errors = require_errors(), utils$1 = require_utils(), hubextensions = require_hubextensions(), idleSpan = require_idleSpan(), sentrySpan = require_sentrySpan(), sentryNonRecordingSpan = require_sentryNonRecordingSpan(), spanstatus = require_spanstatus(), trace = require_trace(), dynamicSamplingContext = require_dynamicSamplingContext(), measurement = require_measurement(), sampling = require_sampling(), logSpans = require_logSpans(), semanticAttributes = require_semanticAttributes(), envelope = require_envelope2(), exports$1 = require_exports(), currentScopes = require_currentScopes(), defaultScopes = require_defaultScopes(), index = require_asyncContext(), carrier = require_carrier(), session = require_session(), sessionflusher = require_sessionflusher(), scope = require_scope(), eventProcessors = require_eventProcessors(), api = require_api(), baseclient = require_baseclient(), serverRuntimeClient = require_server_runtime_client(), sdk = require_sdk(), base = require_base(), offline = require_offline(), multiplexed = require_multiplexed(), integration = require_integration(), applyScopeDataToEvent = require_applyScopeDataToEvent(), prepareEvent = require_prepareEvent(), checkin = require_checkin(), hasTracingEnabled = require_hasTracingEnabled(), isSentryRequestUrl = require_isSentryRequestUrl(), handleCallbackErrors = require_handleCallbackErrors(), parameterize = require_parameterize(), spanUtils = require_spanUtils(), parseSampleRate = require_parseSampleRate(), sdkMetadata = require_sdkMetadata(), constants = require_constants(), breadcrumbs = require_breadcrumbs(), functiontostring = require_functiontostring(), inboundfilters = require_inboundfilters(), linkederrors = require_linkederrors(), metadata = require_metadata2(), requestdata = require_requestdata2(), captureconsole = require_captureconsole(), debug = require_debug(), dedupe = require_dedupe(), extraerrordata = require_extraerrordata(), rewriteframes = require_rewriteframes(), sessiontiming = require_sessiontiming(), zoderrors = require_zoderrors(), thirdPartyErrorsFilter = require_third_party_errors_filter(), exports$2 = require_exports2(), exportsDefault = require_exports_default(), browserAggregator = require_browser_aggregator(), metricSummary = require_metric_summary(), fetch2 = require_fetch2(), trpc = require_trpc(), feedback = require_feedback(), getCurrentHubShim = require_getCurrentHubShim(), utils = require_cjs(); + exports.registerSpanErrorInstrumentation = errors.registerSpanErrorInstrumentation; + exports.getCapturedScopesOnSpan = utils$1.getCapturedScopesOnSpan; + exports.setCapturedScopesOnSpan = utils$1.setCapturedScopesOnSpan; + exports.addTracingExtensions = hubextensions.addTracingExtensions; + exports.TRACING_DEFAULTS = idleSpan.TRACING_DEFAULTS; + exports.startIdleSpan = idleSpan.startIdleSpan; + exports.SentrySpan = sentrySpan.SentrySpan; + exports.SentryNonRecordingSpan = sentryNonRecordingSpan.SentryNonRecordingSpan; + exports.SPAN_STATUS_ERROR = spanstatus.SPAN_STATUS_ERROR; + exports.SPAN_STATUS_OK = spanstatus.SPAN_STATUS_OK; + exports.SPAN_STATUS_UNSET = spanstatus.SPAN_STATUS_UNSET; + exports.getSpanStatusFromHttpCode = spanstatus.getSpanStatusFromHttpCode; + exports.setHttpStatus = spanstatus.setHttpStatus; + exports.continueTrace = trace.continueTrace; + exports.startInactiveSpan = trace.startInactiveSpan; + exports.startNewTrace = trace.startNewTrace; + exports.startSpan = trace.startSpan; + exports.startSpanManual = trace.startSpanManual; + exports.suppressTracing = trace.suppressTracing; + exports.withActiveSpan = trace.withActiveSpan; + exports.getDynamicSamplingContextFromClient = dynamicSamplingContext.getDynamicSamplingContextFromClient; + exports.getDynamicSamplingContextFromSpan = dynamicSamplingContext.getDynamicSamplingContextFromSpan; + exports.spanToBaggageHeader = dynamicSamplingContext.spanToBaggageHeader; + exports.setMeasurement = measurement.setMeasurement; + exports.timedEventsToMeasurements = measurement.timedEventsToMeasurements; + exports.sampleSpan = sampling.sampleSpan; + exports.logSpanEnd = logSpans.logSpanEnd; + exports.logSpanStart = logSpans.logSpanStart; + exports.SEMANTIC_ATTRIBUTE_CACHE_HIT = semanticAttributes.SEMANTIC_ATTRIBUTE_CACHE_HIT; + exports.SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE = semanticAttributes.SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE; + exports.SEMANTIC_ATTRIBUTE_CACHE_KEY = semanticAttributes.SEMANTIC_ATTRIBUTE_CACHE_KEY; + exports.SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME = semanticAttributes.SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME; + exports.SEMANTIC_ATTRIBUTE_PROFILE_ID = semanticAttributes.SEMANTIC_ATTRIBUTE_PROFILE_ID; + exports.SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON; + exports.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT; + exports.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE; + exports.SEMANTIC_ATTRIBUTE_SENTRY_OP = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP; + exports.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN; + exports.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE; + exports.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE; + exports.createEventEnvelope = envelope.createEventEnvelope; + exports.createSessionEnvelope = envelope.createSessionEnvelope; + exports.createSpanEnvelope = envelope.createSpanEnvelope; + exports.addEventProcessor = exports$1.addEventProcessor; + exports.captureCheckIn = exports$1.captureCheckIn; + exports.captureEvent = exports$1.captureEvent; + exports.captureException = exports$1.captureException; + exports.captureMessage = exports$1.captureMessage; + exports.captureSession = exports$1.captureSession; + exports.close = exports$1.close; + exports.endSession = exports$1.endSession; + exports.flush = exports$1.flush; + exports.isEnabled = exports$1.isEnabled; + exports.isInitialized = exports$1.isInitialized; + exports.lastEventId = exports$1.lastEventId; + exports.setContext = exports$1.setContext; + exports.setExtra = exports$1.setExtra; + exports.setExtras = exports$1.setExtras; + exports.setTag = exports$1.setTag; + exports.setTags = exports$1.setTags; + exports.setUser = exports$1.setUser; + exports.startSession = exports$1.startSession; + exports.withMonitor = exports$1.withMonitor; + exports.getClient = currentScopes.getClient; + exports.getCurrentScope = currentScopes.getCurrentScope; + exports.getGlobalScope = currentScopes.getGlobalScope; + exports.getIsolationScope = currentScopes.getIsolationScope; + exports.withIsolationScope = currentScopes.withIsolationScope; + exports.withScope = currentScopes.withScope; + exports.getDefaultCurrentScope = defaultScopes.getDefaultCurrentScope; + exports.getDefaultIsolationScope = defaultScopes.getDefaultIsolationScope; + exports.setAsyncContextStrategy = index.setAsyncContextStrategy; + exports.getMainCarrier = carrier.getMainCarrier; + exports.closeSession = session.closeSession; + exports.makeSession = session.makeSession; + exports.updateSession = session.updateSession; + exports.SessionFlusher = sessionflusher.SessionFlusher; + exports.Scope = scope.Scope; + exports.notifyEventProcessors = eventProcessors.notifyEventProcessors; + exports.getEnvelopeEndpointWithUrlEncodedAuth = api.getEnvelopeEndpointWithUrlEncodedAuth; + exports.getReportDialogEndpoint = api.getReportDialogEndpoint; + exports.BaseClient = baseclient.BaseClient; + exports.ServerRuntimeClient = serverRuntimeClient.ServerRuntimeClient; + exports.initAndBind = sdk.initAndBind; + exports.setCurrentClient = sdk.setCurrentClient; + exports.createTransport = base.createTransport; + exports.makeOfflineTransport = offline.makeOfflineTransport; + exports.makeMultiplexedTransport = multiplexed.makeMultiplexedTransport; + exports.addIntegration = integration.addIntegration; + exports.defineIntegration = integration.defineIntegration; + exports.getIntegrationsToSetup = integration.getIntegrationsToSetup; + exports.applyScopeDataToEvent = applyScopeDataToEvent.applyScopeDataToEvent; + exports.mergeScopeData = applyScopeDataToEvent.mergeScopeData; + exports.prepareEvent = prepareEvent.prepareEvent; + exports.createCheckInEnvelope = checkin.createCheckInEnvelope; + exports.hasTracingEnabled = hasTracingEnabled.hasTracingEnabled; + exports.isSentryRequestUrl = isSentryRequestUrl.isSentryRequestUrl; + exports.handleCallbackErrors = handleCallbackErrors.handleCallbackErrors; + exports.parameterize = parameterize.parameterize; + exports.addChildSpanToSpan = spanUtils.addChildSpanToSpan; + exports.getActiveSpan = spanUtils.getActiveSpan; + exports.getRootSpan = spanUtils.getRootSpan; + exports.getSpanDescendants = spanUtils.getSpanDescendants; + exports.getStatusMessage = spanUtils.getStatusMessage; + exports.spanIsSampled = spanUtils.spanIsSampled; + exports.spanToJSON = spanUtils.spanToJSON; + exports.spanToTraceContext = spanUtils.spanToTraceContext; + exports.spanToTraceHeader = spanUtils.spanToTraceHeader; + exports.parseSampleRate = parseSampleRate.parseSampleRate; + exports.applySdkMetadata = sdkMetadata.applySdkMetadata; + exports.DEFAULT_ENVIRONMENT = constants.DEFAULT_ENVIRONMENT; + exports.addBreadcrumb = breadcrumbs.addBreadcrumb; + exports.functionToStringIntegration = functiontostring.functionToStringIntegration; + exports.inboundFiltersIntegration = inboundfilters.inboundFiltersIntegration; + exports.linkedErrorsIntegration = linkederrors.linkedErrorsIntegration; + exports.moduleMetadataIntegration = metadata.moduleMetadataIntegration; + exports.requestDataIntegration = requestdata.requestDataIntegration; + exports.captureConsoleIntegration = captureconsole.captureConsoleIntegration; + exports.debugIntegration = debug.debugIntegration; + exports.dedupeIntegration = dedupe.dedupeIntegration; + exports.extraErrorDataIntegration = extraerrordata.extraErrorDataIntegration; + exports.rewriteFramesIntegration = rewriteframes.rewriteFramesIntegration; + exports.sessionTimingIntegration = sessiontiming.sessionTimingIntegration; + exports.zodErrorsIntegration = zoderrors.zodErrorsIntegration; + exports.thirdPartyErrorFilterIntegration = thirdPartyErrorsFilter.thirdPartyErrorFilterIntegration; + exports.metrics = exports$2.metrics; + exports.metricsDefault = exportsDefault.metricsDefault; + exports.BrowserMetricsAggregator = browserAggregator.BrowserMetricsAggregator; + exports.getMetricSummaryJsonForSpan = metricSummary.getMetricSummaryJsonForSpan; + exports.addTracingHeadersToFetchRequest = fetch2.addTracingHeadersToFetchRequest; + exports.instrumentFetchRequest = fetch2.instrumentFetchRequest; + exports.trpcMiddleware = trpc.trpcMiddleware; + exports.captureFeedback = feedback.captureFeedback; + exports.getCurrentHub = getCurrentHubShim.getCurrentHub; + exports.getCurrentHubShim = getCurrentHubShim.getCurrentHubShim; + exports.SDK_VERSION = utils.SDK_VERSION; + } +}); + +// ../../node_modules/.pnpm/toucan-js@4.0.0_patch_hash=qxsfpdzvzbhq2ecirbu5xq4vlq/node_modules/toucan-js/dist/index.cjs.js +var require_index_cjs = __commonJS({ + "../../node_modules/.pnpm/toucan-js@4.0.0_patch_hash=qxsfpdzvzbhq2ecirbu5xq4vlq/node_modules/toucan-js/dist/index.cjs.js"(exports) { + "use strict"; + var utils = require_cjs(), core = require_cjs2(); + function isObject(value) { + return typeof value == "object" && value !== null; + } + function isMechanism(value) { + return isObject(value) && "handled" in value && typeof value.handled == "boolean" && "type" in value && typeof value.type == "string"; + } + function containsMechanism(value) { + return isObject(value) && "mechanism" in value && isMechanism(value.mechanism); + } + function getSentryRelease() { + if (utils.GLOBAL_OBJ.SENTRY_RELEASE && utils.GLOBAL_OBJ.SENTRY_RELEASE.id) + return utils.GLOBAL_OBJ.SENTRY_RELEASE.id; + } + function setOnOptional(target, entry) { + return target !== void 0 ? (target[entry[0]] = entry[1], target) : { [entry[0]]: entry[1] }; + } + function parseStackFrames(stackParser, error) { + return stackParser(error.stack || "", 1); + } + function extractMessage(ex) { + let message = ex && ex.message; + return message ? message.error && typeof message.error.message == "string" ? message.error.message : message : "No error message"; + } + function exceptionFromError(stackParser, error) { + let exception = { + type: error.name || error.constructor.name, + value: extractMessage(error) + }, frames = parseStackFrames(stackParser, error); + return frames.length && (exception.stacktrace = { frames }), exception.type === void 0 && exception.value === "" && (exception.value = "Unrecoverable error caught"), exception; + } + function eventFromUnknownInput(sdk, stackParser, exception, hint) { + let ex, mechanism = (hint && hint.data && containsMechanism(hint.data) ? hint.data.mechanism : void 0) ?? { + handled: !0, + type: "generic" + }; + if (utils.isError(exception)) + ex = exception; + else { + if (utils.isPlainObject(exception)) { + let message = `Non-Error exception captured with keys: ${utils.extractExceptionKeysForMessage(exception)}`, client = sdk?.getClient(), normalizeDepth = client && client.getOptions().normalizeDepth; + sdk?.setExtra("__serialized__", utils.normalizeToSize(exception, normalizeDepth)), ex = hint && hint.syntheticException || new Error(message), ex.message = message; + } else + ex = hint && hint.syntheticException || new Error(exception), ex.message = exception; + mechanism.synthetic = !0; + } + let event = { + exception: { + values: [exceptionFromError(stackParser, ex)] + } + }; + return utils.addExceptionTypeValue(event, void 0, void 0), utils.addExceptionMechanism(event, mechanism), { + ...event, + event_id: hint && hint.event_id + }; + } + function eventFromMessage(stackParser, message, level = "info", hint, attachStacktrace) { + let event = { + event_id: hint && hint.event_id, + level, + message + }; + if (attachStacktrace && hint && hint.syntheticException) { + let frames = parseStackFrames(stackParser, hint.syntheticException); + frames.length && (event.exception = { + values: [ + { + value: message, + stacktrace: { frames } + } + ] + }); + } + return event; + } + var DEFAULT_LIMIT = 5, linkedErrorsIntegration = core.defineIntegration((options = { limit: DEFAULT_LIMIT }) => ({ + name: "LinkedErrors", + processEvent: (event, hint, client) => handler(client.getOptions().stackParser, options.limit, event, hint) + })); + function handler(parser, limit, event, hint) { + if (!event.exception || !event.exception.values || !hint || !utils.isInstanceOf(hint.originalException, Error)) + return event; + let linkedErrors = walkErrorTree(parser, limit, hint.originalException); + return event.exception.values = [...linkedErrors, ...event.exception.values], event; + } + function walkErrorTree(parser, limit, error, stack = []) { + if (!utils.isInstanceOf(error.cause, Error) || stack.length + 1 >= limit) + return stack; + let exception = exceptionFromError(parser, error.cause); + return walkErrorTree(parser, limit, error.cause, [ + exception, + ...stack + ]); + } + var defaultRequestDataOptions = { + allowedHeaders: ["CF-RAY", "CF-Worker"] + }, requestDataIntegration = core.defineIntegration((userOptions = {}) => { + let options = { ...defaultRequestDataOptions, ...userOptions }; + return { + name: "RequestData", + preprocessEvent: (event) => { + let { sdkProcessingMetadata } = event; + return sdkProcessingMetadata && ("request" in sdkProcessingMetadata && sdkProcessingMetadata.request instanceof Request && (event.request = toEventRequest(sdkProcessingMetadata.request, options), event.user = toEventUser(event.user ?? {}, sdkProcessingMetadata.request, options)), "requestData" in sdkProcessingMetadata && (event.request ? event.request.data = sdkProcessingMetadata.requestData : event.request = { + data: sdkProcessingMetadata.requestData + })), event; + } + }; + }); + function toEventUser(user, request, options) { + let ip_address = request.headers.get("CF-Connecting-IP"), { allowedIps } = options, newUser = { ...user }; + return !("ip_address" in user) && // If ip_address is already set from explicitly called setUser, we don't want to overwrite it + ip_address && allowedIps !== void 0 && testAllowlist(ip_address, allowedIps) && (newUser.ip_address = ip_address), Object.keys(newUser).length > 0 ? newUser : void 0; + } + function toEventRequest(request, options) { + let cookieString = request.headers.get("cookie"), cookies; + if (cookieString) + try { + cookies = parseCookie(cookieString); + } catch { + } + let headers = {}; + for (let [k, v] of request.headers.entries()) + k !== "cookie" && (headers[k] = v); + let eventRequest = { + method: request.method, + cookies, + headers + }; + try { + let url = new URL(request.url); + eventRequest.url = `${url.protocol}//${url.hostname}${url.pathname}`, eventRequest.query_string = url.search; + } catch { + let qi = request.url.indexOf("?"); + qi < 0 ? eventRequest.url = request.url : (eventRequest.url = request.url.substr(0, qi), eventRequest.query_string = request.url.substr(qi + 1)); + } + let { allowedHeaders, allowedCookies, allowedSearchParams } = options; + if (allowedHeaders !== void 0 && eventRequest.headers ? (eventRequest.headers = applyAllowlistToObject(eventRequest.headers, allowedHeaders), Object.keys(eventRequest.headers).length === 0 && delete eventRequest.headers) : delete eventRequest.headers, allowedCookies !== void 0 && eventRequest.cookies ? (eventRequest.cookies = applyAllowlistToObject(eventRequest.cookies, allowedCookies), Object.keys(eventRequest.cookies).length === 0 && delete eventRequest.cookies) : delete eventRequest.cookies, allowedSearchParams !== void 0) { + let params = Object.fromEntries(new URLSearchParams(eventRequest.query_string)), allowedParams = new URLSearchParams(); + Object.keys(applyAllowlistToObject(params, allowedSearchParams)).forEach((allowedKey) => { + allowedParams.set(allowedKey, params[allowedKey]); + }), eventRequest.query_string = allowedParams.toString(); + } else + delete eventRequest.query_string; + return eventRequest; + } + function testAllowlist(target, allowlist) { + return typeof allowlist == "boolean" ? allowlist : allowlist instanceof RegExp ? allowlist.test(target) : Array.isArray(allowlist) ? allowlist.map((item) => item.toLowerCase()).includes(target) : !1; + } + function applyAllowlistToObject(target, allowlist) { + let predicate = () => !1; + if (typeof allowlist == "boolean") + return allowlist ? target : {}; + if (allowlist instanceof RegExp) + predicate = (item) => allowlist.test(item); + else if (Array.isArray(allowlist)) { + let allowlistLowercased = allowlist.map((item) => item.toLowerCase()); + predicate = (item) => allowlistLowercased.includes(item.toLowerCase()); + } else + return {}; + return Object.keys(target).filter(predicate).reduce((allowed, key) => (allowed[key] = target[key], allowed), {}); + } + function parseCookie(cookieString) { + if (typeof cookieString != "string") + return {}; + try { + return cookieString.split(";").map((part) => part.split("=")).reduce((acc, [cookieKey, cookieValue]) => (acc[decodeURIComponent(cookieKey.trim())] = decodeURIComponent(cookieValue.trim()), acc), {}); + } catch { + return {}; + } + } + function setupIntegrations(integrations, sdk) { + let integrationIndex = {}; + return integrations.forEach((integration) => { + integrationIndex[integration.name] = integration, typeof integration.setupOnce == "function" && integration.setupOnce(); + let client = sdk.getClient(); + if (client) { + if (typeof integration.setup == "function" && integration.setup(client), typeof integration.preprocessEvent == "function") { + let callback = integration.preprocessEvent.bind(integration); + client.on("preprocessEvent", (event, hint) => callback(event, hint, client)); + } + if (typeof integration.processEvent == "function") { + let callback = integration.processEvent.bind(integration), processor = Object.assign((event, hint) => callback(event, hint, client), { + id: integration.name + }); + client.addEventProcessor(processor); + } + } + }), integrationIndex; + } + var ToucanClient = class extends core.ServerRuntimeClient { + /** + * Some functions need to access the scope (Toucan instance) this client is bound to, + * but calling 'getCurrentHub()' is unsafe because it uses globals. + * So we store a reference to the Hub after binding to it and provide it to methods that need it. + */ + #sdk = null; + #integrationsInitialized = !1; + /** + * Creates a new Toucan SDK instance. + * @param options Configuration options for this SDK. + */ + constructor(options) { + options._metadata = options._metadata || {}, options._metadata.sdk = options._metadata.sdk || { + name: "toucan-js", + packages: [ + { + name: "npm:toucan-js", + version: "4.0.0" + } + ], + version: "4.0.0" + }, super(options); + } + /** + * By default, integrations are stored in a global. We want to store them in a local instance because they may have contextual data, such as event request. + */ + setupIntegrations() { + this._isEnabled() && !this.#integrationsInitialized && this.#sdk && (this._integrations = setupIntegrations(this._options.integrations, this.#sdk), this.#integrationsInitialized = !0); + } + eventFromException(exception, hint) { + return utils.resolvedSyncPromise(eventFromUnknownInput(this.#sdk, this._options.stackParser, exception, hint)); + } + eventFromMessage(message, level = "info", hint) { + return utils.resolvedSyncPromise(eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace)); + } + _prepareEvent(event, hint, scope) { + return event.platform = event.platform || "javascript", this.getOptions().request && (event.sdkProcessingMetadata = setOnOptional(event.sdkProcessingMetadata, [ + "request", + this.getOptions().request + ])), this.getOptions().requestData && (event.sdkProcessingMetadata = setOnOptional(event.sdkProcessingMetadata, [ + "requestData", + this.getOptions().requestData + ])), super._prepareEvent(event, hint, scope); + } + getSdk() { + return this.#sdk; + } + setSdk(sdk) { + this.#sdk = sdk; + } + /** + * Sets the request body context on all future events. + * + * @param body Request body. + * @example + * const body = await request.text(); + * toucan.setRequestBody(body); + */ + setRequestBody(body) { + this.getOptions().requestData = body; + } + /** + * Enable/disable the SDK. + * + * @param enabled + */ + setEnabled(enabled) { + this.getOptions().enabled = enabled; + } + }; + function workersStackLineParser(getModule2) { + let [arg1, arg2] = utils.nodeStackLineParser(getModule2); + return [arg1, (line) => { + let result = arg2(line); + if (result) { + let filename = result.filename; + result.abs_path = filename !== void 0 && !filename.startsWith("/") ? `/${filename}` : filename, result.in_app = filename !== void 0; + } + return result; + }]; + } + function getModule(filename) { + if (filename) + return utils.basename(filename, ".js"); + } + var defaultStackParser = utils.createStackParser(workersStackLineParser(getModule)); + function makeFetchTransport(options) { + function makeRequest({ body }) { + try { + let request = (options.fetcher ?? fetch)(options.url, { + method: "POST", + headers: options.headers, + body + }).then((response) => ({ + statusCode: response.status, + headers: { + "retry-after": response.headers.get("Retry-After"), + "x-sentry-rate-limits": response.headers.get("X-Sentry-Rate-Limits") + } + })); + return options.context && options.context.waitUntil(request), request; + } catch (e) { + return utils.rejectedSyncPromise(e); + } + } + return core.createTransport(options, makeRequest); + } + var Toucan2 = class _Toucan extends core.Scope { + #options; + constructor(options) { + if (super(), options.defaultIntegrations = options.defaultIntegrations === !1 ? [] : [ + ...Array.isArray(options.defaultIntegrations) ? options.defaultIntegrations : [ + requestDataIntegration(options.requestDataOptions), + linkedErrorsIntegration() + ] + ], options.release === void 0) { + let detectedRelease = getSentryRelease(); + detectedRelease !== void 0 && (options.release = detectedRelease); + } + this.#options = options, this.attachNewClient(); + } + /** + * Creates new ToucanClient and links it to this instance. + */ + attachNewClient() { + let client = new ToucanClient({ + ...this.#options, + transport: makeFetchTransport, + integrations: core.getIntegrationsToSetup(this.#options), + stackParser: utils.stackParserFromStackParserOptions(this.#options.stackParser || defaultStackParser), + transportOptions: { + ...this.#options.transportOptions, + context: this.#options.context + } + }); + this.setClient(client), client.setSdk(this), client.setupIntegrations(); + } + /** + * Sets the request body context on all future events. + * + * @param body Request body. + * @example + * const body = await request.text(); + * toucan.setRequestBody(body); + */ + setRequestBody(body) { + this.getClient()?.setRequestBody(body); + } + /** + * Enable/disable the SDK. + * + * @param enabled + */ + setEnabled(enabled) { + this.getClient()?.setEnabled(enabled); + } + /** + * Create a cron monitor check in and send it to Sentry. + * + * @param checkIn An object that describes a check in. + * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want + * to create a monitor automatically when sending a check in. + */ + captureCheckIn(checkIn, monitorConfig, scope) { + return checkIn.status === "in_progress" && this.setContext("monitor", { slug: checkIn.monitorSlug }), this.getClient().captureCheckIn(checkIn, monitorConfig, scope); + } + /** + * Add a breadcrumb to the current scope. + */ + addBreadcrumb(breadcrumb, maxBreadcrumbs = 100) { + let max = this.getClient().getOptions().maxBreadcrumbs || maxBreadcrumbs; + return super.addBreadcrumb(breadcrumb, max); + } + /** + * Clone all data from this instance into a new Toucan instance. + * + * @override + * @returns New Toucan instance. + */ + clone() { + let toucan = new _Toucan({ ...this.#options }); + return toucan._breadcrumbs = [...this._breadcrumbs], toucan._tags = { ...this._tags }, toucan._extra = { ...this._extra }, toucan._contexts = { ...this._contexts }, toucan._user = this._user, toucan._level = this._level, toucan._session = this._session, toucan._transactionName = this._transactionName, toucan._fingerprint = this._fingerprint, toucan._eventProcessors = [...this._eventProcessors], toucan._requestSession = this._requestSession, toucan._attachments = [...this._attachments], toucan._sdkProcessingMetadata = { ...this._sdkProcessingMetadata }, toucan._propagationContext = { ...this._propagationContext }, toucan._lastEventId = this._lastEventId, toucan; + } + /** + * Creates a new scope with and executes the given operation within. + * The scope is automatically removed once the operation + * finishes or throws. + */ + withScope(callback) { + let toucan = this.clone(); + return callback(toucan); + } + }; + Object.defineProperty(exports, "dedupeIntegration", { + enumerable: !0, + get: function() { + return core.dedupeIntegration; + } + }); + Object.defineProperty(exports, "extraErrorDataIntegration", { + enumerable: !0, + get: function() { + return core.extraErrorDataIntegration; + } + }); + Object.defineProperty(exports, "rewriteFramesIntegration", { + enumerable: !0, + get: function() { + return core.rewriteFramesIntegration; + } + }); + Object.defineProperty(exports, "sessionTimingIntegration", { + enumerable: !0, + get: function() { + return core.sessionTimingIntegration; + } + }); + exports.Toucan = Toucan2; + exports.linkedErrorsIntegration = linkedErrorsIntegration; + exports.requestDataIntegration = requestDataIntegration; + } +}); + +// ../workers-shared/asset-worker/src/index.ts +import { WorkerEntrypoint } from "cloudflare:workers"; + +// ../workers-shared/utils/performance.ts +var PerformanceTimer = class { + constructor(performanceTimer) { + this.performanceTimer = performanceTimer; + } + now() { + return this.performanceTimer ? this.performanceTimer.timeOrigin + this.performanceTimer.now() : Date.now(); + } +}; + +// ../workers-shared/utils/sentry.ts +var import_toucan_js = __toESM(require_index_cjs()); +function setupSentry(request, context, dsn, clientId, clientSecret, coloMetadata, versionMetadata, accountId, scriptId) { + if (!(dsn && clientId && clientSecret)) + return; + let sentry = new import_toucan_js.Toucan({ + dsn, + request, + context, + sampleRate: 1, + release: versionMetadata?.tag, + integrations: [ + (0, import_toucan_js.rewriteFramesIntegration)({ + iteratee(frame) { + return frame.filename = "/index.js", frame; + } + }) + ], + requestDataOptions: { + allowedHeaders: [ + "user-agent", + "cf-challenge", + "accept-encoding", + "accept-language", + "cf-ray", + "content-length", + "content-type", + "host" + ], + allowedSearchParams: /(.*)/ + }, + transportOptions: { + headers: { + "CF-Access-Client-ID": clientId, + "CF-Access-Client-Secret": clientSecret + } + } + }); + return coloMetadata && (sentry.setTag("colo", coloMetadata.coloId), sentry.setTag("metal", coloMetadata.metalId)), accountId && scriptId && (sentry.setTag("accountId", accountId), sentry.setTag("scriptId", scriptId)), sentry.setUser({ id: accountId?.toString() }), sentry; +} + +// ../workers-shared/utils/tracing.ts +function mockJaegerBindingSpan() { + return { + addLogs: () => { + }, + setTags: () => { + }, + end: () => { + }, + isRecording: !0 + }; +} +function mockJaegerBinding() { + return { + enterSpan: (_, span, ...args) => span(mockJaegerBindingSpan(), ...args), + getSpanContext: () => ({ + traceId: "test-trace", + spanId: "test-span", + parentSpanId: "test-parent-span", + traceFlags: 0 + }), + runWithSpanContext: (_, callback, ...args) => callback(...args), + traceId: "test-trace", + spanId: "test-span", + parentSpanId: "test-parent-span", + cfTraceIdHeader: "test-trace:test-span:0" + }; +} + +// ../workers-shared/asset-worker/src/analytics.ts +var COMPATIBILITY_FLAG_MASKS = { + assets_navigation_prefers_asset_serving: 1 + // next_one: 1 << 1 + // one_after_that: 1 << 2 + // etc: 1 << 3 +}, Analytics = class { + constructor(readyAnalytics) { + this.data = {}; + this.readyAnalytics = readyAnalytics; + } + setData(newData) { + this.data = { ...this.data, ...newData }; + } + getData(key) { + return this.data[key]; + } + write() { + if (!this.readyAnalytics) + return; + let compatibilityFlagsBitmask = 0; + for (let compatibilityFlag of this.data.compatibilityFlags || []) { + let mask = COMPATIBILITY_FLAG_MASKS[compatibilityFlag]; + mask && (compatibilityFlagsBitmask += mask); + } + this.readyAnalytics.logEvent({ + version: 1, + accountId: this.data.accountId, + indexId: this.data.scriptId?.toString(), + doubles: [ + this.data.requestTime ?? -1, + // double1 + this.data.coloId ?? -1, + // double2 + this.data.metalId ?? -1, + // double3 + this.data.coloTier ?? -1, + // double4 + this.data.status ?? -1, + // double5 + compatibilityFlagsBitmask + // double6 + ], + blobs: [ + this.data.hostname?.substring(0, 256), + // blob1 - trim to 256 bytes + this.data.userAgent?.substring(0, 256), + // blob2 - trim to 256 bytes + this.data.htmlHandling, + // blob3 + this.data.notFoundHandling, + // blob4 + this.data.error?.substring(0, 256), + // blob5 - trim to 256 bytes + this.data.version, + // blob6 + this.data.coloRegion, + // blob7 + this.data.cacheStatus + // blob8 + ] + }); + } +}; + +// ../workers-shared/asset-worker/src/assets-manifest.ts +var AssetsManifest = class { + constructor(data) { + this.data = data; + } + async get(pathname) { + let pathHash = await hashPath(pathname), entry = binarySearch( + new Uint8Array(this.data, 20), + pathHash + ); + return entry ? contentHashToKey(entry) : null; + } +}, hashPath = async (path) => { + let data = new TextEncoder().encode(path), hashBuffer = await crypto.subtle.digest( + "SHA-256", + data.buffer + ); + return new Uint8Array(hashBuffer, 0, 16); +}, binarySearch = (arr, searchValue) => { + if (arr.byteLength === 0) + return !1; + let offset = arr.byteOffset + (arr.byteLength / 40 >> 1) * 40, current = new Uint8Array(arr.buffer, offset, 16); + if (current.byteLength !== searchValue.byteLength) + throw new TypeError( + "Search value and current value are of different lengths" + ); + let cmp = compare(searchValue, current); + if (cmp < 0) { + let nextOffset = arr.byteOffset, nextLength = offset - arr.byteOffset; + return binarySearch( + new Uint8Array(arr.buffer, nextOffset, nextLength), + searchValue + ); + } else if (cmp > 0) { + let nextOffset = offset + 40, nextLength = arr.buffer.byteLength - offset - 40; + return binarySearch( + new Uint8Array(arr.buffer, nextOffset, nextLength), + searchValue + ); + } else + return new Uint8Array(arr.buffer, offset, 40); +}, compare = (a, b) => { + if (a.byteLength < b.byteLength) + return -1; + if (a.byteLength > b.byteLength) + return 1; + for (let [i, v] of a.entries()) { + if (v < b[i]) + return -1; + if (v > b[i]) + return 1; + } + return 0; +}, contentHashToKey = (buffer) => [...buffer.slice( + 16, + 32 +)].map((b) => b.toString(16).padStart(2, "0")).join(""); + +// ../workers-shared/asset-worker/src/compatibility-flags.ts +var SEC_FETCH_MODE_NAVIGATE_HEADER_PREFERS_ASSET_SERVING = { + enable: "assets_navigation_prefers_asset_serving", + disable: "assets_navigation_has_no_effect", + onByDefaultAfter: "2025-04-01" +}, COMPATIBILITY_FLAGS = [ + SEC_FETCH_MODE_NAVIGATE_HEADER_PREFERS_ASSET_SERVING +], resolveCompatibilityOptions = (configuration) => { + let compatibilityDate = configuration?.compatibility_date ?? "2021-11-02", resolvedCompatibilityFlags = configuration?.compatibility_flags ?? []; + for (let compatibilityFlag of COMPATIBILITY_FLAGS) + compatibilityFlag.onByDefaultAfter && compatibilityDate >= compatibilityFlag.onByDefaultAfter && !resolvedCompatibilityFlags.find( + (flag) => flag === compatibilityFlag.disable + ) && !resolvedCompatibilityFlags.find( + (flag) => flag === compatibilityFlag.enable + ) && resolvedCompatibilityFlags.push(compatibilityFlag.enable); + return { + compatibilityDate, + compatibilityFlags: resolvedCompatibilityFlags + }; +}, flagIsEnabled = (configuration, compatibilityFlag) => !!configuration.compatibility_flags.find( + (flag) => flag === compatibilityFlag.enable +); + +// ../workers-shared/asset-worker/src/configuration.ts +var normalizeConfiguration = (configuration) => { + let compatibilityOptions = resolveCompatibilityOptions(configuration); + return { + compatibility_date: compatibilityOptions.compatibilityDate, + compatibility_flags: compatibilityOptions.compatibilityFlags, + html_handling: configuration?.html_handling ?? "auto-trailing-slash", + not_found_handling: configuration?.not_found_handling ?? "none", + redirects: configuration?.redirects ?? { + version: 1, + staticRules: {}, + rules: {} + }, + headers: configuration?.headers ?? { + version: 2, + rules: {} + }, + account_id: configuration?.account_id ?? -1, + script_id: configuration?.script_id ?? -1, + debug: configuration?.debug ?? !1 + }; +}; + +// ../workers-shared/asset-worker/src/experiment-analytics.ts +var ExperimentAnalytics = class { + constructor(readyAnalytics) { + this.data = {}; + this.readyAnalytics = readyAnalytics; + } + setData(newData) { + this.data = { ...this.data, ...newData }; + } + getData(key) { + return this.data[key]; + } + write() { + this.readyAnalytics && this.readyAnalytics.logEvent({ + version: 1, + accountId: this.data.accountId, + indexId: this.data.experimentName, + doubles: [ + this.data.manifestReadTime ?? -1 + // double1 + ], + blobs: [] + }); + } +}; + +// ../workers-shared/utils/responses.ts +var OkResponse = class _OkResponse extends Response { + static { + this.status = 200; + } + constructor(body, init) { + super(body, { + ...init, + status: _OkResponse.status + }); + } +}, NotFoundResponse = class _NotFoundResponse extends Response { + static { + this.status = 404; + } + constructor(...[body, init]) { + super(body, { + ...init, + status: _NotFoundResponse.status, + statusText: "Not Found" + }); + } +}, NoIntentResponse = class extends NotFoundResponse { + constructor() { + super(); + } +}, MethodNotAllowedResponse = class _MethodNotAllowedResponse extends Response { + static { + this.status = 405; + } + constructor(...[body, init]) { + super(body, { + ...init, + status: _MethodNotAllowedResponse.status, + statusText: "Method Not Allowed" + }); + } +}, InternalServerErrorResponse = class _InternalServerErrorResponse extends Response { + static { + this.status = 500; + } + constructor(err, init) { + super(null, { + ...init, + status: _InternalServerErrorResponse.status + }); + } +}, NotModifiedResponse = class _NotModifiedResponse extends Response { + static { + this.status = 304; + } + constructor(...[_body, init]) { + super(null, { + ...init, + status: _NotModifiedResponse.status, + statusText: "Not Modified" + }); + } +}, MovedPermanentlyResponse = class _MovedPermanentlyResponse extends Response { + static { + this.status = 301; + } + constructor(location, init) { + super(null, { + ...init, + status: _MovedPermanentlyResponse.status, + statusText: "Moved Permanently", + headers: { + ...init?.headers, + Location: location + } + }); + } +}, FoundResponse = class _FoundResponse extends Response { + static { + this.status = 302; + } + constructor(location, init) { + super(null, { + ...init, + status: _FoundResponse.status, + statusText: "Found", + headers: { + ...init?.headers, + Location: location + } + }); + } +}, SeeOtherResponse = class _SeeOtherResponse extends Response { + static { + this.status = 303; + } + constructor(location, init) { + super(null, { + ...init, + status: _SeeOtherResponse.status, + statusText: "See Other", + headers: { + ...init?.headers, + Location: location + } + }); + } +}, TemporaryRedirectResponse = class _TemporaryRedirectResponse extends Response { + static { + this.status = 307; + } + constructor(location, init) { + super(null, { + ...init, + status: _TemporaryRedirectResponse.status, + statusText: "Temporary Redirect", + headers: { + ...init?.headers, + Location: location + } + }); + } +}, PermanentRedirectResponse = class _PermanentRedirectResponse extends Response { + static { + this.status = 308; + } + constructor(location, init) { + super(null, { + ...init, + status: _PermanentRedirectResponse.status, + statusText: "Permanent Redirect", + headers: { + ...init?.headers, + Location: location + } + }); + } +}; + +// ../workers-shared/asset-worker/src/constants.ts +var CACHE_CONTROL_BROWSER = "public, max-age=0, must-revalidate"; + +// ../workers-shared/asset-worker/src/utils/rules-engine.ts +var ESCAPE_REGEX_CHARACTERS = /[-/\\^$*+?.()|[\]{}]/g, escapeRegex = (str) => str.replace(ESCAPE_REGEX_CHARACTERS, "\\$&"), HOST_PLACEHOLDER_REGEX = /(?<=^https:\\\/\\\/[^/]*?):([A-Za-z]\w*)(?=\\)/g, PLACEHOLDER_REGEX = /:([A-Za-z]\w*)/g, replacer = (str, replacements) => { + for (let [replacement, value] of Object.entries(replacements)) + str = str.replaceAll(`:${replacement}`, value); + return str; +}, generateRulesMatcher = (rules, replacerFn = (match) => match) => { + if (!rules) + return () => []; + let compiledRules = Object.entries(rules).map(([rule, match]) => { + let crossHost = rule.startsWith("https://"); + rule = rule.split("*").map(escapeRegex).join("(?.*)"); + let host_matches = rule.matchAll(HOST_PLACEHOLDER_REGEX); + for (let host_match of host_matches) + rule = rule.split(host_match[0]).join(`(?<${host_match[1]}>[^/.]+)`); + let path_matches = rule.matchAll(PLACEHOLDER_REGEX); + for (let path_match of path_matches) + rule = rule.split(path_match[0]).join(`(?<${path_match[1]}>[^/]+)`); + rule = "^" + rule + "$"; + try { + let regExp = new RegExp(rule); + return [{ crossHost, regExp }, match]; + } catch { + } + }).filter((value) => value !== void 0); + return ({ request }) => { + let { pathname, hostname } = new URL(request.url); + return compiledRules.map(([{ crossHost, regExp }, match]) => { + let test = crossHost ? `https://${hostname}${pathname}` : pathname, result = regExp.exec(test); + if (result) + return replacerFn(match, result.groups || {}); + }).filter((value) => value !== void 0); + }; +}, staticRedirectsMatcher = (configuration, host, pathname) => { + let withHostMatch = configuration.redirects.staticRules[`https://${host}${pathname}`], withoutHostMatch = configuration.redirects.staticRules[pathname]; + return withHostMatch && withoutHostMatch ? withHostMatch.lineNumber < withoutHostMatch.lineNumber ? withHostMatch : withoutHostMatch : withHostMatch || withoutHostMatch; +}, generateRedirectsMatcher = (configuration) => generateRulesMatcher( + configuration.redirects.version === REDIRECTS_VERSION ? configuration.redirects.rules : {}, + ({ status, to }, replacements) => ({ + status, + to: replacer(to, replacements) + }) +); + +// ../workers-shared/asset-worker/src/utils/headers.ts +function getAssetHeaders({ eTag, resolver }, contentType, cacheStatus, request, configuration) { + let headers = new Headers({ + ETag: `"${eTag}"` + }); + return contentType !== void 0 && headers.append("Content-Type", contentType), isCacheable(request) && headers.append("Cache-Control", CACHE_CONTROL_BROWSER), headers.append("CF-Cache-Status", cacheStatus), configuration.debug && resolver === "not-found" && flagIsEnabled( + configuration, + SEC_FETCH_MODE_NAVIGATE_HEADER_PREFERS_ASSET_SERVING + ) && headers.append( + "X-Mf-Additional-Response-Log", + "`Sec-Fetch-Mode: navigate` header present - using `not_found_handling` behavior" + ), headers; +} +function isCacheable(request) { + return !request.headers.has("Authorization") && !request.headers.has("Range"); +} +function attachCustomHeaders(request, response, configuration, env) { + return (env.JAEGER ?? mockJaegerBinding()).enterSpan("add_headers", (span) => { + let matches = generateRulesMatcher( + configuration.headers?.version === HEADERS_VERSION ? configuration.headers.rules : {}, + ({ set = {}, unset = [] }, replacements) => { + let replacedSet = {}; + return Object.keys(set).forEach((key) => { + replacedSet[key] = replacer(set[key], replacements); + }), { + set: replacedSet, + unset + }; + } + )({ request }), setMap = /* @__PURE__ */ new Set(); + return matches.forEach(({ set = {}, unset = [] }) => { + unset.forEach((key) => { + response.headers.delete(key), span.addLogs({ remove_header: key }); + }), Object.keys(set).forEach((key) => { + setMap.has(key.toLowerCase()) ? (response.headers.append(key, set[key]), span.addLogs({ append_header: key })) : (response.headers.set(key, set[key]), setMap.add(key.toLowerCase()), span.addLogs({ add_header: key })); + }); + }), response; + }); +} + +// ../workers-shared/asset-worker/src/handler.ts +var REDIRECTS_VERSION = 1, HEADERS_VERSION = 2, getResponseOrAssetIntent = async (request, env, configuration, exists) => { + let url = new URL(request.url), { search } = url, redirectResult = handleRedirects( + env, + request, + configuration, + url.host, + url.pathname, + search + ); + if (redirectResult instanceof Response) + return redirectResult; + let { proxied, pathname } = redirectResult, decodedPathname = decodePath(pathname), intent = await getIntent( + decodedPathname, + request, + configuration, + exists + ); + if (!intent) { + let response = proxied ? new NotFoundResponse() : new NoIntentResponse(); + return env.JAEGER.enterSpan("no_intent", (span) => (span.setTags({ + decodedPathname, + configuration: JSON.stringify(configuration), + proxied, + status: response.status + }), response)); + } + let method = request.method.toUpperCase(); + if (!["GET", "HEAD"].includes(method)) + return env.JAEGER.enterSpan("method_not_allowed", (span) => (span.setTags({ + method, + status: MethodNotAllowedResponse.status + }), new MethodNotAllowedResponse())); + let decodedDestination = intent.redirect ?? decodedPathname, encodedDestination = encodePath(decodedDestination); + return encodedDestination !== pathname && intent.asset || intent.redirect ? env.JAEGER.enterSpan("redirect", (span) => (span.setTags({ + originalPath: pathname, + location: encodedDestination !== pathname ? encodedDestination : intent.redirect ?? "", + status: TemporaryRedirectResponse.status + }), new TemporaryRedirectResponse(encodedDestination + search))) : intent.asset ? { ...intent.asset, resolver: intent.resolver } : env.JAEGER.enterSpan("unknown_action", (span) => (span.setTags({ + pathname, + status: InternalServerErrorResponse.status + }), new InternalServerErrorResponse(new Error("Unknown action")))); +}, resolveAssetIntentToResponse = async (assetIntent, request, env, configuration, getByETag, analytics) => { + let { pathname } = new URL(request.url), method = request.method.toUpperCase(), asset = await env.JAEGER.enterSpan("getByETag", async (span) => (span.setTags({ + pathname, + eTag: assetIntent.eTag, + status: assetIntent.status + }), await getByETag(assetIntent.eTag, request))), headers = getAssetHeaders( + assetIntent, + asset.contentType, + asset.cacheStatus, + request, + configuration + ); + analytics.setData({ cacheStatus: asset.cacheStatus }); + let strongETag = `"${assetIntent.eTag}"`, weakETag = `W/${strongETag}`, ifNoneMatch = request.headers.get("If-None-Match") || ""; + return [weakETag, strongETag].includes(ifNoneMatch) ? env.JAEGER.enterSpan("matched_etag", (span) => (span.setTags({ + matchedEtag: ifNoneMatch, + status: NotModifiedResponse.status + }), new NotModifiedResponse(null, { headers }))) : env.JAEGER.enterSpan("response", (span) => { + span.setTags({ + etag: assetIntent.eTag, + status: assetIntent.status, + head: method === "HEAD" + }); + let body = method === "HEAD" ? null : asset.readableStream; + switch (assetIntent.status) { + case NotFoundResponse.status: + return new NotFoundResponse(body, { headers }); + case OkResponse.status: + return new OkResponse(body, { headers }); + } + }); +}, canFetch = async (request, env, configuration, exists) => (flagIsEnabled( + configuration, + SEC_FETCH_MODE_NAVIGATE_HEADER_PREFERS_ASSET_SERVING +) && request.headers.get("Sec-Fetch-Mode") === "navigate" || (configuration = { + ...configuration, + not_found_handling: "none" +}), !(await getResponseOrAssetIntent( + request, + env, + configuration, + exists +) instanceof NoIntentResponse)), handleRequest = async (request, env, configuration, exists, getByETag, analytics) => { + let responseOrAssetIntent = await getResponseOrAssetIntent( + request, + env, + configuration, + exists + ), response = responseOrAssetIntent instanceof Response ? responseOrAssetIntent : await resolveAssetIntentToResponse( + responseOrAssetIntent, + request, + env, + configuration, + getByETag, + analytics + ); + return attachCustomHeaders(request, response, configuration, env); +}, getIntent = async (pathname, request, configuration, exists, skipRedirects = !1) => { + switch (configuration.html_handling) { + case "auto-trailing-slash": + return htmlHandlingAutoTrailingSlash( + pathname, + request, + configuration, + exists, + skipRedirects + ); + case "force-trailing-slash": + return htmlHandlingForceTrailingSlash( + pathname, + request, + configuration, + exists, + skipRedirects + ); + case "drop-trailing-slash": + return htmlHandlingDropTrailingSlash( + pathname, + request, + configuration, + exists, + skipRedirects + ); + case "none": + return htmlHandlingNone(pathname, request, configuration, exists); + } +}, htmlHandlingAutoTrailingSlash = async (pathname, request, configuration, exists, skipRedirects) => { + let redirectResult = null, eTagResult = null, exactETag = await exists(pathname, request); + if (pathname.endsWith("/index")) { + if (exactETag) + return { + asset: { + eTag: exactETag, + status: OkResponse.status + }, + redirect: null, + resolver: "html-handling" + }; + if (redirectResult = await safeRedirect( + `${pathname}.html`, + request, + pathname.slice(0, -5), + configuration, + exists, + skipRedirects, + "html-handling" + )) + return redirectResult; + if (redirectResult = await safeRedirect( + `${pathname.slice(0, -6)}.html`, + request, + pathname.slice(0, -6), + configuration, + exists, + skipRedirects, + "html-handling" + )) + return redirectResult; + } else if (pathname.endsWith("/index.html")) { + if (redirectResult = await safeRedirect( + pathname, + request, + pathname.slice(0, -10), + configuration, + exists, + skipRedirects, + "html-handling" + )) + return redirectResult; + if (redirectResult = await safeRedirect( + `${pathname.slice(0, -11)}.html`, + request, + pathname.slice(0, -11), + configuration, + exists, + skipRedirects, + "html-handling" + )) + return redirectResult; + } else if (pathname.endsWith("/")) { + if (eTagResult = await exists(`${pathname}index.html`, request)) + return { + asset: { eTag: eTagResult, status: OkResponse.status }, + redirect: null, + resolver: "html-handling" + }; + if (redirectResult = await safeRedirect( + `${pathname.slice(0, -1)}.html`, + request, + pathname.slice(0, -1), + configuration, + exists, + skipRedirects, + "html-handling" + )) + return redirectResult; + } else if (pathname.endsWith(".html")) { + if (redirectResult = await safeRedirect( + pathname, + request, + pathname.slice(0, -5), + configuration, + exists, + skipRedirects, + "html-handling" + )) + return redirectResult; + if (redirectResult = await safeRedirect( + `${pathname.slice(0, -5)}/index.html`, + request, + `${pathname.slice(0, -5)}/`, + configuration, + exists, + skipRedirects, + "html-handling" + )) + return redirectResult; + } + return exactETag ? { + asset: { eTag: exactETag, status: OkResponse.status }, + redirect: null, + resolver: "html-handling" + } : (eTagResult = await exists(`${pathname}.html`, request)) ? { + asset: { eTag: eTagResult, status: OkResponse.status }, + redirect: null, + resolver: "html-handling" + } : (redirectResult = await safeRedirect( + `${pathname}/index.html`, + request, + `${pathname}/`, + configuration, + exists, + skipRedirects, + "html-handling" + )) ? redirectResult : notFound(pathname, request, configuration, exists); +}, htmlHandlingForceTrailingSlash = async (pathname, request, configuration, exists, skipRedirects) => { + let redirectResult = null, eTagResult = null, exactETag = await exists(pathname, request); + if (pathname.endsWith("/index")) { + if (exactETag) + return { + asset: { eTag: exactETag, status: OkResponse.status }, + redirect: null, + resolver: "html-handling" + }; + if (redirectResult = await safeRedirect( + `${pathname}.html`, + request, + pathname.slice(0, -5), + configuration, + exists, + skipRedirects, + "html-handling" + )) + return redirectResult; + if (redirectResult = await safeRedirect( + `${pathname.slice(0, -6)}.html`, + request, + pathname.slice(0, -5), + configuration, + exists, + skipRedirects, + "html-handling" + )) + return redirectResult; + } else if (pathname.endsWith("/index.html")) { + if (redirectResult = await safeRedirect( + pathname, + request, + pathname.slice(0, -10), + configuration, + exists, + skipRedirects, + "html-handling" + )) + return redirectResult; + if (redirectResult = await safeRedirect( + `${pathname.slice(0, -11)}.html`, + request, + pathname.slice(0, -10), + configuration, + exists, + skipRedirects, + "html-handling" + )) + return redirectResult; + } else if (pathname.endsWith("/")) { + if (eTagResult = await exists(`${pathname}index.html`, request)) + return { + asset: { eTag: eTagResult, status: OkResponse.status }, + redirect: null, + resolver: "html-handling" + }; + if (eTagResult = await exists( + `${pathname.slice(0, -1)}.html`, + request + )) + return { + asset: { eTag: eTagResult, status: OkResponse.status }, + redirect: null, + resolver: "html-handling" + }; + } else if (pathname.endsWith(".html")) { + if (redirectResult = await safeRedirect( + pathname, + request, + `${pathname.slice(0, -5)}/`, + configuration, + exists, + skipRedirects, + "html-handling" + )) + return redirectResult; + if (exactETag) + return { + asset: { eTag: exactETag, status: OkResponse.status }, + redirect: null, + resolver: "html-handling" + }; + if (redirectResult = await safeRedirect( + `${pathname.slice(0, -5)}/index.html`, + request, + `${pathname.slice(0, -5)}/`, + configuration, + exists, + skipRedirects, + "html-handling" + )) + return redirectResult; + } + return exactETag ? { + asset: { eTag: exactETag, status: OkResponse.status }, + redirect: null, + resolver: "html-handling" + } : (redirectResult = await safeRedirect( + `${pathname}.html`, + request, + `${pathname}/`, + configuration, + exists, + skipRedirects, + "html-handling" + )) || (redirectResult = await safeRedirect( + `${pathname}/index.html`, + request, + `${pathname}/`, + configuration, + exists, + skipRedirects, + "html-handling" + )) ? redirectResult : notFound(pathname, request, configuration, exists); +}, htmlHandlingDropTrailingSlash = async (pathname, request, configuration, exists, skipRedirects) => { + let redirectResult = null, eTagResult = null, exactETag = await exists(pathname, request); + if (pathname.endsWith("/index")) { + if (exactETag) + return { + asset: { eTag: exactETag, status: OkResponse.status }, + redirect: null, + resolver: "html-handling" + }; + if (pathname === "/index") { + if (redirectResult = await safeRedirect( + "/index.html", + request, + "/", + configuration, + exists, + skipRedirects, + "html-handling" + )) + return redirectResult; + } else { + if (redirectResult = await safeRedirect( + `${pathname.slice(0, -6)}.html`, + request, + pathname.slice(0, -6), + configuration, + exists, + skipRedirects, + "html-handling" + )) + return redirectResult; + if (redirectResult = await safeRedirect( + `${pathname}.html`, + request, + pathname.slice(0, -6), + configuration, + exists, + skipRedirects, + "html-handling" + )) + return redirectResult; + } + } else if (pathname.endsWith("/index.html")) + if (pathname === "/index.html") { + if (redirectResult = await safeRedirect( + "/index.html", + request, + "/", + configuration, + exists, + skipRedirects, + "html-handling" + )) + return redirectResult; + } else { + if (redirectResult = await safeRedirect( + pathname, + request, + pathname.slice(0, -11), + configuration, + exists, + skipRedirects, + "html-handling" + )) + return redirectResult; + if (exactETag) + return { + asset: { eTag: exactETag, status: OkResponse.status }, + redirect: null, + resolver: "html-handling" + }; + if (redirectResult = await safeRedirect( + `${pathname.slice(0, -11)}.html`, + request, + pathname.slice(0, -11), + configuration, + exists, + skipRedirects, + "html-handling" + )) + return redirectResult; + } + else if (pathname.endsWith("/")) + if (pathname === "/") { + if (eTagResult = await exists("/index.html", request)) + return { + asset: { eTag: eTagResult, status: OkResponse.status }, + redirect: null, + resolver: "html-handling" + }; + } else { + if (redirectResult = await safeRedirect( + `${pathname.slice(0, -1)}.html`, + request, + pathname.slice(0, -1), + configuration, + exists, + skipRedirects, + "html-handling" + )) + return redirectResult; + if (redirectResult = await safeRedirect( + `${pathname.slice(0, -1)}/index.html`, + request, + pathname.slice(0, -1), + configuration, + exists, + skipRedirects, + "html-handling" + )) + return redirectResult; + } + else if (pathname.endsWith(".html")) { + if (redirectResult = await safeRedirect( + pathname, + request, + pathname.slice(0, -5), + configuration, + exists, + skipRedirects, + "html-handling" + )) + return redirectResult; + if (redirectResult = await safeRedirect( + `${pathname.slice(0, -5)}/index.html`, + request, + pathname.slice(0, -5), + configuration, + exists, + skipRedirects, + "html-handling" + )) + return redirectResult; + } + return exactETag ? { + asset: { eTag: exactETag, status: OkResponse.status }, + redirect: null, + resolver: "html-handling" + } : (eTagResult = await exists(`${pathname}.html`, request)) ? { + asset: { eTag: eTagResult, status: OkResponse.status }, + redirect: null, + resolver: "html-handling" + } : (eTagResult = await exists(`${pathname}/index.html`, request)) ? { + asset: { eTag: eTagResult, status: OkResponse.status }, + redirect: null, + resolver: "html-handling" + } : notFound(pathname, request, configuration, exists); +}, htmlHandlingNone = async (pathname, request, configuration, exists) => { + let exactETag = await exists(pathname, request); + return exactETag ? { + asset: { eTag: exactETag, status: OkResponse.status }, + redirect: null, + resolver: "html-handling" + } : notFound(pathname, request, configuration, exists); +}, notFound = async (pathname, request, configuration, exists) => { + switch (configuration.not_found_handling) { + case "single-page-application": { + let eTag = await exists("/index.html", request); + return eTag ? { + asset: { eTag, status: OkResponse.status }, + redirect: null, + resolver: "not-found" + } : null; + } + case "404-page": { + let cwd = pathname; + for (; cwd; ) { + cwd = cwd.slice(0, cwd.lastIndexOf("/")); + let eTag = await exists(`${cwd}/404.html`, request); + if (eTag) + return { + asset: { eTag, status: NotFoundResponse.status }, + redirect: null, + resolver: "not-found" + }; + } + return null; + } + case "none": + default: + return null; + } +}, safeRedirect = async (file, request, destination, configuration, exists, skip, resolver) => { + if (skip) + return null; + if (!await exists(destination, request)) { + let intent = await getIntent( + destination, + request, + configuration, + exists, + !0 + ); + if (intent?.asset && intent.asset.eTag === await exists(file, request)) + return { + asset: null, + redirect: destination, + resolver + }; + } + return null; +}, decodePath = (pathname) => pathname.split("/").map((x) => { + try { + return decodeURIComponent(x); + } catch { + return x; + } +}).join("/").replace(/\/+/g, "/"), encodePath = (pathname) => pathname.split("/").map((x) => { + try { + return encodeURIComponent(x); + } catch { + return x; + } +}).join("/"), handleRedirects = (env, request, configuration, host, pathname, search) => (env.JAEGER ?? mockJaegerBinding()).enterSpan("handle_redirects", (span) => { + let redirectMatch = staticRedirectsMatcher(configuration, host, pathname) || generateRedirectsMatcher(configuration)({ request })[0], proxied = !1; + if (redirectMatch) + if (redirectMatch.status === 200) + pathname = new URL(redirectMatch.to, request.url).pathname, proxied = !0, span.setTags({ + matched: !0, + proxied: !0, + new_path: pathname, + status: redirectMatch.status + }); + else { + let { status, to } = redirectMatch, destination = new URL(to, request.url), location = destination.origin === new URL(request.url).origin ? `${destination.pathname}${destination.search || search}${destination.hash}` : `${destination.href.slice(0, destination.href.length - (destination.search.length + destination.hash.length))}${destination.search ? destination.search : search}${destination.hash}`; + switch (span.setTags({ + matched: !0, + destination: location, + status + }), status) { + case MovedPermanentlyResponse.status: + return new MovedPermanentlyResponse(location); + case SeeOtherResponse.status: + return new SeeOtherResponse(location); + case TemporaryRedirectResponse.status: + return new TemporaryRedirectResponse(location); + case PermanentRedirectResponse.status: + return new PermanentRedirectResponse(location); + case FoundResponse.status: + default: + return new FoundResponse(location); + } + } + else + span.setTags({ + matched: !1 + }); + return { proxied, pathname }; +}); + +// ../workers-shared/asset-worker/src/utils/final-operations.ts +function handleError(sentry, analytics, err) { + try { + let response = new InternalServerErrorResponse(err); + return sentry && sentry.captureException(err), err instanceof Error && analytics.setData({ error: err.message }), response; + } catch (e) { + return console.error("Error handling error", e), new InternalServerErrorResponse(e); + } +} +function submitMetrics(analytics, performance, startTimeMs) { + try { + analytics.setData({ requestTime: performance.now() - startTimeMs }), analytics.write(); + } catch (e) { + console.error("Error submitting metrics", e); + } +} + +// ../workers-shared/asset-worker/src/utils/kv.ts +async function getAssetWithMetadataFromKV(assetsKVNamespace, assetKey, sentry, retries = 1) { + let attempts = 0; + for (; attempts <= retries; ) + try { + let asset = await assetsKVNamespace.getWithMetadata( + assetKey, + { + type: "stream", + cacheTtl: 31536e3 + // 1 year + } + ); + if (asset.value === null) { + let retriedAsset = await assetsKVNamespace.getWithMetadata(assetKey, { + type: "stream", + cacheTtl: 60 + // Minimum value allowed + }); + return retriedAsset.value !== null && sentry && sentry.captureException( + new Error( + `Initial request for asset ${assetKey} failed, but subsequent request succeeded.` + ) + ), retriedAsset; + } + return asset; + } catch (err) { + if (attempts >= retries) { + let message = `KV GET ${assetKey} failed.`; + throw err instanceof Error && (message = `KV GET ${assetKey} failed: ${err.message}`), new Error(message); + } + await new Promise( + (resolvePromise) => setTimeout(resolvePromise, Math.pow(2, attempts++) * 1e3) + ); + } +} + +// ../workers-shared/asset-worker/src/index.ts +var src_default = class extends WorkerEntrypoint { + async fetch(request) { + let sentry, analytics = new Analytics(this.env.ANALYTICS), performance = new PerformanceTimer(this.env.UNSAFE_PERFORMANCE), startTimeMs = performance.now(); + try { + this.env.JAEGER ??= mockJaegerBinding(), sentry = setupSentry( + request, + this.ctx, + this.env.SENTRY_DSN, + this.env.SENTRY_ACCESS_CLIENT_ID, + this.env.SENTRY_ACCESS_CLIENT_SECRET, + this.env.COLO_METADATA, + this.env.VERSION_METADATA, + this.env.CONFIG?.account_id, + this.env.CONFIG?.script_id + ); + let config = normalizeConfiguration(this.env.CONFIG); + sentry?.setContext("compatibilityOptions", { + compatibilityDate: config.compatibility_date, + compatibilityFlags: config.compatibility_flags, + originalCompatibilityFlags: this.env.CONFIG.compatibility_flags + }); + let userAgent = request.headers.get("user-agent") ?? "UA UNKNOWN", url = new URL(request.url); + return this.env.COLO_METADATA && this.env.VERSION_METADATA && this.env.CONFIG && analytics.setData({ + accountId: this.env.CONFIG.account_id, + scriptId: this.env.CONFIG.script_id, + coloId: this.env.COLO_METADATA.coloId, + metalId: this.env.COLO_METADATA.metalId, + coloTier: this.env.COLO_METADATA.coloTier, + coloRegion: this.env.COLO_METADATA.coloRegion, + version: this.env.VERSION_METADATA.tag, + hostname: url.hostname, + htmlHandling: config.html_handling, + notFoundHandling: config.not_found_handling, + compatibilityFlags: config.compatibility_flags, + userAgent + }), await this.env.JAEGER.enterSpan("handleRequest", async (span) => { + span.setTags({ + hostname: url.hostname, + eyeballPath: url.pathname, + env: this.env.ENVIRONMENT, + version: this.env.VERSION_METADATA?.id + }); + let response = await handleRequest( + request, + this.env, + config, + this.unstable_exists.bind(this), + this.unstable_getByETag.bind(this), + analytics + ); + return analytics.setData({ status: response.status }), response; + }); + } catch (err) { + return handleError(sentry, analytics, err); + } finally { + submitMetrics(analytics, performance, startTimeMs); + } + } + async unstable_canFetch(request) { + return this.env.JAEGER ??= mockJaegerBinding(), canFetch( + request, + this.env, + normalizeConfiguration(this.env.CONFIG), + this.unstable_exists.bind(this) + ); + } + async unstable_getByETag(eTag, _request) { + let performance = new PerformanceTimer(this.env.UNSAFE_PERFORMANCE); + return (this.env.JAEGER ?? mockJaegerBinding()).enterSpan("unstable_getByETag", async (span) => { + let startTime = performance.now(), asset = await getAssetWithMetadataFromKV( + this.env.ASSETS_KV_NAMESPACE, + eTag + ), assetFetchTime = performance.now() - startTime; + if (!asset || !asset.value) + throw span.setTags({ + error: !0 + }), span.addLogs({ + error: `Requested asset ${eTag} exists in the asset manifest but not in the KV namespace.` + }), new Error( + `Requested asset ${eTag} exists in the asset manifest but not in the KV namespace.` + ); + let cacheStatus = assetFetchTime <= 100 ? "HIT" : "MISS"; + return span.setTags({ + etag: eTag, + contentType: asset.metadata?.contentType ?? "unknown", + cacheStatus + }), { + readableStream: asset.value, + contentType: asset.metadata?.contentType, + cacheStatus + }; + }); + } + async unstable_getByPathname(pathname, request) { + return (this.env.JAEGER ?? mockJaegerBinding()).enterSpan("unstable_getByPathname", async (span) => { + let eTag = await this.unstable_exists(pathname, request); + return span.setTags({ + path: pathname, + found: eTag !== null + }), eTag ? this.unstable_getByETag(eTag, request) : null; + }); + } + async unstable_exists(pathname, _request) { + let analytics = new ExperimentAnalytics(this.env.EXPERIMENT_ANALYTICS), performance = new PerformanceTimer(this.env.UNSAFE_PERFORMANCE); + return (this.env.JAEGER ?? mockJaegerBinding()).enterSpan("unstable_exists", async (span) => { + this.env.COLO_METADATA && this.env.VERSION_METADATA && this.env.CONFIG && analytics.setData({ + accountId: this.env.CONFIG.account_id, + experimentName: "manifest-read-timing" + }); + let startTimeMs = performance.now(); + try { + let eTag = await new AssetsManifest(this.env.ASSETS_MANIFEST).get(pathname); + return span.setTags({ + path: pathname, + found: eTag !== null, + etag: eTag ?? "" + }), eTag; + } finally { + analytics.setData({ + manifestReadTime: performance.now() - startTimeMs + }), analytics.write(); + } + }); + } +}; + +// src/workers/assets/assets.worker.ts +var assets_worker_default = src_default; +export { + assets_worker_default as default +}; +//# sourceMappingURL=assets.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/assets/assets.worker.js.map b/node_modules/miniflare/dist/src/workers/assets/assets.worker.js.map new file mode 100644 index 0000000..2f505af --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/assets/assets.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/is.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/string.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/aggregate-errors.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/array.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/version.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/worldwide.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/browser.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/debug-build.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/logger.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/dsn.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/error.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/object.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/stacktrace.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/instrument/handlers.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/instrument/console.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/supports.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/time.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/instrument/fetch.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/instrument/globalError.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/instrument/globalUnhandledRejection.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/env.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/node.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/isBrowser.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/memo.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/misc.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/normalize.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/path.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/syncpromise.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/promisebuffer.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/cookie.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/url.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/requestdata.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/severity.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/node-stack-trace.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/baggage.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/tracing.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/envelope.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/clientreport.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/ratelimit.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/cache.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/eventbuilder.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/anr.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/lru.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/buildPolyfills/_nullishCoalesce.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/buildPolyfills/_asyncNullishCoalesce.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/buildPolyfills/_asyncOptionalChain.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/buildPolyfills/_asyncOptionalChainDelete.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/buildPolyfills/_optionalChain.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/buildPolyfills/_optionalChainDelete.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/propagationContext.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/vendor/escapeStringForRegex.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/vendor/supportsHistory.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/index.js", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/debug-build.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/carrier.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/session.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/spanOnScope.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/scope.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/defaultScopes.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/asyncContext/stackStrategy.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/asyncContext/index.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/currentScopes.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metrics/metric-summary.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/semanticAttributes.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/spanstatus.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/spanUtils.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/errors.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/utils.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/hubextensions.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/hasTracingEnabled.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/sentryNonRecordingSpan.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/handleCallbackErrors.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/constants.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/dynamicSamplingContext.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/logSpans.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/parseSampleRate.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/sampling.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/envelope.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/measurement.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/sentrySpan.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/trace.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/idleSpan.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/eventProcessors.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/applyScopeDataToEvent.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/prepareEvent.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/exports.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/sessionflusher.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/api.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integration.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/baseclient.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/checkin.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/server-runtime-client.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/sdk.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/transports/base.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/transports/offline.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/transports/multiplexed.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/isSentryRequestUrl.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/parameterize.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/sdkMetadata.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/breadcrumbs.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/functiontostring.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/inboundfilters.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/linkederrors.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metadata.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/metadata.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/requestdata.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/captureconsole.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/debug.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/dedupe.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/extraerrordata.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/rewriteframes.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/sessiontiming.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/zoderrors.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/third-party-errors-filter.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metrics/constants.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metrics/exports.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metrics/utils.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metrics/envelope.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metrics/instance.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metrics/aggregator.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metrics/exports-default.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metrics/browser-aggregator.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/fetch.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/trpc.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/feedback.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/getCurrentHubShim.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/index.js", "../../../../../../node_modules/.pnpm/toucan-js@4.0.0_patch_hash=qxsfpdzvzbhq2ecirbu5xq4vlq/node_modules/toucan-js/dist/index.cjs.js", "../../../../../workers-shared/asset-worker/src/index.ts", "../../../../../workers-shared/utils/performance.ts", "../../../../../workers-shared/utils/sentry.ts", "../../../../../workers-shared/utils/tracing.ts", "../../../../../workers-shared/asset-worker/src/analytics.ts", "../../../../../workers-shared/asset-worker/src/assets-manifest.ts", "../../../../../workers-shared/asset-worker/src/compatibility-flags.ts", "../../../../../workers-shared/asset-worker/src/configuration.ts", "../../../../../workers-shared/asset-worker/src/experiment-analytics.ts", "../../../../../workers-shared/utils/responses.ts", "../../../../../workers-shared/asset-worker/src/constants.ts", "../../../../../workers-shared/asset-worker/src/utils/rules-engine.ts", "../../../../../workers-shared/asset-worker/src/utils/headers.ts", "../../../../../workers-shared/asset-worker/src/handler.ts", "../../../../../workers-shared/asset-worker/src/utils/final-operations.ts", "../../../../../workers-shared/asset-worker/src/utils/kv.ts", "../../../../src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AAW,KAAK,IAAI,OAAO;AAAA,QAC3B,gBAAgB;AAAA,MACjB,CAAC;AAGF,UAAM,cAAc,YAAY,IAAI;AACpC,UAAI;AAEH,YAAM,OAAO,MADU,IAAI,eAAe,KAAK,IAAI,eAAe,EAChC,IAAI,QAAQ;AAE9C,oBAAK,QAAQ;AAAA,UACZ,MAAM;AAAA,UACN,OAAO,SAAS;AAAA,UAChB,MAAM,QAAQ;AAAA,QACf,CAAC,GAEM;AAAA,MACR,UAAE;AACD,kBAAU,QAAQ;AAAA,UACjB,kBAAkB,YAAY,IAAI,IAAI;AAAA,QACvC,CAAC,GACD,UAAU,MAAM;AAAA,MACjB;AAAA,IACD,CAAC;AAAA,EACF;AACD;;;AgBxQA,IAAO,wBAAQ;", + "names": ["isVueViewModel", "isString", "isRegExp", "isInstanceOf", "truncate", "input", "SDK_VERSION", "GLOBAL_OBJ", "isString", "GLOBAL_OBJ", "console", "logger", "DEBUG_BUILD", "consoleSandbox", "DEBUG_BUILD", "logger", "DEBUG_BUILD", "logger", "isError", "isEvent", "isInstanceOf", "isElement", "htmlTreeAsString", "truncate", "isPlainObject", "isPrimitive", "DEBUG_BUILD", "logger", "getFunctionName", "addHandler", "maybeInstrument", "GLOBAL_OBJ", "CONSOLE_LEVELS", "fill", "originalConsoleMethods", "triggerHandlers", "GLOBAL_OBJ", "DEBUG_BUILD", "logger", "GLOBAL_OBJ", "_browserPerformanceTimeOriginMode", "addHandler", "maybeInstrument", "supportsNativeFetch", "fill", "GLOBAL_OBJ", "timestampInSeconds", "triggerHandlers", "isError", "addNonEnumerableProperty", "addHandler", "maybeInstrument", "GLOBAL_OBJ", "triggerHandlers", "addHandler", "maybeInstrument", "GLOBAL_OBJ", "triggerHandlers", "isBrowserBundle", "isNodeEnv", "GLOBAL_OBJ", "GLOBAL_OBJ", "crypto", "snipLine", "addNonEnumerableProperty", "object", "memo", "memoBuilder", "convertToPlainObject", "isVueViewModel", "isSyntheticEvent", "getFunctionName", "States", "isThenable", "rejectedSyncPromise", "SentryError", "SyncPromise", "resolvedSyncPromise", "stripUrlQueryAndFragment", "parseCookie", "isString", "normalize", "isPlainObject", "DEBUG_BUILD", "logger", "UNKNOWN_FUNCTION", "isString", "DEBUG_BUILD", "logger", "baggage", "baggageHeaderToDynamicSamplingContext", "uuid4", "GLOBAL_OBJ", "normalize", "dropUndefinedKeys", "dsn", "dsnToString", "dateTimestampInSeconds", "createEnvelope", "extractExceptionKeysForMessage", "isErrorEvent", "isError", "isPlainObject", "normalizeToSize", "ex", "addExceptionTypeValue", "addExceptionMechanism", "isParameterizedString", "dropUndefinedKeys", "UNKNOWN_FUNCTION", "filenameIsInApp", "_nullishCoalesce", "_asyncOptionalChain", "_optionalChain", "uuid4", "GLOBAL_OBJ", "console", "fetch", "GLOBAL_OBJ", "SDK_VERSION", "timestampInSeconds", "uuid4", "dropUndefinedKeys", "addNonEnumerableProperty", "generatePropagationContext", "_setSpanForScope", "_getSpanForScope", "updateSession", "session", "isPlainObject", "dateTimestampInSeconds", "uuid4", "logger", "getGlobalSingleton", "ScopeClass", "scope", "Scope", "isThenable", "getMainCarrier", "getSentryCarrier", "getDefaultCurrentScope", "getDefaultIsolationScope", "getMainCarrier", "getSentryCarrier", "carrier", "getStackAsyncContextStrategy", "carrier", "getMainCarrier", "getAsyncContextStrategy", "getGlobalSingleton", "ScopeClass", "scope", "dropUndefinedKeys", "dropUndefinedKeys", "generateSentryTraceHeader", "timestampInSeconds", "SEMANTIC_ATTRIBUTE_SENTRY_OP", "SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN", "getMetricSummaryJsonForSpan", "SPAN_STATUS_UNSET", "SPAN_STATUS_OK", "addNonEnumerableProperty", "span", "carrier", "getMainCarrier", "getAsyncContextStrategy", "_getSpanForScope", "getCurrentScope", "updateMetricSummaryOnSpan", "addGlobalErrorInstrumentationHandler", "addGlobalUnhandledRejectionInstrumentationHandler", "getActiveSpan", "getRootSpan", "DEBUG_BUILD", "logger", "SPAN_STATUS_ERROR", "addNonEnumerableProperty", "registerSpanErrorInstrumentation", "getClient", "uuid4", "TRACE_FLAG_NONE", "isThenable", "addNonEnumerableProperty", "dropUndefinedKeys", "DEFAULT_ENVIRONMENT", "getClient", "spanToJSON", "getRootSpan", "SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE", "SEMANTIC_ATTRIBUTE_SENTRY_SOURCE", "spanIsSampled", "dynamicSamplingContextToSentryBaggageHeader", "DEBUG_BUILD", "spanToJSON", "spanIsSampled", "getRootSpan", "op", "description", "logger", "DEBUG_BUILD", "logger", "hasTracingEnabled", "parseSampleRate", "DEBUG_BUILD", "logger", "getSdkMetadataForEnvelopeHeader", "dsnToString", "createEnvelope", "createEventEnvelopeHeaders", "dsc", "getDynamicSamplingContextFromSpan", "spanToJSON", "createSpanEnvelopeItem", "getActiveSpan", "getRootSpan", "SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE", "SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT", "uuid4", "timestampInSeconds", "SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN", "SEMANTIC_ATTRIBUTE_SENTRY_OP", "TRACE_FLAG_SAMPLED", "TRACE_FLAG_NONE", "spanTimeInputToSeconds", "logSpanEnd", "dropUndefinedKeys", "getStatusMessage", "getMetricSummaryJsonForSpan", "SEMANTIC_ATTRIBUTE_PROFILE_ID", "SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME", "timedEventsToMeasurements", "getRootSpan", "DEBUG_BUILD", "logger", "getClient", "createSpanEnvelope", "getCapturedScopesOnSpan", "getCurrentScope", "spanToJSON", "getSpanDescendants", "SEMANTIC_ATTRIBUTE_SENTRY_SOURCE", "spanToTransactionTraceContext", "getDynamicSamplingContextFromSpan", "envelope", "withScope", "SentryNonRecordingSpan", "_setSpanForScope", "handleCallbackErrors", "spanToJSON", "SPAN_STATUS_ERROR", "getCurrentScope", "propagationContextFromHeaders", "generatePropagationContext", "DEBUG_BUILD", "logger", "hasTracingEnabled", "getIsolationScope", "addChildSpanToSpan", "getDynamicSamplingContextFromSpan", "spanIsSampled", "freezeDscOnSpan", "logSpanStart", "setCapturedScopesOnSpan", "spanTimeInputToSeconds", "carrier", "getMainCarrier", "getAsyncContextStrategy", "getClient", "sampleSpan", "SentrySpan", "SEMANTIC_ATTRIBUTE_SENTRY_SOURCE", "SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE", "_getSpanForScope", "getRootSpan", "getClient", "hasTracingEnabled", "SentryNonRecordingSpan", "getCurrentScope", "getActiveSpan", "timestampInSeconds", "spanTimeInputToSeconds", "getSpanDescendants", "span", "spanToJSON", "timestamp", "_setSpanForScope", "SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON", "logger", "SPAN_STATUS_ERROR", "DEBUG_BUILD", "removeChildSpanFromSpan", "startInactiveSpan", "SyncPromise", "DEBUG_BUILD", "logger", "isThenable", "dropUndefinedKeys", "spanToTraceContext", "getDynamicSamplingContextFromSpan", "getRootSpan", "spanToJSON", "arrayify", "scope", "uuid4", "dateTimestampInSeconds", "addExceptionMechanism", "getGlobalScope", "mergeScopeData", "applyScopeDataToEvent", "eventProcessors", "notifyEventProcessors", "DEFAULT_ENVIRONMENT", "truncate", "GLOBAL_OBJ", "normalize", "Scope", "getCurrentScope", "parseEventHintOrCaptureContext", "getIsolationScope", "getClient", "DEBUG_BUILD", "logger", "uuid4", "timestampInSeconds", "withIsolationScope", "isThenable", "DEFAULT_ENVIRONMENT", "GLOBAL_OBJ", "session", "makeSession", "updateSession", "closeSession", "dropUndefinedKeys", "getIsolationScope", "urlEncode", "makeDsn", "dsnToString", "arrayify", "DEBUG_BUILD", "logger", "getClient", "makeDsn", "DEBUG_BUILD", "logger", "getEnvelopeEndpointWithUrlEncodedAuth", "uuid4", "checkOrSetAlreadyCaught", "isParameterizedString", "isPrimitive", "session", "updateSession", "resolvedSyncPromise", "integration", "setupIntegration", "afterSetupIntegrations", "createEventEnvelope", "addItemToEnvelope", "createAttachmentEnvelopeItem", "createSessionEnvelope", "envelope", "setupIntegrations", "SyncPromise", "getIsolationScope", "prepareEvent", "dropUndefinedKeys", "dynamicSamplingContext", "getDynamicSamplingContextFromClient", "parseSampleRate", "rejectedSyncPromise", "SentryError", "isThenable", "isPlainObject", "dsnToString", "dropUndefinedKeys", "createEnvelope", "BaseClient", "registerSpanErrorInstrumentation", "resolvedSyncPromise", "eventFromUnknownInput", "eventFromMessage", "getIsolationScope", "SessionFlusher", "DEBUG_BUILD", "logger", "uuid4", "dynamicSamplingContext", "createCheckInEnvelope", "_getSpanForScope", "getRootSpan", "getDynamicSamplingContextFromSpan", "spanToTraceContext", "getDynamicSamplingContextFromClient", "DEBUG_BUILD", "logger", "consoleSandbox", "getCurrentScope", "makePromiseBuffer", "forEachEnvelopeItem", "envelopeItemTypeToDataCategory", "isRateLimited", "resolvedSyncPromise", "createEnvelope", "serializeEnvelope", "DEBUG_BUILD", "logger", "updateRateLimits", "SentryError", "DEBUG_BUILD", "logger", "retryDelay", "envelopeContainsItemType", "parseRetryAfterHeader", "forEachEnvelopeItem", "createEnvelope", "dsnFromString", "getEnvelopeEndpointWithUrlEncodedAuth", "name", "SDK_VERSION", "getClient", "getIsolationScope", "dateTimestampInSeconds", "consoleSandbox", "getOriginalFunction", "getClient", "defineIntegration", "defineIntegration", "DEBUG_BUILD", "logger", "getEventDescription", "stringMatchesSomePattern", "options", "applyAggregateErrorsToEvent", "exceptionFromError", "defineIntegration", "GLOBAL_OBJ", "forEachEnvelopeItem", "stripMetadataFromStackFrames", "addMetadataToStackFrames", "defineIntegration", "addRequestDataToEvent", "defineIntegration", "CONSOLE_LEVELS", "GLOBAL_OBJ", "addConsoleInstrumentationHandler", "getClient", "defineIntegration", "severityLevelFromString", "withScope", "addExceptionMechanism", "message", "safeJoin", "captureMessage", "captureException", "consoleSandbox", "defineIntegration", "DEBUG_BUILD", "logger", "defineIntegration", "getFramesFromEvent", "defineIntegration", "isError", "normalize", "isPlainObject", "addNonEnumerableProperty", "DEBUG_BUILD", "logger", "rewriteFramesIntegration", "defineIntegration", "GLOBAL_OBJ", "relative", "basename", "timestampInSeconds", "defineIntegration", "isError", "truncate", "defineIntegration", "defineIntegration", "forEachEnvelopeItem", "stripMetadataFromStackFrames", "addMetadataToStackFrames", "getFramesFromEvent", "getGlobalSingleton", "getClient", "getActiveSpan", "getRootSpan", "spanToJSON", "DEBUG_BUILD", "logger", "COUNTER_METRIC_TYPE", "DISTRIBUTION_METRIC_TYPE", "timestampInSeconds", "startSpanManual", "handleCallbackErrors", "SET_METRIC_TYPE", "GAUGE_METRIC_TYPE", "dropUndefinedKeys", "logger", "dsnToString", "createEnvelope", "serializeMetricBuckets", "simpleHash", "COUNTER_METRIC_TYPE", "GAUGE_METRIC_TYPE", "DISTRIBUTION_METRIC_TYPE", "SET_METRIC_TYPE", "DEFAULT_FLUSH_INTERVAL", "timestampInSeconds", "sanitizeMetricKey", "sanitizeTags", "sanitizeUnit", "getBucketKey", "SET_METRIC_TYPE", "METRIC_MAP", "updateMetricSummaryOnActiveSpan", "MAX_WEIGHT", "captureAggregateMetrics", "metricsCore", "MetricsAggregator", "DEFAULT_BROWSER_FLUSH_INTERVAL", "timestampInSeconds", "sanitizeMetricKey", "sanitizeTags", "sanitizeUnit", "getBucketKey", "SET_METRIC_TYPE", "METRIC_MAP", "updateMetricSummaryOnActiveSpan", "captureAggregateMetrics", "hasTracingEnabled", "span", "getCurrentScope", "getClient", "parseUrl", "getActiveSpan", "startInactiveSpan", "SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN", "SEMANTIC_ATTRIBUTE_SENTRY_OP", "SentryNonRecordingSpan", "getIsolationScope", "spanToTraceHeader", "generateSentryTraceHeader", "dynamicSamplingContextToSentryBaggageHeader", "getDynamicSamplingContextFromSpan", "getDynamicSamplingContextFromClient", "isInstanceOf", "BAGGAGE_HEADER_NAME", "setHttpStatus", "SPAN_STATUS_ERROR", "getClient", "normalize", "setContext", "captureException", "startSpanManual", "SEMANTIC_ATTRIBUTE_SENTRY_SOURCE", "SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN", "isThenable", "getCurrentScope", "dropUndefinedKeys", "getClient", "getCurrentScope", "withScope", "getClient", "getIsolationScope", "captureEvent", "addBreadcrumb", "setUser", "setTags", "setTag", "setExtra", "setExtras", "setContext", "startSession", "endSession", "require_cjs", "fetch", "getModule", "Toucan"] +} diff --git a/node_modules/miniflare/dist/src/workers/assets/router.worker.js b/node_modules/miniflare/dist/src/workers/assets/router.worker.js new file mode 100644 index 0000000..b779100 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/assets/router.worker.js @@ -0,0 +1,7920 @@ +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty; +var __commonJS = (cb, mod) => function() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from == "object" || typeof from == "function") + for (let key of __getOwnPropNames(from)) + !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target, + mod +)); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/is.js +var require_is = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/is.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var objectToString = Object.prototype.toString; + function isError(wat) { + switch (objectToString.call(wat)) { + case "[object Error]": + case "[object Exception]": + case "[object DOMException]": + return !0; + default: + return isInstanceOf(wat, Error); + } + } + function isBuiltin(wat, className) { + return objectToString.call(wat) === `[object ${className}]`; + } + function isErrorEvent(wat) { + return isBuiltin(wat, "ErrorEvent"); + } + function isDOMError(wat) { + return isBuiltin(wat, "DOMError"); + } + function isDOMException(wat) { + return isBuiltin(wat, "DOMException"); + } + function isString(wat) { + return isBuiltin(wat, "String"); + } + function isParameterizedString(wat) { + return typeof wat == "object" && wat !== null && "__sentry_template_string__" in wat && "__sentry_template_values__" in wat; + } + function isPrimitive(wat) { + return wat === null || isParameterizedString(wat) || typeof wat != "object" && typeof wat != "function"; + } + function isPlainObject(wat) { + return isBuiltin(wat, "Object"); + } + function isEvent(wat) { + return typeof Event < "u" && isInstanceOf(wat, Event); + } + function isElement(wat) { + return typeof Element < "u" && isInstanceOf(wat, Element); + } + function isRegExp(wat) { + return isBuiltin(wat, "RegExp"); + } + function isThenable(wat) { + return !!(wat && wat.then && typeof wat.then == "function"); + } + function isSyntheticEvent(wat) { + return isPlainObject(wat) && "nativeEvent" in wat && "preventDefault" in wat && "stopPropagation" in wat; + } + function isInstanceOf(wat, base) { + try { + return wat instanceof base; + } catch { + return !1; + } + } + function isVueViewModel(wat) { + return !!(typeof wat == "object" && wat !== null && (wat.__isVue || wat._isVue)); + } + exports.isDOMError = isDOMError; + exports.isDOMException = isDOMException; + exports.isElement = isElement; + exports.isError = isError; + exports.isErrorEvent = isErrorEvent; + exports.isEvent = isEvent; + exports.isInstanceOf = isInstanceOf; + exports.isParameterizedString = isParameterizedString; + exports.isPlainObject = isPlainObject; + exports.isPrimitive = isPrimitive; + exports.isRegExp = isRegExp; + exports.isString = isString; + exports.isSyntheticEvent = isSyntheticEvent; + exports.isThenable = isThenable; + exports.isVueViewModel = isVueViewModel; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/string.js +var require_string = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/string.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var is = require_is(); + function truncate(str, max = 0) { + return typeof str != "string" || max === 0 || str.length <= max ? str : `${str.slice(0, max)}...`; + } + function snipLine(line, colno) { + let newLine = line, lineLength = newLine.length; + if (lineLength <= 150) + return newLine; + colno > lineLength && (colno = lineLength); + let start = Math.max(colno - 60, 0); + start < 5 && (start = 0); + let end = Math.min(start + 140, lineLength); + return end > lineLength - 5 && (end = lineLength), end === lineLength && (start = Math.max(end - 140, 0)), newLine = newLine.slice(start, end), start > 0 && (newLine = `'{snip} ${newLine}`), end < lineLength && (newLine += " {snip}"), newLine; + } + function safeJoin(input, delimiter) { + if (!Array.isArray(input)) + return ""; + let output = []; + for (let i = 0; i < input.length; i++) { + let value = input[i]; + try { + is.isVueViewModel(value) ? output.push("[VueViewModel]") : output.push(String(value)); + } catch { + output.push("[value cannot be serialized]"); + } + } + return output.join(delimiter); + } + function isMatchingPattern(value, pattern, requireExactStringMatch = !1) { + return is.isString(value) ? is.isRegExp(pattern) ? pattern.test(value) : is.isString(pattern) ? requireExactStringMatch ? value === pattern : value.includes(pattern) : !1 : !1; + } + function stringMatchesSomePattern(testString, patterns = [], requireExactStringMatch = !1) { + return patterns.some((pattern) => isMatchingPattern(testString, pattern, requireExactStringMatch)); + } + exports.isMatchingPattern = isMatchingPattern; + exports.safeJoin = safeJoin; + exports.snipLine = snipLine; + exports.stringMatchesSomePattern = stringMatchesSomePattern; + exports.truncate = truncate; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/aggregate-errors.js +var require_aggregate_errors = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/aggregate-errors.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var is = require_is(), string = require_string(); + function applyAggregateErrorsToEvent(exceptionFromErrorImplementation, parser, maxValueLimit = 250, key, limit, event, hint) { + if (!event.exception || !event.exception.values || !hint || !is.isInstanceOf(hint.originalException, Error)) + return; + let originalException = event.exception.values.length > 0 ? event.exception.values[event.exception.values.length - 1] : void 0; + originalException && (event.exception.values = truncateAggregateExceptions( + aggregateExceptionsFromError( + exceptionFromErrorImplementation, + parser, + limit, + hint.originalException, + key, + event.exception.values, + originalException, + 0 + ), + maxValueLimit + )); + } + function aggregateExceptionsFromError(exceptionFromErrorImplementation, parser, limit, error, key, prevExceptions, exception, exceptionId) { + if (prevExceptions.length >= limit + 1) + return prevExceptions; + let newExceptions = [...prevExceptions]; + if (is.isInstanceOf(error[key], Error)) { + applyExceptionGroupFieldsForParentException(exception, exceptionId); + let newException = exceptionFromErrorImplementation(parser, error[key]), newExceptionId = newExceptions.length; + applyExceptionGroupFieldsForChildException(newException, key, newExceptionId, exceptionId), newExceptions = aggregateExceptionsFromError( + exceptionFromErrorImplementation, + parser, + limit, + error[key], + key, + [newException, ...newExceptions], + newException, + newExceptionId + ); + } + return Array.isArray(error.errors) && error.errors.forEach((childError, i) => { + if (is.isInstanceOf(childError, Error)) { + applyExceptionGroupFieldsForParentException(exception, exceptionId); + let newException = exceptionFromErrorImplementation(parser, childError), newExceptionId = newExceptions.length; + applyExceptionGroupFieldsForChildException(newException, `errors[${i}]`, newExceptionId, exceptionId), newExceptions = aggregateExceptionsFromError( + exceptionFromErrorImplementation, + parser, + limit, + childError, + key, + [newException, ...newExceptions], + newException, + newExceptionId + ); + } + }), newExceptions; + } + function applyExceptionGroupFieldsForParentException(exception, exceptionId) { + exception.mechanism = exception.mechanism || { type: "generic", handled: !0 }, exception.mechanism = { + ...exception.mechanism, + ...exception.type === "AggregateError" && { is_exception_group: !0 }, + exception_id: exceptionId + }; + } + function applyExceptionGroupFieldsForChildException(exception, source, exceptionId, parentId) { + exception.mechanism = exception.mechanism || { type: "generic", handled: !0 }, exception.mechanism = { + ...exception.mechanism, + type: "chained", + source, + exception_id: exceptionId, + parent_id: parentId + }; + } + function truncateAggregateExceptions(exceptions, maxValueLength) { + return exceptions.map((exception) => (exception.value && (exception.value = string.truncate(exception.value, maxValueLength)), exception)); + } + exports.applyAggregateErrorsToEvent = applyAggregateErrorsToEvent; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/array.js +var require_array = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/array.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function flatten(input) { + let result = [], flattenHelper = (input2) => { + input2.forEach((el) => { + Array.isArray(el) ? flattenHelper(el) : result.push(el); + }); + }; + return flattenHelper(input), result; + } + exports.flatten = flatten; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/version.js +var require_version = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/version.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var SDK_VERSION = "8.9.2"; + exports.SDK_VERSION = SDK_VERSION; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/worldwide.js +var require_worldwide = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/worldwide.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var version = require_version(), GLOBAL_OBJ = globalThis; + function getGlobalSingleton(name, creator, obj) { + let gbl = obj || GLOBAL_OBJ, __SENTRY__ = gbl.__SENTRY__ = gbl.__SENTRY__ || {}, versionedCarrier = __SENTRY__[version.SDK_VERSION] = __SENTRY__[version.SDK_VERSION] || {}; + return versionedCarrier[name] || (versionedCarrier[name] = creator()); + } + exports.GLOBAL_OBJ = GLOBAL_OBJ; + exports.getGlobalSingleton = getGlobalSingleton; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/browser.js +var require_browser = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/browser.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var is = require_is(), worldwide = require_worldwide(), WINDOW = worldwide.GLOBAL_OBJ, DEFAULT_MAX_STRING_LENGTH = 80; + function htmlTreeAsString(elem, options = {}) { + if (!elem) + return ""; + try { + let currentElem = elem, MAX_TRAVERSE_HEIGHT = 5, out = [], height = 0, len = 0, separator = " > ", sepLength = separator.length, nextStr, keyAttrs = Array.isArray(options) ? options : options.keyAttrs, maxStringLength = !Array.isArray(options) && options.maxStringLength || DEFAULT_MAX_STRING_LENGTH; + for (; currentElem && height++ < MAX_TRAVERSE_HEIGHT && (nextStr = _htmlElementAsString(currentElem, keyAttrs), !(nextStr === "html" || height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength)); ) + out.push(nextStr), len += nextStr.length, currentElem = currentElem.parentNode; + return out.reverse().join(separator); + } catch { + return ""; + } + } + function _htmlElementAsString(el, keyAttrs) { + let elem = el, out = [], className, classes, key, attr, i; + if (!elem || !elem.tagName) + return ""; + if (WINDOW.HTMLElement && elem instanceof HTMLElement && elem.dataset) { + if (elem.dataset.sentryComponent) + return elem.dataset.sentryComponent; + if (elem.dataset.sentryElement) + return elem.dataset.sentryElement; + } + out.push(elem.tagName.toLowerCase()); + let keyAttrPairs = keyAttrs && keyAttrs.length ? keyAttrs.filter((keyAttr) => elem.getAttribute(keyAttr)).map((keyAttr) => [keyAttr, elem.getAttribute(keyAttr)]) : null; + if (keyAttrPairs && keyAttrPairs.length) + keyAttrPairs.forEach((keyAttrPair) => { + out.push(`[${keyAttrPair[0]}="${keyAttrPair[1]}"]`); + }); + else if (elem.id && out.push(`#${elem.id}`), className = elem.className, className && is.isString(className)) + for (classes = className.split(/\s+/), i = 0; i < classes.length; i++) + out.push(`.${classes[i]}`); + let allowedAttrs = ["aria-label", "type", "name", "title", "alt"]; + for (i = 0; i < allowedAttrs.length; i++) + key = allowedAttrs[i], attr = elem.getAttribute(key), attr && out.push(`[${key}="${attr}"]`); + return out.join(""); + } + function getLocationHref() { + try { + return WINDOW.document.location.href; + } catch { + return ""; + } + } + function getDomElement(selector) { + return WINDOW.document && WINDOW.document.querySelector ? WINDOW.document.querySelector(selector) : null; + } + function getComponentName(elem) { + if (!WINDOW.HTMLElement) + return null; + let currentElem = elem, MAX_TRAVERSE_HEIGHT = 5; + for (let i = 0; i < MAX_TRAVERSE_HEIGHT; i++) { + if (!currentElem) + return null; + if (currentElem instanceof HTMLElement) { + if (currentElem.dataset.sentryComponent) + return currentElem.dataset.sentryComponent; + if (currentElem.dataset.sentryElement) + return currentElem.dataset.sentryElement; + } + currentElem = currentElem.parentNode; + } + return null; + } + exports.getComponentName = getComponentName; + exports.getDomElement = getDomElement; + exports.getLocationHref = getLocationHref; + exports.htmlTreeAsString = htmlTreeAsString; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/debug-build.js +var require_debug_build = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/debug-build.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var DEBUG_BUILD = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__; + exports.DEBUG_BUILD = DEBUG_BUILD; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/logger.js +var require_logger = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/logger.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var debugBuild = require_debug_build(), worldwide = require_worldwide(), PREFIX = "Sentry Logger ", CONSOLE_LEVELS = [ + "debug", + "info", + "warn", + "error", + "log", + "assert", + "trace" + ], originalConsoleMethods = {}; + function consoleSandbox(callback) { + if (!("console" in worldwide.GLOBAL_OBJ)) + return callback(); + let console2 = worldwide.GLOBAL_OBJ.console, wrappedFuncs = {}, wrappedLevels = Object.keys(originalConsoleMethods); + wrappedLevels.forEach((level) => { + let originalConsoleMethod = originalConsoleMethods[level]; + wrappedFuncs[level] = console2[level], console2[level] = originalConsoleMethod; + }); + try { + return callback(); + } finally { + wrappedLevels.forEach((level) => { + console2[level] = wrappedFuncs[level]; + }); + } + } + function makeLogger() { + let enabled = !1, logger2 = { + enable: () => { + enabled = !0; + }, + disable: () => { + enabled = !1; + }, + isEnabled: () => enabled + }; + return debugBuild.DEBUG_BUILD ? CONSOLE_LEVELS.forEach((name) => { + logger2[name] = (...args) => { + enabled && consoleSandbox(() => { + worldwide.GLOBAL_OBJ.console[name](`${PREFIX}[${name}]:`, ...args); + }); + }; + }) : CONSOLE_LEVELS.forEach((name) => { + logger2[name] = () => { + }; + }), logger2; + } + var logger = makeLogger(); + exports.CONSOLE_LEVELS = CONSOLE_LEVELS; + exports.consoleSandbox = consoleSandbox; + exports.logger = logger; + exports.originalConsoleMethods = originalConsoleMethods; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/dsn.js +var require_dsn = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/dsn.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var debugBuild = require_debug_build(), logger = require_logger(), DSN_REGEX = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/; + function isValidProtocol(protocol) { + return protocol === "http" || protocol === "https"; + } + function dsnToString(dsn, withPassword = !1) { + let { host, path, pass, port, projectId, protocol, publicKey } = dsn; + return `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ""}@${host}${port ? `:${port}` : ""}/${path && `${path}/`}${projectId}`; + } + function dsnFromString(str) { + let match = DSN_REGEX.exec(str); + if (!match) { + logger.consoleSandbox(() => { + console.error(`Invalid Sentry Dsn: ${str}`); + }); + return; + } + let [protocol, publicKey, pass = "", host, port = "", lastPath] = match.slice(1), path = "", projectId = lastPath, split = projectId.split("/"); + if (split.length > 1 && (path = split.slice(0, -1).join("/"), projectId = split.pop()), projectId) { + let projectMatch = projectId.match(/^\d+/); + projectMatch && (projectId = projectMatch[0]); + } + return dsnFromComponents({ host, pass, path, projectId, port, protocol, publicKey }); + } + function dsnFromComponents(components) { + return { + protocol: components.protocol, + publicKey: components.publicKey || "", + pass: components.pass || "", + host: components.host, + port: components.port || "", + path: components.path || "", + projectId: components.projectId + }; + } + function validateDsn(dsn) { + if (!debugBuild.DEBUG_BUILD) + return !0; + let { port, projectId, protocol } = dsn; + return ["protocol", "publicKey", "host", "projectId"].find((component) => dsn[component] ? !1 : (logger.logger.error(`Invalid Sentry Dsn: ${component} missing`), !0)) ? !1 : projectId.match(/^\d+$/) ? isValidProtocol(protocol) ? port && isNaN(parseInt(port, 10)) ? (logger.logger.error(`Invalid Sentry Dsn: Invalid port ${port}`), !1) : !0 : (logger.logger.error(`Invalid Sentry Dsn: Invalid protocol ${protocol}`), !1) : (logger.logger.error(`Invalid Sentry Dsn: Invalid projectId ${projectId}`), !1); + } + function makeDsn(from) { + let components = typeof from == "string" ? dsnFromString(from) : dsnFromComponents(from); + if (!(!components || !validateDsn(components))) + return components; + } + exports.dsnFromString = dsnFromString; + exports.dsnToString = dsnToString; + exports.makeDsn = makeDsn; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/error.js +var require_error = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/error.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var SentryError = class extends Error { + /** Display name of this error instance. */ + constructor(message, logLevel = "warn") { + super(message), this.message = message, this.name = new.target.prototype.constructor.name, Object.setPrototypeOf(this, new.target.prototype), this.logLevel = logLevel; + } + }; + exports.SentryError = SentryError; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/object.js +var require_object = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/object.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var browser = require_browser(), debugBuild = require_debug_build(), is = require_is(), logger = require_logger(), string = require_string(); + function fill(source, name, replacementFactory) { + if (!(name in source)) + return; + let original = source[name], wrapped = replacementFactory(original); + typeof wrapped == "function" && markFunctionWrapped(wrapped, original), source[name] = wrapped; + } + function addNonEnumerableProperty(obj, name, value) { + try { + Object.defineProperty(obj, name, { + // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it + value, + writable: !0, + configurable: !0 + }); + } catch { + debugBuild.DEBUG_BUILD && logger.logger.log(`Failed to add non-enumerable property "${name}" to object`, obj); + } + } + function markFunctionWrapped(wrapped, original) { + try { + let proto = original.prototype || {}; + wrapped.prototype = original.prototype = proto, addNonEnumerableProperty(wrapped, "__sentry_original__", original); + } catch { + } + } + function getOriginalFunction(func) { + return func.__sentry_original__; + } + function urlEncode(object) { + return Object.keys(object).map((key) => `${encodeURIComponent(key)}=${encodeURIComponent(object[key])}`).join("&"); + } + function convertToPlainObject(value) { + if (is.isError(value)) + return { + message: value.message, + name: value.name, + stack: value.stack, + ...getOwnProperties(value) + }; + if (is.isEvent(value)) { + let newObj = { + type: value.type, + target: serializeEventTarget(value.target), + currentTarget: serializeEventTarget(value.currentTarget), + ...getOwnProperties(value) + }; + return typeof CustomEvent < "u" && is.isInstanceOf(value, CustomEvent) && (newObj.detail = value.detail), newObj; + } else + return value; + } + function serializeEventTarget(target) { + try { + return is.isElement(target) ? browser.htmlTreeAsString(target) : Object.prototype.toString.call(target); + } catch { + return ""; + } + } + function getOwnProperties(obj) { + if (typeof obj == "object" && obj !== null) { + let extractedProps = {}; + for (let property in obj) + Object.prototype.hasOwnProperty.call(obj, property) && (extractedProps[property] = obj[property]); + return extractedProps; + } else + return {}; + } + function extractExceptionKeysForMessage(exception, maxLength = 40) { + let keys = Object.keys(convertToPlainObject(exception)); + if (keys.sort(), !keys.length) + return "[object has no keys]"; + if (keys[0].length >= maxLength) + return string.truncate(keys[0], maxLength); + for (let includedKeys = keys.length; includedKeys > 0; includedKeys--) { + let serialized = keys.slice(0, includedKeys).join(", "); + if (!(serialized.length > maxLength)) + return includedKeys === keys.length ? serialized : string.truncate(serialized, maxLength); + } + return ""; + } + function dropUndefinedKeys(inputValue) { + return _dropUndefinedKeys(inputValue, /* @__PURE__ */ new Map()); + } + function _dropUndefinedKeys(inputValue, memoizationMap) { + if (isPojo(inputValue)) { + let memoVal = memoizationMap.get(inputValue); + if (memoVal !== void 0) + return memoVal; + let returnValue = {}; + memoizationMap.set(inputValue, returnValue); + for (let key of Object.keys(inputValue)) + typeof inputValue[key] < "u" && (returnValue[key] = _dropUndefinedKeys(inputValue[key], memoizationMap)); + return returnValue; + } + if (Array.isArray(inputValue)) { + let memoVal = memoizationMap.get(inputValue); + if (memoVal !== void 0) + return memoVal; + let returnValue = []; + return memoizationMap.set(inputValue, returnValue), inputValue.forEach((item) => { + returnValue.push(_dropUndefinedKeys(item, memoizationMap)); + }), returnValue; + } + return inputValue; + } + function isPojo(input) { + if (!is.isPlainObject(input)) + return !1; + try { + let name = Object.getPrototypeOf(input).constructor.name; + return !name || name === "Object"; + } catch { + return !0; + } + } + function objectify(wat) { + let objectified; + switch (!0) { + case wat == null: + objectified = new String(wat); + break; + // Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason + // those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as + // an object in order to wrap it. + case (typeof wat == "symbol" || typeof wat == "bigint"): + objectified = Object(wat); + break; + // this will catch the remaining primitives: `String`, `Number`, and `Boolean` + case is.isPrimitive(wat): + objectified = new wat.constructor(wat); + break; + // by process of elimination, at this point we know that `wat` must already be an object + default: + objectified = wat; + break; + } + return objectified; + } + exports.addNonEnumerableProperty = addNonEnumerableProperty; + exports.convertToPlainObject = convertToPlainObject; + exports.dropUndefinedKeys = dropUndefinedKeys; + exports.extractExceptionKeysForMessage = extractExceptionKeysForMessage; + exports.fill = fill; + exports.getOriginalFunction = getOriginalFunction; + exports.markFunctionWrapped = markFunctionWrapped; + exports.objectify = objectify; + exports.urlEncode = urlEncode; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/stacktrace.js +var require_stacktrace = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/stacktrace.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var STACKTRACE_FRAME_LIMIT = 50, UNKNOWN_FUNCTION = "?", WEBPACK_ERROR_REGEXP = /\(error: (.*)\)/, STRIP_FRAME_REGEXP = /captureMessage|captureException/; + function createStackParser(...parsers) { + let sortedParsers = parsers.sort((a, b) => a[0] - b[0]).map((p) => p[1]); + return (stack, skipFirstLines = 0, framesToPop = 0) => { + let frames = [], lines = stack.split(` +`); + for (let i = skipFirstLines; i < lines.length; i++) { + let line = lines[i]; + if (line.length > 1024) + continue; + let cleanedLine = WEBPACK_ERROR_REGEXP.test(line) ? line.replace(WEBPACK_ERROR_REGEXP, "$1") : line; + if (!cleanedLine.match(/\S*Error: /)) { + for (let parser of sortedParsers) { + let frame = parser(cleanedLine); + if (frame) { + frames.push(frame); + break; + } + } + if (frames.length >= STACKTRACE_FRAME_LIMIT + framesToPop) + break; + } + } + return stripSentryFramesAndReverse(frames.slice(framesToPop)); + }; + } + function stackParserFromStackParserOptions(stackParser) { + return Array.isArray(stackParser) ? createStackParser(...stackParser) : stackParser; + } + function stripSentryFramesAndReverse(stack) { + if (!stack.length) + return []; + let localStack = Array.from(stack); + return /sentryWrapped/.test(localStack[localStack.length - 1].function || "") && localStack.pop(), localStack.reverse(), STRIP_FRAME_REGEXP.test(localStack[localStack.length - 1].function || "") && (localStack.pop(), STRIP_FRAME_REGEXP.test(localStack[localStack.length - 1].function || "") && localStack.pop()), localStack.slice(0, STACKTRACE_FRAME_LIMIT).map((frame) => ({ + ...frame, + filename: frame.filename || localStack[localStack.length - 1].filename, + function: frame.function || UNKNOWN_FUNCTION + })); + } + var defaultFunctionName = ""; + function getFunctionName(fn) { + try { + return !fn || typeof fn != "function" ? defaultFunctionName : fn.name || defaultFunctionName; + } catch { + return defaultFunctionName; + } + } + function getFramesFromEvent(event) { + let exception = event.exception; + if (exception) { + let frames = []; + try { + return exception.values.forEach((value) => { + value.stacktrace.frames && frames.push(...value.stacktrace.frames); + }), frames; + } catch { + return; + } + } + } + exports.UNKNOWN_FUNCTION = UNKNOWN_FUNCTION; + exports.createStackParser = createStackParser; + exports.getFramesFromEvent = getFramesFromEvent; + exports.getFunctionName = getFunctionName; + exports.stackParserFromStackParserOptions = stackParserFromStackParserOptions; + exports.stripSentryFramesAndReverse = stripSentryFramesAndReverse; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/handlers.js +var require_handlers = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/handlers.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var debugBuild = require_debug_build(), logger = require_logger(), stacktrace = require_stacktrace(), handlers = {}, instrumented = {}; + function addHandler(type, handler) { + handlers[type] = handlers[type] || [], handlers[type].push(handler); + } + function resetInstrumentationHandlers() { + Object.keys(handlers).forEach((key) => { + handlers[key] = void 0; + }); + } + function maybeInstrument(type, instrumentFn) { + instrumented[type] || (instrumentFn(), instrumented[type] = !0); + } + function triggerHandlers(type, data) { + let typeHandlers = type && handlers[type]; + if (typeHandlers) + for (let handler of typeHandlers) + try { + handler(data); + } catch (e) { + debugBuild.DEBUG_BUILD && logger.logger.error( + `Error while triggering instrumentation handler. +Type: ${type} +Name: ${stacktrace.getFunctionName(handler)} +Error:`, + e + ); + } + } + exports.addHandler = addHandler; + exports.maybeInstrument = maybeInstrument; + exports.resetInstrumentationHandlers = resetInstrumentationHandlers; + exports.triggerHandlers = triggerHandlers; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/console.js +var require_console = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/console.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var logger = require_logger(), object = require_object(), worldwide = require_worldwide(), handlers = require_handlers(); + function addConsoleInstrumentationHandler(handler) { + let type = "console"; + handlers.addHandler(type, handler), handlers.maybeInstrument(type, instrumentConsole); + } + function instrumentConsole() { + "console" in worldwide.GLOBAL_OBJ && logger.CONSOLE_LEVELS.forEach(function(level) { + level in worldwide.GLOBAL_OBJ.console && object.fill(worldwide.GLOBAL_OBJ.console, level, function(originalConsoleMethod) { + return logger.originalConsoleMethods[level] = originalConsoleMethod, function(...args) { + let handlerData = { args, level }; + handlers.triggerHandlers("console", handlerData); + let log = logger.originalConsoleMethods[level]; + log && log.apply(worldwide.GLOBAL_OBJ.console, args); + }; + }); + }); + } + exports.addConsoleInstrumentationHandler = addConsoleInstrumentationHandler; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/supports.js +var require_supports = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/supports.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var debugBuild = require_debug_build(), logger = require_logger(), worldwide = require_worldwide(), WINDOW = worldwide.GLOBAL_OBJ; + function supportsErrorEvent() { + try { + return new ErrorEvent(""), !0; + } catch { + return !1; + } + } + function supportsDOMError() { + try { + return new DOMError(""), !0; + } catch { + return !1; + } + } + function supportsDOMException() { + try { + return new DOMException(""), !0; + } catch { + return !1; + } + } + function supportsFetch() { + if (!("fetch" in WINDOW)) + return !1; + try { + return new Headers(), new Request("http://www.example.com"), new Response(), !0; + } catch { + return !1; + } + } + function isNativeFunction(func) { + return func && /^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(func.toString()); + } + function supportsNativeFetch() { + if (typeof EdgeRuntime == "string") + return !0; + if (!supportsFetch()) + return !1; + if (isNativeFunction(WINDOW.fetch)) + return !0; + let result = !1, doc = WINDOW.document; + if (doc && typeof doc.createElement == "function") + try { + let sandbox = doc.createElement("iframe"); + sandbox.hidden = !0, doc.head.appendChild(sandbox), sandbox.contentWindow && sandbox.contentWindow.fetch && (result = isNativeFunction(sandbox.contentWindow.fetch)), doc.head.removeChild(sandbox); + } catch (err) { + debugBuild.DEBUG_BUILD && logger.logger.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ", err); + } + return result; + } + function supportsReportingObserver() { + return "ReportingObserver" in WINDOW; + } + function supportsReferrerPolicy() { + if (!supportsFetch()) + return !1; + try { + return new Request("_", { + referrerPolicy: "origin" + }), !0; + } catch { + return !1; + } + } + exports.isNativeFunction = isNativeFunction; + exports.supportsDOMError = supportsDOMError; + exports.supportsDOMException = supportsDOMException; + exports.supportsErrorEvent = supportsErrorEvent; + exports.supportsFetch = supportsFetch; + exports.supportsNativeFetch = supportsNativeFetch; + exports.supportsReferrerPolicy = supportsReferrerPolicy; + exports.supportsReportingObserver = supportsReportingObserver; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/time.js +var require_time = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/time.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var worldwide = require_worldwide(), ONE_SECOND_IN_MS = 1e3; + function dateTimestampInSeconds() { + return Date.now() / ONE_SECOND_IN_MS; + } + function createUnixTimestampInSecondsFunc() { + let { performance } = worldwide.GLOBAL_OBJ; + if (!performance || !performance.now) + return dateTimestampInSeconds; + let approxStartingTimeOrigin = Date.now() - performance.now(), timeOrigin = performance.timeOrigin == null ? approxStartingTimeOrigin : performance.timeOrigin; + return () => (timeOrigin + performance.now()) / ONE_SECOND_IN_MS; + } + var timestampInSeconds = createUnixTimestampInSecondsFunc(); + exports._browserPerformanceTimeOriginMode = void 0; + var browserPerformanceTimeOrigin = (() => { + let { performance } = worldwide.GLOBAL_OBJ; + if (!performance || !performance.now) { + exports._browserPerformanceTimeOriginMode = "none"; + return; + } + let threshold = 3600 * 1e3, performanceNow = performance.now(), dateNow = Date.now(), timeOriginDelta = performance.timeOrigin ? Math.abs(performance.timeOrigin + performanceNow - dateNow) : threshold, timeOriginIsReliable = timeOriginDelta < threshold, navigationStart = performance.timing && performance.timing.navigationStart, navigationStartDelta = typeof navigationStart == "number" ? Math.abs(navigationStart + performanceNow - dateNow) : threshold, navigationStartIsReliable = navigationStartDelta < threshold; + return timeOriginIsReliable || navigationStartIsReliable ? timeOriginDelta <= navigationStartDelta ? (exports._browserPerformanceTimeOriginMode = "timeOrigin", performance.timeOrigin) : (exports._browserPerformanceTimeOriginMode = "navigationStart", navigationStart) : (exports._browserPerformanceTimeOriginMode = "dateNow", dateNow); + })(); + exports.browserPerformanceTimeOrigin = browserPerformanceTimeOrigin; + exports.dateTimestampInSeconds = dateTimestampInSeconds; + exports.timestampInSeconds = timestampInSeconds; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/fetch.js +var require_fetch = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/fetch.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var is = require_is(), object = require_object(), supports = require_supports(), time = require_time(), worldwide = require_worldwide(), handlers = require_handlers(); + function addFetchInstrumentationHandler(handler) { + let type = "fetch"; + handlers.addHandler(type, handler), handlers.maybeInstrument(type, instrumentFetch); + } + function instrumentFetch() { + supports.supportsNativeFetch() && object.fill(worldwide.GLOBAL_OBJ, "fetch", function(originalFetch) { + return function(...args) { + let { method, url } = parseFetchArgs(args), handlerData = { + args, + fetchData: { + method, + url + }, + startTimestamp: time.timestampInSeconds() * 1e3 + }; + handlers.triggerHandlers("fetch", { + ...handlerData + }); + let virtualStackTrace = new Error().stack; + return originalFetch.apply(worldwide.GLOBAL_OBJ, args).then( + (response) => { + let finishedHandlerData = { + ...handlerData, + endTimestamp: time.timestampInSeconds() * 1e3, + response + }; + return handlers.triggerHandlers("fetch", finishedHandlerData), response; + }, + (error) => { + let erroredHandlerData = { + ...handlerData, + endTimestamp: time.timestampInSeconds() * 1e3, + error + }; + throw handlers.triggerHandlers("fetch", erroredHandlerData), is.isError(error) && error.stack === void 0 && (error.stack = virtualStackTrace, object.addNonEnumerableProperty(error, "framesToPop", 1)), error; + } + ); + }; + }); + } + function hasProp(obj, prop) { + return !!obj && typeof obj == "object" && !!obj[prop]; + } + function getUrlFromResource(resource) { + return typeof resource == "string" ? resource : resource ? hasProp(resource, "url") ? resource.url : resource.toString ? resource.toString() : "" : ""; + } + function parseFetchArgs(fetchArgs) { + if (fetchArgs.length === 0) + return { method: "GET", url: "" }; + if (fetchArgs.length === 2) { + let [url, options] = fetchArgs; + return { + url: getUrlFromResource(url), + method: hasProp(options, "method") ? String(options.method).toUpperCase() : "GET" + }; + } + let arg = fetchArgs[0]; + return { + url: getUrlFromResource(arg), + method: hasProp(arg, "method") ? String(arg.method).toUpperCase() : "GET" + }; + } + exports.addFetchInstrumentationHandler = addFetchInstrumentationHandler; + exports.parseFetchArgs = parseFetchArgs; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/globalError.js +var require_globalError = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/globalError.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var worldwide = require_worldwide(), handlers = require_handlers(), _oldOnErrorHandler = null; + function addGlobalErrorInstrumentationHandler(handler) { + let type = "error"; + handlers.addHandler(type, handler), handlers.maybeInstrument(type, instrumentError); + } + function instrumentError() { + _oldOnErrorHandler = worldwide.GLOBAL_OBJ.onerror, worldwide.GLOBAL_OBJ.onerror = function(msg, url, line, column, error) { + let handlerData = { + column, + error, + line, + msg, + url + }; + return handlers.triggerHandlers("error", handlerData), _oldOnErrorHandler && !_oldOnErrorHandler.__SENTRY_LOADER__ ? _oldOnErrorHandler.apply(this, arguments) : !1; + }, worldwide.GLOBAL_OBJ.onerror.__SENTRY_INSTRUMENTED__ = !0; + } + exports.addGlobalErrorInstrumentationHandler = addGlobalErrorInstrumentationHandler; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/globalUnhandledRejection.js +var require_globalUnhandledRejection = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/instrument/globalUnhandledRejection.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var worldwide = require_worldwide(), handlers = require_handlers(), _oldOnUnhandledRejectionHandler = null; + function addGlobalUnhandledRejectionInstrumentationHandler(handler) { + let type = "unhandledrejection"; + handlers.addHandler(type, handler), handlers.maybeInstrument(type, instrumentUnhandledRejection); + } + function instrumentUnhandledRejection() { + _oldOnUnhandledRejectionHandler = worldwide.GLOBAL_OBJ.onunhandledrejection, worldwide.GLOBAL_OBJ.onunhandledrejection = function(e) { + let handlerData = e; + return handlers.triggerHandlers("unhandledrejection", handlerData), _oldOnUnhandledRejectionHandler && !_oldOnUnhandledRejectionHandler.__SENTRY_LOADER__ ? _oldOnUnhandledRejectionHandler.apply(this, arguments) : !0; + }, worldwide.GLOBAL_OBJ.onunhandledrejection.__SENTRY_INSTRUMENTED__ = !0; + } + exports.addGlobalUnhandledRejectionInstrumentationHandler = addGlobalUnhandledRejectionInstrumentationHandler; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/env.js +var require_env = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/env.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function isBrowserBundle() { + return typeof __SENTRY_BROWSER_BUNDLE__ < "u" && !!__SENTRY_BROWSER_BUNDLE__; + } + function getSDKSource() { + return "npm"; + } + exports.getSDKSource = getSDKSource; + exports.isBrowserBundle = isBrowserBundle; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/node.js +var require_node = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/node.js"(exports, module) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var env = require_env(); + function isNodeEnv() { + return !env.isBrowserBundle() && Object.prototype.toString.call(typeof process < "u" ? process : 0) === "[object process]"; + } + function dynamicRequire(mod, request) { + return mod.require(request); + } + function loadModule(moduleName) { + let mod; + try { + mod = dynamicRequire(module, moduleName); + } catch { + } + try { + let { cwd } = dynamicRequire(module, "process"); + mod = dynamicRequire(module, `${cwd()}/node_modules/${moduleName}`); + } catch { + } + return mod; + } + exports.dynamicRequire = dynamicRequire; + exports.isNodeEnv = isNodeEnv; + exports.loadModule = loadModule; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/isBrowser.js +var require_isBrowser = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/isBrowser.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var node = require_node(), worldwide = require_worldwide(); + function isBrowser() { + return typeof window < "u" && (!node.isNodeEnv() || isElectronNodeRenderer()); + } + function isElectronNodeRenderer() { + return ( + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any + worldwide.GLOBAL_OBJ.process !== void 0 && worldwide.GLOBAL_OBJ.process.type === "renderer" + ); + } + exports.isBrowser = isBrowser; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/memo.js +var require_memo = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/memo.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function memoBuilder() { + let hasWeakSet = typeof WeakSet == "function", inner = hasWeakSet ? /* @__PURE__ */ new WeakSet() : []; + function memoize(obj) { + if (hasWeakSet) + return inner.has(obj) ? !0 : (inner.add(obj), !1); + for (let i = 0; i < inner.length; i++) + if (inner[i] === obj) + return !0; + return inner.push(obj), !1; + } + function unmemoize(obj) { + if (hasWeakSet) + inner.delete(obj); + else + for (let i = 0; i < inner.length; i++) + if (inner[i] === obj) { + inner.splice(i, 1); + break; + } + } + return [memoize, unmemoize]; + } + exports.memoBuilder = memoBuilder; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/misc.js +var require_misc = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/misc.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var object = require_object(), string = require_string(), worldwide = require_worldwide(); + function uuid4() { + let gbl = worldwide.GLOBAL_OBJ, crypto = gbl.crypto || gbl.msCrypto, getRandomByte = () => Math.random() * 16; + try { + if (crypto && crypto.randomUUID) + return crypto.randomUUID().replace(/-/g, ""); + crypto && crypto.getRandomValues && (getRandomByte = () => { + let typedArray = new Uint8Array(1); + return crypto.getRandomValues(typedArray), typedArray[0]; + }); + } catch { + } + return ("10000000100040008000" + 1e11).replace( + /[018]/g, + (c) => ( + // eslint-disable-next-line no-bitwise + (c ^ (getRandomByte() & 15) >> c / 4).toString(16) + ) + ); + } + function getFirstException(event) { + return event.exception && event.exception.values ? event.exception.values[0] : void 0; + } + function getEventDescription(event) { + let { message, event_id: eventId } = event; + if (message) + return message; + let firstException = getFirstException(event); + return firstException ? firstException.type && firstException.value ? `${firstException.type}: ${firstException.value}` : firstException.type || firstException.value || eventId || "" : eventId || ""; + } + function addExceptionTypeValue(event, value, type) { + let exception = event.exception = event.exception || {}, values = exception.values = exception.values || [], firstException = values[0] = values[0] || {}; + firstException.value || (firstException.value = value || ""), firstException.type || (firstException.type = type || "Error"); + } + function addExceptionMechanism(event, newMechanism) { + let firstException = getFirstException(event); + if (!firstException) + return; + let defaultMechanism = { type: "generic", handled: !0 }, currentMechanism = firstException.mechanism; + if (firstException.mechanism = { ...defaultMechanism, ...currentMechanism, ...newMechanism }, newMechanism && "data" in newMechanism) { + let mergedData = { ...currentMechanism && currentMechanism.data, ...newMechanism.data }; + firstException.mechanism.data = mergedData; + } + } + var SEMVER_REGEXP = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/; + function parseSemver(input) { + let match = input.match(SEMVER_REGEXP) || [], major = parseInt(match[1], 10), minor = parseInt(match[2], 10), patch = parseInt(match[3], 10); + return { + buildmetadata: match[5], + major: isNaN(major) ? void 0 : major, + minor: isNaN(minor) ? void 0 : minor, + patch: isNaN(patch) ? void 0 : patch, + prerelease: match[4] + }; + } + function addContextToFrame(lines, frame, linesOfContext = 5) { + if (frame.lineno === void 0) + return; + let maxLines = lines.length, sourceLine = Math.max(Math.min(maxLines - 1, frame.lineno - 1), 0); + frame.pre_context = lines.slice(Math.max(0, sourceLine - linesOfContext), sourceLine).map((line) => string.snipLine(line, 0)), frame.context_line = string.snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0), frame.post_context = lines.slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext).map((line) => string.snipLine(line, 0)); + } + function checkOrSetAlreadyCaught(exception) { + if (exception && exception.__sentry_captured__) + return !0; + try { + object.addNonEnumerableProperty(exception, "__sentry_captured__", !0); + } catch { + } + return !1; + } + function arrayify(maybeArray) { + return Array.isArray(maybeArray) ? maybeArray : [maybeArray]; + } + exports.addContextToFrame = addContextToFrame; + exports.addExceptionMechanism = addExceptionMechanism; + exports.addExceptionTypeValue = addExceptionTypeValue; + exports.arrayify = arrayify; + exports.checkOrSetAlreadyCaught = checkOrSetAlreadyCaught; + exports.getEventDescription = getEventDescription; + exports.parseSemver = parseSemver; + exports.uuid4 = uuid4; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/normalize.js +var require_normalize = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/normalize.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var is = require_is(), memo = require_memo(), object = require_object(), stacktrace = require_stacktrace(); + function normalize(input, depth = 100, maxProperties = 1 / 0) { + try { + return visit("", input, depth, maxProperties); + } catch (err) { + return { ERROR: `**non-serializable** (${err})` }; + } + } + function normalizeToSize(object2, depth = 3, maxSize = 100 * 1024) { + let normalized = normalize(object2, depth); + return jsonSize(normalized) > maxSize ? normalizeToSize(object2, depth - 1, maxSize) : normalized; + } + function visit(key, value, depth = 1 / 0, maxProperties = 1 / 0, memo$1 = memo.memoBuilder()) { + let [memoize, unmemoize] = memo$1; + if (value == null || // this matches null and undefined -> eqeq not eqeqeq + ["number", "boolean", "string"].includes(typeof value) && !Number.isNaN(value)) + return value; + let stringified = stringifyValue(key, value); + if (!stringified.startsWith("[object ")) + return stringified; + if (value.__sentry_skip_normalization__) + return value; + let remainingDepth = typeof value.__sentry_override_normalization_depth__ == "number" ? value.__sentry_override_normalization_depth__ : depth; + if (remainingDepth === 0) + return stringified.replace("object ", ""); + if (memoize(value)) + return "[Circular ~]"; + let valueWithToJSON = value; + if (valueWithToJSON && typeof valueWithToJSON.toJSON == "function") + try { + let jsonValue = valueWithToJSON.toJSON(); + return visit("", jsonValue, remainingDepth - 1, maxProperties, memo$1); + } catch { + } + let normalized = Array.isArray(value) ? [] : {}, numAdded = 0, visitable = object.convertToPlainObject(value); + for (let visitKey in visitable) { + if (!Object.prototype.hasOwnProperty.call(visitable, visitKey)) + continue; + if (numAdded >= maxProperties) { + normalized[visitKey] = "[MaxProperties ~]"; + break; + } + let visitValue = visitable[visitKey]; + normalized[visitKey] = visit(visitKey, visitValue, remainingDepth - 1, maxProperties, memo$1), numAdded++; + } + return unmemoize(value), normalized; + } + function stringifyValue(key, value) { + try { + if (key === "domain" && value && typeof value == "object" && value._events) + return "[Domain]"; + if (key === "domainEmitter") + return "[DomainEmitter]"; + if (typeof global < "u" && value === global) + return "[Global]"; + if (typeof window < "u" && value === window) + return "[Window]"; + if (typeof document < "u" && value === document) + return "[Document]"; + if (is.isVueViewModel(value)) + return "[VueViewModel]"; + if (is.isSyntheticEvent(value)) + return "[SyntheticEvent]"; + if (typeof value == "number" && value !== value) + return "[NaN]"; + if (typeof value == "function") + return `[Function: ${stacktrace.getFunctionName(value)}]`; + if (typeof value == "symbol") + return `[${String(value)}]`; + if (typeof value == "bigint") + return `[BigInt: ${String(value)}]`; + let objName = getConstructorName(value); + return /^HTML(\w*)Element$/.test(objName) ? `[HTMLElement: ${objName}]` : `[object ${objName}]`; + } catch (err) { + return `**non-serializable** (${err})`; + } + } + function getConstructorName(value) { + let prototype = Object.getPrototypeOf(value); + return prototype ? prototype.constructor.name : "null prototype"; + } + function utf8Length(value) { + return ~-encodeURI(value).split(/%..|./).length; + } + function jsonSize(value) { + return utf8Length(JSON.stringify(value)); + } + function normalizeUrlToBase(url, basePath) { + let escapedBase = basePath.replace(/\\/g, "/").replace(/[|\\{}()[\]^$+*?.]/g, "\\$&"), newUrl = url; + try { + newUrl = decodeURI(url); + } catch { + } + return newUrl.replace(/\\/g, "/").replace(/webpack:\/?/g, "").replace(new RegExp(`(file://)?/*${escapedBase}/*`, "ig"), "app:///"); + } + exports.normalize = normalize; + exports.normalizeToSize = normalizeToSize; + exports.normalizeUrlToBase = normalizeUrlToBase; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/path.js +var require_path = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/path.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function normalizeArray(parts, allowAboveRoot) { + let up = 0; + for (let i = parts.length - 1; i >= 0; i--) { + let last = parts[i]; + last === "." ? parts.splice(i, 1) : last === ".." ? (parts.splice(i, 1), up++) : up && (parts.splice(i, 1), up--); + } + if (allowAboveRoot) + for (; up--; up) + parts.unshift(".."); + return parts; + } + var splitPathRe = /^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/; + function splitPath(filename) { + let truncated = filename.length > 1024 ? `${filename.slice(-1024)}` : filename, parts = splitPathRe.exec(truncated); + return parts ? parts.slice(1) : []; + } + function resolve(...args) { + let resolvedPath = "", resolvedAbsolute = !1; + for (let i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) { + let path = i >= 0 ? args[i] : "/"; + path && (resolvedPath = `${path}/${resolvedPath}`, resolvedAbsolute = path.charAt(0) === "/"); + } + return resolvedPath = normalizeArray( + resolvedPath.split("/").filter((p) => !!p), + !resolvedAbsolute + ).join("/"), (resolvedAbsolute ? "/" : "") + resolvedPath || "."; + } + function trim(arr) { + let start = 0; + for (; start < arr.length && arr[start] === ""; start++) + ; + let end = arr.length - 1; + for (; end >= 0 && arr[end] === ""; end--) + ; + return start > end ? [] : arr.slice(start, end - start + 1); + } + function relative(from, to) { + from = resolve(from).slice(1), to = resolve(to).slice(1); + let fromParts = trim(from.split("/")), toParts = trim(to.split("/")), length = Math.min(fromParts.length, toParts.length), samePartsLength = length; + for (let i = 0; i < length; i++) + if (fromParts[i] !== toParts[i]) { + samePartsLength = i; + break; + } + let outputParts = []; + for (let i = samePartsLength; i < fromParts.length; i++) + outputParts.push(".."); + return outputParts = outputParts.concat(toParts.slice(samePartsLength)), outputParts.join("/"); + } + function normalizePath(path) { + let isPathAbsolute = isAbsolute(path), trailingSlash = path.slice(-1) === "/", normalizedPath = normalizeArray( + path.split("/").filter((p) => !!p), + !isPathAbsolute + ).join("/"); + return !normalizedPath && !isPathAbsolute && (normalizedPath = "."), normalizedPath && trailingSlash && (normalizedPath += "/"), (isPathAbsolute ? "/" : "") + normalizedPath; + } + function isAbsolute(path) { + return path.charAt(0) === "/"; + } + function join(...args) { + return normalizePath(args.join("/")); + } + function dirname(path) { + let result = splitPath(path), root = result[0], dir = result[1]; + return !root && !dir ? "." : (dir && (dir = dir.slice(0, dir.length - 1)), root + dir); + } + function basename(path, ext) { + let f = splitPath(path)[2]; + return ext && f.slice(ext.length * -1) === ext && (f = f.slice(0, f.length - ext.length)), f; + } + exports.basename = basename; + exports.dirname = dirname; + exports.isAbsolute = isAbsolute; + exports.join = join; + exports.normalizePath = normalizePath; + exports.relative = relative; + exports.resolve = resolve; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/syncpromise.js +var require_syncpromise = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/syncpromise.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var is = require_is(), States; + (function(States2) { + States2[States2.PENDING = 0] = "PENDING"; + let RESOLVED = 1; + States2[States2.RESOLVED = RESOLVED] = "RESOLVED"; + let REJECTED = 2; + States2[States2.REJECTED = REJECTED] = "REJECTED"; + })(States || (States = {})); + function resolvedSyncPromise(value) { + return new SyncPromise((resolve) => { + resolve(value); + }); + } + function rejectedSyncPromise(reason) { + return new SyncPromise((_, reject) => { + reject(reason); + }); + } + var SyncPromise = class _SyncPromise { + constructor(executor) { + _SyncPromise.prototype.__init.call(this), _SyncPromise.prototype.__init2.call(this), _SyncPromise.prototype.__init3.call(this), _SyncPromise.prototype.__init4.call(this), this._state = States.PENDING, this._handlers = []; + try { + executor(this._resolve, this._reject); + } catch (e) { + this._reject(e); + } + } + /** JSDoc */ + then(onfulfilled, onrejected) { + return new _SyncPromise((resolve, reject) => { + this._handlers.push([ + !1, + (result) => { + if (!onfulfilled) + resolve(result); + else + try { + resolve(onfulfilled(result)); + } catch (e) { + reject(e); + } + }, + (reason) => { + if (!onrejected) + reject(reason); + else + try { + resolve(onrejected(reason)); + } catch (e) { + reject(e); + } + } + ]), this._executeHandlers(); + }); + } + /** JSDoc */ + catch(onrejected) { + return this.then((val) => val, onrejected); + } + /** JSDoc */ + finally(onfinally) { + return new _SyncPromise((resolve, reject) => { + let val, isRejected; + return this.then( + (value) => { + isRejected = !1, val = value, onfinally && onfinally(); + }, + (reason) => { + isRejected = !0, val = reason, onfinally && onfinally(); + } + ).then(() => { + if (isRejected) { + reject(val); + return; + } + resolve(val); + }); + }); + } + /** JSDoc */ + __init() { + this._resolve = (value) => { + this._setResult(States.RESOLVED, value); + }; + } + /** JSDoc */ + __init2() { + this._reject = (reason) => { + this._setResult(States.REJECTED, reason); + }; + } + /** JSDoc */ + __init3() { + this._setResult = (state, value) => { + if (this._state === States.PENDING) { + if (is.isThenable(value)) { + value.then(this._resolve, this._reject); + return; + } + this._state = state, this._value = value, this._executeHandlers(); + } + }; + } + /** JSDoc */ + __init4() { + this._executeHandlers = () => { + if (this._state === States.PENDING) + return; + let cachedHandlers = this._handlers.slice(); + this._handlers = [], cachedHandlers.forEach((handler) => { + handler[0] || (this._state === States.RESOLVED && handler[1](this._value), this._state === States.REJECTED && handler[2](this._value), handler[0] = !0); + }); + }; + } + }; + exports.SyncPromise = SyncPromise; + exports.rejectedSyncPromise = rejectedSyncPromise; + exports.resolvedSyncPromise = resolvedSyncPromise; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/promisebuffer.js +var require_promisebuffer = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/promisebuffer.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var error = require_error(), syncpromise = require_syncpromise(); + function makePromiseBuffer(limit) { + let buffer = []; + function isReady() { + return limit === void 0 || buffer.length < limit; + } + function remove(task) { + return buffer.splice(buffer.indexOf(task), 1)[0]; + } + function add(taskProducer) { + if (!isReady()) + return syncpromise.rejectedSyncPromise(new error.SentryError("Not adding Promise because buffer limit was reached.")); + let task = taskProducer(); + return buffer.indexOf(task) === -1 && buffer.push(task), task.then(() => remove(task)).then( + null, + () => remove(task).then(null, () => { + }) + ), task; + } + function drain(timeout) { + return new syncpromise.SyncPromise((resolve, reject) => { + let counter = buffer.length; + if (!counter) + return resolve(!0); + let capturedSetTimeout = setTimeout(() => { + timeout && timeout > 0 && resolve(!1); + }, timeout); + buffer.forEach((item) => { + syncpromise.resolvedSyncPromise(item).then(() => { + --counter || (clearTimeout(capturedSetTimeout), resolve(!0)); + }, reject); + }); + }); + } + return { + $: buffer, + add, + drain + }; + } + exports.makePromiseBuffer = makePromiseBuffer; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/cookie.js +var require_cookie = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/cookie.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function parseCookie(str) { + let obj = {}, index = 0; + for (; index < str.length; ) { + let eqIdx = str.indexOf("=", index); + if (eqIdx === -1) + break; + let endIdx = str.indexOf(";", index); + if (endIdx === -1) + endIdx = str.length; + else if (endIdx < eqIdx) { + index = str.lastIndexOf(";", eqIdx - 1) + 1; + continue; + } + let key = str.slice(index, eqIdx).trim(); + if (obj[key] === void 0) { + let val = str.slice(eqIdx + 1, endIdx).trim(); + val.charCodeAt(0) === 34 && (val = val.slice(1, -1)); + try { + obj[key] = val.indexOf("%") !== -1 ? decodeURIComponent(val) : val; + } catch { + obj[key] = val; + } + } + index = endIdx + 1; + } + return obj; + } + exports.parseCookie = parseCookie; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/url.js +var require_url = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/url.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function parseUrl(url) { + if (!url) + return {}; + let match = url.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/); + if (!match) + return {}; + let query = match[6] || "", fragment = match[8] || ""; + return { + host: match[4], + path: match[5], + protocol: match[2], + search: query, + hash: fragment, + relative: match[5] + query + fragment + // everything minus origin + }; + } + function stripUrlQueryAndFragment(urlPath) { + return urlPath.split(/[\?#]/, 1)[0]; + } + function getNumberOfUrlSegments(url) { + return url.split(/\\?\//).filter((s) => s.length > 0 && s !== ",").length; + } + function getSanitizedUrlString(url) { + let { protocol, host, path } = url, filteredHost = host && host.replace(/^.*@/, "[filtered]:[filtered]@").replace(/(:80)$/, "").replace(/(:443)$/, "") || ""; + return `${protocol ? `${protocol}://` : ""}${filteredHost}${path}`; + } + exports.getNumberOfUrlSegments = getNumberOfUrlSegments; + exports.getSanitizedUrlString = getSanitizedUrlString; + exports.parseUrl = parseUrl; + exports.stripUrlQueryAndFragment = stripUrlQueryAndFragment; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/requestdata.js +var require_requestdata = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/requestdata.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var cookie = require_cookie(), debugBuild = require_debug_build(), is = require_is(), logger = require_logger(), normalize = require_normalize(), url = require_url(), DEFAULT_INCLUDES = { + ip: !1, + request: !0, + transaction: !0, + user: !0 + }, DEFAULT_REQUEST_INCLUDES = ["cookies", "data", "headers", "method", "query_string", "url"], DEFAULT_USER_INCLUDES = ["id", "username", "email"]; + function extractPathForTransaction(req, options = {}) { + let method = req.method && req.method.toUpperCase(), path = "", source = "url"; + options.customRoute || req.route ? (path = options.customRoute || `${req.baseUrl || ""}${req.route && req.route.path}`, source = "route") : (req.originalUrl || req.url) && (path = url.stripUrlQueryAndFragment(req.originalUrl || req.url || "")); + let name = ""; + return options.method && method && (name += method), options.method && options.path && (name += " "), options.path && path && (name += path), [name, source]; + } + function extractTransaction(req, type) { + switch (type) { + case "path": + return extractPathForTransaction(req, { path: !0 })[0]; + case "handler": + return req.route && req.route.stack && req.route.stack[0] && req.route.stack[0].name || ""; + case "methodPath": + default: { + let customRoute = req._reconstructedRoute ? req._reconstructedRoute : void 0; + return extractPathForTransaction(req, { path: !0, method: !0, customRoute })[0]; + } + } + } + function extractUserData(user, keys) { + let extractedUser = {}; + return (Array.isArray(keys) ? keys : DEFAULT_USER_INCLUDES).forEach((key) => { + user && key in user && (extractedUser[key] = user[key]); + }), extractedUser; + } + function extractRequestData(req, options) { + let { include = DEFAULT_REQUEST_INCLUDES } = options || {}, requestData = {}, headers = req.headers || {}, method = req.method, host = headers.host || req.hostname || req.host || "", protocol = req.protocol === "https" || req.socket && req.socket.encrypted ? "https" : "http", originalUrl = req.originalUrl || req.url || "", absoluteUrl = originalUrl.startsWith(protocol) ? originalUrl : `${protocol}://${host}${originalUrl}`; + return include.forEach((key) => { + switch (key) { + case "headers": { + requestData.headers = headers, include.includes("cookies") || delete requestData.headers.cookie; + break; + } + case "method": { + requestData.method = method; + break; + } + case "url": { + requestData.url = absoluteUrl; + break; + } + case "cookies": { + requestData.cookies = // TODO (v8 / #5257): We're only sending the empty object for backwards compatibility, so the last bit can + // come off in v8 + req.cookies || headers.cookie && cookie.parseCookie(headers.cookie) || {}; + break; + } + case "query_string": { + requestData.query_string = extractQueryParams(req); + break; + } + case "data": { + if (method === "GET" || method === "HEAD") + break; + req.body !== void 0 && (requestData.data = is.isString(req.body) ? req.body : JSON.stringify(normalize.normalize(req.body))); + break; + } + default: + ({}).hasOwnProperty.call(req, key) && (requestData[key] = req[key]); + } + }), requestData; + } + function addRequestDataToEvent(event, req, options) { + let include = { + ...DEFAULT_INCLUDES, + ...options && options.include + }; + if (include.request) { + let extractedRequestData = Array.isArray(include.request) ? extractRequestData(req, { include: include.request }) : extractRequestData(req); + event.request = { + ...event.request, + ...extractedRequestData + }; + } + if (include.user) { + let extractedUser = req.user && is.isPlainObject(req.user) ? extractUserData(req.user, include.user) : {}; + Object.keys(extractedUser).length && (event.user = { + ...event.user, + ...extractedUser + }); + } + if (include.ip) { + let ip = req.ip || req.socket && req.socket.remoteAddress; + ip && (event.user = { + ...event.user, + ip_address: ip + }); + } + return include.transaction && !event.transaction && event.type === "transaction" && (event.transaction = extractTransaction(req, include.transaction)), event; + } + function extractQueryParams(req) { + let originalUrl = req.originalUrl || req.url || ""; + if (originalUrl) { + originalUrl.startsWith("/") && (originalUrl = `http://dogs.are.great${originalUrl}`); + try { + let queryParams = req.query || new URL(originalUrl).search.slice(1); + return queryParams.length ? queryParams : void 0; + } catch { + return; + } + } + } + function winterCGHeadersToDict(winterCGHeaders) { + let headers = {}; + try { + winterCGHeaders.forEach((value, key) => { + typeof value == "string" && (headers[key] = value); + }); + } catch { + debugBuild.DEBUG_BUILD && logger.logger.warn("Sentry failed extracting headers from a request object. If you see this, please file an issue."); + } + return headers; + } + function winterCGRequestToRequestData(req) { + let headers = winterCGHeadersToDict(req.headers); + return { + method: req.method, + url: req.url, + headers + }; + } + exports.DEFAULT_USER_INCLUDES = DEFAULT_USER_INCLUDES; + exports.addRequestDataToEvent = addRequestDataToEvent; + exports.extractPathForTransaction = extractPathForTransaction; + exports.extractRequestData = extractRequestData; + exports.winterCGHeadersToDict = winterCGHeadersToDict; + exports.winterCGRequestToRequestData = winterCGRequestToRequestData; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/severity.js +var require_severity = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/severity.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var validSeverityLevels = ["fatal", "error", "warning", "log", "info", "debug"]; + function severityLevelFromString(level) { + return level === "warn" ? "warning" : validSeverityLevels.includes(level) ? level : "log"; + } + exports.severityLevelFromString = severityLevelFromString; + exports.validSeverityLevels = validSeverityLevels; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/node-stack-trace.js +var require_node_stack_trace = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/node-stack-trace.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var stacktrace = require_stacktrace(); + function filenameIsInApp(filename, isNative = !1) { + return !(isNative || filename && // It's not internal if it's an absolute linux path + !filename.startsWith("/") && // It's not internal if it's an absolute windows path + !filename.match(/^[A-Z]:/) && // It's not internal if the path is starting with a dot + !filename.startsWith(".") && // It's not internal if the frame has a protocol. In node, this is usually the case if the file got pre-processed with a bundler like webpack + !filename.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//)) && filename !== void 0 && !filename.includes("node_modules/"); + } + function node(getModule) { + let FILENAME_MATCH = /^\s*[-]{4,}$/, FULL_MATCH = /at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/; + return (line) => { + let lineMatch = line.match(FULL_MATCH); + if (lineMatch) { + let object, method, functionName, typeName, methodName; + if (lineMatch[1]) { + functionName = lineMatch[1]; + let methodStart = functionName.lastIndexOf("."); + if (functionName[methodStart - 1] === "." && methodStart--, methodStart > 0) { + object = functionName.slice(0, methodStart), method = functionName.slice(methodStart + 1); + let objectEnd = object.indexOf(".Module"); + objectEnd > 0 && (functionName = functionName.slice(objectEnd + 1), object = object.slice(0, objectEnd)); + } + typeName = void 0; + } + method && (typeName = object, methodName = method), method === "" && (methodName = void 0, functionName = void 0), functionName === void 0 && (methodName = methodName || stacktrace.UNKNOWN_FUNCTION, functionName = typeName ? `${typeName}.${methodName}` : methodName); + let filename = lineMatch[2] && lineMatch[2].startsWith("file://") ? lineMatch[2].slice(7) : lineMatch[2], isNative = lineMatch[5] === "native"; + return filename && filename.match(/\/[A-Z]:/) && (filename = filename.slice(1)), !filename && lineMatch[5] && !isNative && (filename = lineMatch[5]), { + filename, + module: getModule ? getModule(filename) : void 0, + function: functionName, + lineno: parseInt(lineMatch[3], 10) || void 0, + colno: parseInt(lineMatch[4], 10) || void 0, + in_app: filenameIsInApp(filename, isNative) + }; + } + if (line.match(FILENAME_MATCH)) + return { + filename: line + }; + }; + } + function nodeStackLineParser(getModule) { + return [90, node(getModule)]; + } + exports.filenameIsInApp = filenameIsInApp; + exports.node = node; + exports.nodeStackLineParser = nodeStackLineParser; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/baggage.js +var require_baggage = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/baggage.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var debugBuild = require_debug_build(), is = require_is(), logger = require_logger(), BAGGAGE_HEADER_NAME = "baggage", SENTRY_BAGGAGE_KEY_PREFIX = "sentry-", SENTRY_BAGGAGE_KEY_PREFIX_REGEX = /^sentry-/, MAX_BAGGAGE_STRING_LENGTH = 8192; + function baggageHeaderToDynamicSamplingContext(baggageHeader) { + let baggageObject = parseBaggageHeader(baggageHeader); + if (!baggageObject) + return; + let dynamicSamplingContext = Object.entries(baggageObject).reduce((acc, [key, value]) => { + if (key.match(SENTRY_BAGGAGE_KEY_PREFIX_REGEX)) { + let nonPrefixedKey = key.slice(SENTRY_BAGGAGE_KEY_PREFIX.length); + acc[nonPrefixedKey] = value; + } + return acc; + }, {}); + if (Object.keys(dynamicSamplingContext).length > 0) + return dynamicSamplingContext; + } + function dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext) { + if (!dynamicSamplingContext) + return; + let sentryPrefixedDSC = Object.entries(dynamicSamplingContext).reduce( + (acc, [dscKey, dscValue]) => (dscValue && (acc[`${SENTRY_BAGGAGE_KEY_PREFIX}${dscKey}`] = dscValue), acc), + {} + ); + return objectToBaggageHeader(sentryPrefixedDSC); + } + function parseBaggageHeader(baggageHeader) { + if (!(!baggageHeader || !is.isString(baggageHeader) && !Array.isArray(baggageHeader))) + return Array.isArray(baggageHeader) ? baggageHeader.reduce((acc, curr) => { + let currBaggageObject = baggageHeaderToObject(curr); + for (let key of Object.keys(currBaggageObject)) + acc[key] = currBaggageObject[key]; + return acc; + }, {}) : baggageHeaderToObject(baggageHeader); + } + function baggageHeaderToObject(baggageHeader) { + return baggageHeader.split(",").map((baggageEntry) => baggageEntry.split("=").map((keyOrValue) => decodeURIComponent(keyOrValue.trim()))).reduce((acc, [key, value]) => (acc[key] = value, acc), {}); + } + function objectToBaggageHeader(object) { + if (Object.keys(object).length !== 0) + return Object.entries(object).reduce((baggageHeader, [objectKey, objectValue], currentIndex) => { + let baggageEntry = `${encodeURIComponent(objectKey)}=${encodeURIComponent(objectValue)}`, newBaggageHeader = currentIndex === 0 ? baggageEntry : `${baggageHeader},${baggageEntry}`; + return newBaggageHeader.length > MAX_BAGGAGE_STRING_LENGTH ? (debugBuild.DEBUG_BUILD && logger.logger.warn( + `Not adding key: ${objectKey} with val: ${objectValue} to baggage header due to exceeding baggage size limits.` + ), baggageHeader) : newBaggageHeader; + }, ""); + } + exports.BAGGAGE_HEADER_NAME = BAGGAGE_HEADER_NAME; + exports.MAX_BAGGAGE_STRING_LENGTH = MAX_BAGGAGE_STRING_LENGTH; + exports.SENTRY_BAGGAGE_KEY_PREFIX = SENTRY_BAGGAGE_KEY_PREFIX; + exports.SENTRY_BAGGAGE_KEY_PREFIX_REGEX = SENTRY_BAGGAGE_KEY_PREFIX_REGEX; + exports.baggageHeaderToDynamicSamplingContext = baggageHeaderToDynamicSamplingContext; + exports.dynamicSamplingContextToSentryBaggageHeader = dynamicSamplingContextToSentryBaggageHeader; + exports.parseBaggageHeader = parseBaggageHeader; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/tracing.js +var require_tracing = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/tracing.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var baggage = require_baggage(), misc = require_misc(), TRACEPARENT_REGEXP = new RegExp( + "^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$" + // whitespace + ); + function extractTraceparentData(traceparent) { + if (!traceparent) + return; + let matches = traceparent.match(TRACEPARENT_REGEXP); + if (!matches) + return; + let parentSampled; + return matches[3] === "1" ? parentSampled = !0 : matches[3] === "0" && (parentSampled = !1), { + traceId: matches[1], + parentSampled, + parentSpanId: matches[2] + }; + } + function propagationContextFromHeaders(sentryTrace, baggage$1) { + let traceparentData = extractTraceparentData(sentryTrace), dynamicSamplingContext = baggage.baggageHeaderToDynamicSamplingContext(baggage$1), { traceId, parentSpanId, parentSampled } = traceparentData || {}; + return traceparentData ? { + traceId: traceId || misc.uuid4(), + parentSpanId: parentSpanId || misc.uuid4().substring(16), + spanId: misc.uuid4().substring(16), + sampled: parentSampled, + dsc: dynamicSamplingContext || {} + // If we have traceparent data but no DSC it means we are not head of trace and we must freeze it + } : { + traceId: traceId || misc.uuid4(), + spanId: misc.uuid4().substring(16) + }; + } + function generateSentryTraceHeader(traceId = misc.uuid4(), spanId = misc.uuid4().substring(16), sampled) { + let sampledString = ""; + return sampled !== void 0 && (sampledString = sampled ? "-1" : "-0"), `${traceId}-${spanId}${sampledString}`; + } + exports.TRACEPARENT_REGEXP = TRACEPARENT_REGEXP; + exports.extractTraceparentData = extractTraceparentData; + exports.generateSentryTraceHeader = generateSentryTraceHeader; + exports.propagationContextFromHeaders = propagationContextFromHeaders; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/envelope.js +var require_envelope = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/envelope.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var dsn = require_dsn(), normalize = require_normalize(), object = require_object(), worldwide = require_worldwide(); + function createEnvelope(headers, items = []) { + return [headers, items]; + } + function addItemToEnvelope(envelope, newItem) { + let [headers, items] = envelope; + return [headers, [...items, newItem]]; + } + function forEachEnvelopeItem(envelope, callback) { + let envelopeItems = envelope[1]; + for (let envelopeItem of envelopeItems) { + let envelopeItemType = envelopeItem[0].type; + if (callback(envelopeItem, envelopeItemType)) + return !0; + } + return !1; + } + function envelopeContainsItemType(envelope, types) { + return forEachEnvelopeItem(envelope, (_, type) => types.includes(type)); + } + function encodeUTF8(input) { + return worldwide.GLOBAL_OBJ.__SENTRY__ && worldwide.GLOBAL_OBJ.__SENTRY__.encodePolyfill ? worldwide.GLOBAL_OBJ.__SENTRY__.encodePolyfill(input) : new TextEncoder().encode(input); + } + function decodeUTF8(input) { + return worldwide.GLOBAL_OBJ.__SENTRY__ && worldwide.GLOBAL_OBJ.__SENTRY__.decodePolyfill ? worldwide.GLOBAL_OBJ.__SENTRY__.decodePolyfill(input) : new TextDecoder().decode(input); + } + function serializeEnvelope(envelope) { + let [envHeaders, items] = envelope, parts = JSON.stringify(envHeaders); + function append(next) { + typeof parts == "string" ? parts = typeof next == "string" ? parts + next : [encodeUTF8(parts), next] : parts.push(typeof next == "string" ? encodeUTF8(next) : next); + } + for (let item of items) { + let [itemHeaders, payload] = item; + if (append(` +${JSON.stringify(itemHeaders)} +`), typeof payload == "string" || payload instanceof Uint8Array) + append(payload); + else { + let stringifiedPayload; + try { + stringifiedPayload = JSON.stringify(payload); + } catch { + stringifiedPayload = JSON.stringify(normalize.normalize(payload)); + } + append(stringifiedPayload); + } + } + return typeof parts == "string" ? parts : concatBuffers(parts); + } + function concatBuffers(buffers) { + let totalLength = buffers.reduce((acc, buf) => acc + buf.length, 0), merged = new Uint8Array(totalLength), offset = 0; + for (let buffer of buffers) + merged.set(buffer, offset), offset += buffer.length; + return merged; + } + function parseEnvelope(env) { + let buffer = typeof env == "string" ? encodeUTF8(env) : env; + function readBinary(length) { + let bin = buffer.subarray(0, length); + return buffer = buffer.subarray(length + 1), bin; + } + function readJson() { + let i = buffer.indexOf(10); + return i < 0 && (i = buffer.length), JSON.parse(decodeUTF8(readBinary(i))); + } + let envelopeHeader = readJson(), items = []; + for (; buffer.length; ) { + let itemHeader = readJson(), binaryLength = typeof itemHeader.length == "number" ? itemHeader.length : void 0; + items.push([itemHeader, binaryLength ? readBinary(binaryLength) : readJson()]); + } + return [envelopeHeader, items]; + } + function createSpanEnvelopeItem(spanJson) { + return [{ + type: "span" + }, spanJson]; + } + function createAttachmentEnvelopeItem(attachment) { + let buffer = typeof attachment.data == "string" ? encodeUTF8(attachment.data) : attachment.data; + return [ + object.dropUndefinedKeys({ + type: "attachment", + length: buffer.length, + filename: attachment.filename, + content_type: attachment.contentType, + attachment_type: attachment.attachmentType + }), + buffer + ]; + } + var ITEM_TYPE_TO_DATA_CATEGORY_MAP = { + session: "session", + sessions: "session", + attachment: "attachment", + transaction: "transaction", + event: "error", + client_report: "internal", + user_report: "default", + profile: "profile", + profile_chunk: "profile", + replay_event: "replay", + replay_recording: "replay", + check_in: "monitor", + feedback: "feedback", + span: "span", + statsd: "metric_bucket" + }; + function envelopeItemTypeToDataCategory(type) { + return ITEM_TYPE_TO_DATA_CATEGORY_MAP[type]; + } + function getSdkMetadataForEnvelopeHeader(metadataOrEvent) { + if (!metadataOrEvent || !metadataOrEvent.sdk) + return; + let { name, version } = metadataOrEvent.sdk; + return { name, version }; + } + function createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn$1) { + let dynamicSamplingContext = event.sdkProcessingMetadata && event.sdkProcessingMetadata.dynamicSamplingContext; + return { + event_id: event.event_id, + sent_at: (/* @__PURE__ */ new Date()).toISOString(), + ...sdkInfo && { sdk: sdkInfo }, + ...!!tunnel && dsn$1 && { dsn: dsn.dsnToString(dsn$1) }, + ...dynamicSamplingContext && { + trace: object.dropUndefinedKeys({ ...dynamicSamplingContext }) + } + }; + } + exports.addItemToEnvelope = addItemToEnvelope; + exports.createAttachmentEnvelopeItem = createAttachmentEnvelopeItem; + exports.createEnvelope = createEnvelope; + exports.createEventEnvelopeHeaders = createEventEnvelopeHeaders; + exports.createSpanEnvelopeItem = createSpanEnvelopeItem; + exports.envelopeContainsItemType = envelopeContainsItemType; + exports.envelopeItemTypeToDataCategory = envelopeItemTypeToDataCategory; + exports.forEachEnvelopeItem = forEachEnvelopeItem; + exports.getSdkMetadataForEnvelopeHeader = getSdkMetadataForEnvelopeHeader; + exports.parseEnvelope = parseEnvelope; + exports.serializeEnvelope = serializeEnvelope; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/clientreport.js +var require_clientreport = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/clientreport.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var envelope = require_envelope(), time = require_time(); + function createClientReportEnvelope(discarded_events, dsn, timestamp) { + let clientReportItem = [ + { type: "client_report" }, + { + timestamp: timestamp || time.dateTimestampInSeconds(), + discarded_events + } + ]; + return envelope.createEnvelope(dsn ? { dsn } : {}, [clientReportItem]); + } + exports.createClientReportEnvelope = createClientReportEnvelope; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/ratelimit.js +var require_ratelimit = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/ratelimit.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var DEFAULT_RETRY_AFTER = 60 * 1e3; + function parseRetryAfterHeader(header, now = Date.now()) { + let headerDelay = parseInt(`${header}`, 10); + if (!isNaN(headerDelay)) + return headerDelay * 1e3; + let headerDate = Date.parse(`${header}`); + return isNaN(headerDate) ? DEFAULT_RETRY_AFTER : headerDate - now; + } + function disabledUntil(limits, dataCategory) { + return limits[dataCategory] || limits.all || 0; + } + function isRateLimited(limits, dataCategory, now = Date.now()) { + return disabledUntil(limits, dataCategory) > now; + } + function updateRateLimits(limits, { statusCode, headers }, now = Date.now()) { + let updatedRateLimits = { + ...limits + }, rateLimitHeader = headers && headers["x-sentry-rate-limits"], retryAfterHeader = headers && headers["retry-after"]; + if (rateLimitHeader) + for (let limit of rateLimitHeader.trim().split(",")) { + let [retryAfter, categories, , , namespaces] = limit.split(":", 5), headerDelay = parseInt(retryAfter, 10), delay = (isNaN(headerDelay) ? 60 : headerDelay) * 1e3; + if (!categories) + updatedRateLimits.all = now + delay; + else + for (let category of categories.split(";")) + category === "metric_bucket" ? (!namespaces || namespaces.split(";").includes("custom")) && (updatedRateLimits[category] = now + delay) : updatedRateLimits[category] = now + delay; + } + else retryAfterHeader ? updatedRateLimits.all = now + parseRetryAfterHeader(retryAfterHeader, now) : statusCode === 429 && (updatedRateLimits.all = now + 60 * 1e3); + return updatedRateLimits; + } + exports.DEFAULT_RETRY_AFTER = DEFAULT_RETRY_AFTER; + exports.disabledUntil = disabledUntil; + exports.isRateLimited = isRateLimited; + exports.parseRetryAfterHeader = parseRetryAfterHeader; + exports.updateRateLimits = updateRateLimits; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/cache.js +var require_cache = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/cache.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function makeFifoCache(size) { + let evictionOrder = [], cache = {}; + return { + add(key, value) { + for (; evictionOrder.length >= size; ) { + let evictCandidate = evictionOrder.shift(); + evictCandidate !== void 0 && delete cache[evictCandidate]; + } + cache[key] && this.delete(key), evictionOrder.push(key), cache[key] = value; + }, + clear() { + cache = {}, evictionOrder = []; + }, + get(key) { + return cache[key]; + }, + size() { + return evictionOrder.length; + }, + // Delete cache key and return true if it existed, false otherwise. + delete(key) { + if (!cache[key]) + return !1; + delete cache[key]; + for (let i = 0; i < evictionOrder.length; i++) + if (evictionOrder[i] === key) { + evictionOrder.splice(i, 1); + break; + } + return !0; + } + }; + } + exports.makeFifoCache = makeFifoCache; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/eventbuilder.js +var require_eventbuilder = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/eventbuilder.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var is = require_is(), misc = require_misc(), normalize = require_normalize(), object = require_object(); + function parseStackFrames(stackParser, error) { + return stackParser(error.stack || "", 1); + } + function exceptionFromError(stackParser, error) { + let exception = { + type: error.name || error.constructor.name, + value: error.message + }, frames = parseStackFrames(stackParser, error); + return frames.length && (exception.stacktrace = { frames }), exception; + } + function getErrorPropertyFromObject(obj) { + for (let prop in obj) + if (Object.prototype.hasOwnProperty.call(obj, prop)) { + let value = obj[prop]; + if (value instanceof Error) + return value; + } + } + function getMessageForObject(exception) { + if ("name" in exception && typeof exception.name == "string") { + let message = `'${exception.name}' captured as exception`; + return "message" in exception && typeof exception.message == "string" && (message += ` with message '${exception.message}'`), message; + } else if ("message" in exception && typeof exception.message == "string") + return exception.message; + let keys = object.extractExceptionKeysForMessage(exception); + if (is.isErrorEvent(exception)) + return `Event \`ErrorEvent\` captured as exception with message \`${exception.message}\``; + let className = getObjectClassName(exception); + return `${className && className !== "Object" ? `'${className}'` : "Object"} captured as exception with keys: ${keys}`; + } + function getObjectClassName(obj) { + try { + let prototype = Object.getPrototypeOf(obj); + return prototype ? prototype.constructor.name : void 0; + } catch { + } + } + function getException(client, mechanism, exception, hint) { + if (is.isError(exception)) + return [exception, void 0]; + if (mechanism.synthetic = !0, is.isPlainObject(exception)) { + let normalizeDepth = client && client.getOptions().normalizeDepth, extras = { __serialized__: normalize.normalizeToSize(exception, normalizeDepth) }, errorFromProp = getErrorPropertyFromObject(exception); + if (errorFromProp) + return [errorFromProp, extras]; + let message = getMessageForObject(exception), ex2 = hint && hint.syntheticException || new Error(message); + return ex2.message = message, [ex2, extras]; + } + let ex = hint && hint.syntheticException || new Error(exception); + return ex.message = `${exception}`, [ex, void 0]; + } + function eventFromUnknownInput(client, stackParser, exception, hint) { + let mechanism = hint && hint.data && hint.data.mechanism || { + handled: !0, + type: "generic" + }, [ex, extras] = getException(client, mechanism, exception, hint), event = { + exception: { + values: [exceptionFromError(stackParser, ex)] + } + }; + return extras && (event.extra = extras), misc.addExceptionTypeValue(event, void 0, void 0), misc.addExceptionMechanism(event, mechanism), { + ...event, + event_id: hint && hint.event_id + }; + } + function eventFromMessage(stackParser, message, level = "info", hint, attachStacktrace) { + let event = { + event_id: hint && hint.event_id, + level + }; + if (attachStacktrace && hint && hint.syntheticException) { + let frames = parseStackFrames(stackParser, hint.syntheticException); + frames.length && (event.exception = { + values: [ + { + value: message, + stacktrace: { frames } + } + ] + }); + } + if (is.isParameterizedString(message)) { + let { __sentry_template_string__, __sentry_template_values__ } = message; + return event.logentry = { + message: __sentry_template_string__, + params: __sentry_template_values__ + }, event; + } + return event.message = message, event; + } + exports.eventFromMessage = eventFromMessage; + exports.eventFromUnknownInput = eventFromUnknownInput; + exports.exceptionFromError = exceptionFromError; + exports.parseStackFrames = parseStackFrames; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/anr.js +var require_anr = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/anr.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var nodeStackTrace = require_node_stack_trace(), object = require_object(), stacktrace = require_stacktrace(); + function watchdogTimer(createTimer, pollInterval, anrThreshold, callback) { + let timer = createTimer(), triggered = !1, enabled = !0; + return setInterval(() => { + let diffMs = timer.getTimeMs(); + triggered === !1 && diffMs > pollInterval + anrThreshold && (triggered = !0, enabled && callback()), diffMs < pollInterval + anrThreshold && (triggered = !1); + }, 20), { + poll: () => { + timer.reset(); + }, + enabled: (state) => { + enabled = state; + } + }; + } + function callFrameToStackFrame(frame, url, getModuleFromFilename) { + let filename = url ? url.replace(/^file:\/\//, "") : void 0, colno = frame.location.columnNumber ? frame.location.columnNumber + 1 : void 0, lineno = frame.location.lineNumber ? frame.location.lineNumber + 1 : void 0; + return object.dropUndefinedKeys({ + filename, + module: getModuleFromFilename(filename), + function: frame.functionName || stacktrace.UNKNOWN_FUNCTION, + colno, + lineno, + in_app: filename ? nodeStackTrace.filenameIsInApp(filename) : void 0 + }); + } + exports.callFrameToStackFrame = callFrameToStackFrame; + exports.watchdogTimer = watchdogTimer; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/lru.js +var require_lru = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/lru.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var LRUMap = class { + constructor(_maxSize) { + this._maxSize = _maxSize, this._cache = /* @__PURE__ */ new Map(); + } + /** Get the current size of the cache */ + get size() { + return this._cache.size; + } + /** Get an entry or undefined if it was not in the cache. Re-inserts to update the recently used order */ + get(key) { + let value = this._cache.get(key); + if (value !== void 0) + return this._cache.delete(key), this._cache.set(key, value), value; + } + /** Insert an entry and evict an older entry if we've reached maxSize */ + set(key, value) { + this._cache.size >= this._maxSize && this._cache.delete(this._cache.keys().next().value), this._cache.set(key, value); + } + /** Remove an entry and return the entry if it was in the cache */ + remove(key) { + let value = this._cache.get(key); + return value && this._cache.delete(key), value; + } + /** Clear all entries */ + clear() { + this._cache.clear(); + } + /** Get all the keys */ + keys() { + return Array.from(this._cache.keys()); + } + /** Get all the values */ + values() { + let values = []; + return this._cache.forEach((value) => values.push(value)), values; + } + }; + exports.LRUMap = LRUMap; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_nullishCoalesce.js +var require_nullishCoalesce = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_nullishCoalesce.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function _nullishCoalesce(lhs, rhsFn) { + return lhs ?? rhsFn(); + } + exports._nullishCoalesce = _nullishCoalesce; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_asyncNullishCoalesce.js +var require_asyncNullishCoalesce = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_asyncNullishCoalesce.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var _nullishCoalesce = require_nullishCoalesce(); + async function _asyncNullishCoalesce(lhs, rhsFn) { + return _nullishCoalesce._nullishCoalesce(lhs, rhsFn); + } + exports._asyncNullishCoalesce = _asyncNullishCoalesce; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_asyncOptionalChain.js +var require_asyncOptionalChain = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_asyncOptionalChain.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + async function _asyncOptionalChain(ops) { + let lastAccessLHS, value = ops[0], i = 1; + for (; i < ops.length; ) { + let op = ops[i], fn = ops[i + 1]; + if (i += 2, (op === "optionalAccess" || op === "optionalCall") && value == null) + return; + op === "access" || op === "optionalAccess" ? (lastAccessLHS = value, value = await fn(value)) : (op === "call" || op === "optionalCall") && (value = await fn((...args) => value.call(lastAccessLHS, ...args)), lastAccessLHS = void 0); + } + return value; + } + exports._asyncOptionalChain = _asyncOptionalChain; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_asyncOptionalChainDelete.js +var require_asyncOptionalChainDelete = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_asyncOptionalChainDelete.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var _asyncOptionalChain = require_asyncOptionalChain(); + async function _asyncOptionalChainDelete(ops) { + let result = await _asyncOptionalChain._asyncOptionalChain(ops); + return result ?? !0; + } + exports._asyncOptionalChainDelete = _asyncOptionalChainDelete; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_optionalChain.js +var require_optionalChain = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_optionalChain.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function _optionalChain(ops) { + let lastAccessLHS, value = ops[0], i = 1; + for (; i < ops.length; ) { + let op = ops[i], fn = ops[i + 1]; + if (i += 2, (op === "optionalAccess" || op === "optionalCall") && value == null) + return; + op === "access" || op === "optionalAccess" ? (lastAccessLHS = value, value = fn(value)) : (op === "call" || op === "optionalCall") && (value = fn((...args) => value.call(lastAccessLHS, ...args)), lastAccessLHS = void 0); + } + return value; + } + exports._optionalChain = _optionalChain; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_optionalChainDelete.js +var require_optionalChainDelete = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/buildPolyfills/_optionalChainDelete.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var _optionalChain = require_optionalChain(); + function _optionalChainDelete(ops) { + let result = _optionalChain._optionalChain(ops); + return result ?? !0; + } + exports._optionalChainDelete = _optionalChainDelete; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/propagationContext.js +var require_propagationContext = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/propagationContext.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var misc = require_misc(); + function generatePropagationContext() { + return { + traceId: misc.uuid4(), + spanId: misc.uuid4().substring(16) + }; + } + exports.generatePropagationContext = generatePropagationContext; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/vendor/escapeStringForRegex.js +var require_escapeStringForRegex = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/vendor/escapeStringForRegex.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function escapeStringForRegex(regexString) { + return regexString.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"); + } + exports.escapeStringForRegex = escapeStringForRegex; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/vendor/supportsHistory.js +var require_supportsHistory = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/vendor/supportsHistory.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var worldwide = require_worldwide(), WINDOW = worldwide.GLOBAL_OBJ; + function supportsHistory() { + let chromeVar = WINDOW.chrome, isChromePackagedApp = chromeVar && chromeVar.app && chromeVar.app.runtime, hasHistoryApi = "history" in WINDOW && !!WINDOW.history.pushState && !!WINDOW.history.replaceState; + return !isChromePackagedApp && hasHistoryApi; + } + exports.supportsHistory = supportsHistory; + } +}); + +// ../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/index.js +var require_cjs = __commonJS({ + "../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/index.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var aggregateErrors = require_aggregate_errors(), array = require_array(), browser = require_browser(), dsn = require_dsn(), error = require_error(), worldwide = require_worldwide(), console2 = require_console(), fetch2 = require_fetch(), globalError = require_globalError(), globalUnhandledRejection = require_globalUnhandledRejection(), handlers = require_handlers(), is = require_is(), isBrowser = require_isBrowser(), logger = require_logger(), memo = require_memo(), misc = require_misc(), node = require_node(), normalize = require_normalize(), object = require_object(), path = require_path(), promisebuffer = require_promisebuffer(), requestdata = require_requestdata(), severity = require_severity(), stacktrace = require_stacktrace(), nodeStackTrace = require_node_stack_trace(), string = require_string(), supports = require_supports(), syncpromise = require_syncpromise(), time = require_time(), tracing = require_tracing(), env = require_env(), envelope = require_envelope(), clientreport = require_clientreport(), ratelimit = require_ratelimit(), baggage = require_baggage(), url = require_url(), cache = require_cache(), eventbuilder = require_eventbuilder(), anr = require_anr(), lru = require_lru(), _asyncNullishCoalesce = require_asyncNullishCoalesce(), _asyncOptionalChain = require_asyncOptionalChain(), _asyncOptionalChainDelete = require_asyncOptionalChainDelete(), _nullishCoalesce = require_nullishCoalesce(), _optionalChain = require_optionalChain(), _optionalChainDelete = require_optionalChainDelete(), propagationContext = require_propagationContext(), version = require_version(), escapeStringForRegex = require_escapeStringForRegex(), supportsHistory = require_supportsHistory(); + exports.applyAggregateErrorsToEvent = aggregateErrors.applyAggregateErrorsToEvent; + exports.flatten = array.flatten; + exports.getComponentName = browser.getComponentName; + exports.getDomElement = browser.getDomElement; + exports.getLocationHref = browser.getLocationHref; + exports.htmlTreeAsString = browser.htmlTreeAsString; + exports.dsnFromString = dsn.dsnFromString; + exports.dsnToString = dsn.dsnToString; + exports.makeDsn = dsn.makeDsn; + exports.SentryError = error.SentryError; + exports.GLOBAL_OBJ = worldwide.GLOBAL_OBJ; + exports.getGlobalSingleton = worldwide.getGlobalSingleton; + exports.addConsoleInstrumentationHandler = console2.addConsoleInstrumentationHandler; + exports.addFetchInstrumentationHandler = fetch2.addFetchInstrumentationHandler; + exports.addGlobalErrorInstrumentationHandler = globalError.addGlobalErrorInstrumentationHandler; + exports.addGlobalUnhandledRejectionInstrumentationHandler = globalUnhandledRejection.addGlobalUnhandledRejectionInstrumentationHandler; + exports.addHandler = handlers.addHandler; + exports.maybeInstrument = handlers.maybeInstrument; + exports.resetInstrumentationHandlers = handlers.resetInstrumentationHandlers; + exports.triggerHandlers = handlers.triggerHandlers; + exports.isDOMError = is.isDOMError; + exports.isDOMException = is.isDOMException; + exports.isElement = is.isElement; + exports.isError = is.isError; + exports.isErrorEvent = is.isErrorEvent; + exports.isEvent = is.isEvent; + exports.isInstanceOf = is.isInstanceOf; + exports.isParameterizedString = is.isParameterizedString; + exports.isPlainObject = is.isPlainObject; + exports.isPrimitive = is.isPrimitive; + exports.isRegExp = is.isRegExp; + exports.isString = is.isString; + exports.isSyntheticEvent = is.isSyntheticEvent; + exports.isThenable = is.isThenable; + exports.isVueViewModel = is.isVueViewModel; + exports.isBrowser = isBrowser.isBrowser; + exports.CONSOLE_LEVELS = logger.CONSOLE_LEVELS; + exports.consoleSandbox = logger.consoleSandbox; + exports.logger = logger.logger; + exports.originalConsoleMethods = logger.originalConsoleMethods; + exports.memoBuilder = memo.memoBuilder; + exports.addContextToFrame = misc.addContextToFrame; + exports.addExceptionMechanism = misc.addExceptionMechanism; + exports.addExceptionTypeValue = misc.addExceptionTypeValue; + exports.arrayify = misc.arrayify; + exports.checkOrSetAlreadyCaught = misc.checkOrSetAlreadyCaught; + exports.getEventDescription = misc.getEventDescription; + exports.parseSemver = misc.parseSemver; + exports.uuid4 = misc.uuid4; + exports.dynamicRequire = node.dynamicRequire; + exports.isNodeEnv = node.isNodeEnv; + exports.loadModule = node.loadModule; + exports.normalize = normalize.normalize; + exports.normalizeToSize = normalize.normalizeToSize; + exports.normalizeUrlToBase = normalize.normalizeUrlToBase; + exports.addNonEnumerableProperty = object.addNonEnumerableProperty; + exports.convertToPlainObject = object.convertToPlainObject; + exports.dropUndefinedKeys = object.dropUndefinedKeys; + exports.extractExceptionKeysForMessage = object.extractExceptionKeysForMessage; + exports.fill = object.fill; + exports.getOriginalFunction = object.getOriginalFunction; + exports.markFunctionWrapped = object.markFunctionWrapped; + exports.objectify = object.objectify; + exports.urlEncode = object.urlEncode; + exports.basename = path.basename; + exports.dirname = path.dirname; + exports.isAbsolute = path.isAbsolute; + exports.join = path.join; + exports.normalizePath = path.normalizePath; + exports.relative = path.relative; + exports.resolve = path.resolve; + exports.makePromiseBuffer = promisebuffer.makePromiseBuffer; + exports.DEFAULT_USER_INCLUDES = requestdata.DEFAULT_USER_INCLUDES; + exports.addRequestDataToEvent = requestdata.addRequestDataToEvent; + exports.extractPathForTransaction = requestdata.extractPathForTransaction; + exports.extractRequestData = requestdata.extractRequestData; + exports.winterCGHeadersToDict = requestdata.winterCGHeadersToDict; + exports.winterCGRequestToRequestData = requestdata.winterCGRequestToRequestData; + exports.severityLevelFromString = severity.severityLevelFromString; + exports.validSeverityLevels = severity.validSeverityLevels; + exports.UNKNOWN_FUNCTION = stacktrace.UNKNOWN_FUNCTION; + exports.createStackParser = stacktrace.createStackParser; + exports.getFramesFromEvent = stacktrace.getFramesFromEvent; + exports.getFunctionName = stacktrace.getFunctionName; + exports.stackParserFromStackParserOptions = stacktrace.stackParserFromStackParserOptions; + exports.stripSentryFramesAndReverse = stacktrace.stripSentryFramesAndReverse; + exports.filenameIsInApp = nodeStackTrace.filenameIsInApp; + exports.node = nodeStackTrace.node; + exports.nodeStackLineParser = nodeStackTrace.nodeStackLineParser; + exports.isMatchingPattern = string.isMatchingPattern; + exports.safeJoin = string.safeJoin; + exports.snipLine = string.snipLine; + exports.stringMatchesSomePattern = string.stringMatchesSomePattern; + exports.truncate = string.truncate; + exports.isNativeFunction = supports.isNativeFunction; + exports.supportsDOMError = supports.supportsDOMError; + exports.supportsDOMException = supports.supportsDOMException; + exports.supportsErrorEvent = supports.supportsErrorEvent; + exports.supportsFetch = supports.supportsFetch; + exports.supportsNativeFetch = supports.supportsNativeFetch; + exports.supportsReferrerPolicy = supports.supportsReferrerPolicy; + exports.supportsReportingObserver = supports.supportsReportingObserver; + exports.SyncPromise = syncpromise.SyncPromise; + exports.rejectedSyncPromise = syncpromise.rejectedSyncPromise; + exports.resolvedSyncPromise = syncpromise.resolvedSyncPromise; + Object.defineProperty(exports, "_browserPerformanceTimeOriginMode", { + enumerable: !0, + get: () => time._browserPerformanceTimeOriginMode + }); + exports.browserPerformanceTimeOrigin = time.browserPerformanceTimeOrigin; + exports.dateTimestampInSeconds = time.dateTimestampInSeconds; + exports.timestampInSeconds = time.timestampInSeconds; + exports.TRACEPARENT_REGEXP = tracing.TRACEPARENT_REGEXP; + exports.extractTraceparentData = tracing.extractTraceparentData; + exports.generateSentryTraceHeader = tracing.generateSentryTraceHeader; + exports.propagationContextFromHeaders = tracing.propagationContextFromHeaders; + exports.getSDKSource = env.getSDKSource; + exports.isBrowserBundle = env.isBrowserBundle; + exports.addItemToEnvelope = envelope.addItemToEnvelope; + exports.createAttachmentEnvelopeItem = envelope.createAttachmentEnvelopeItem; + exports.createEnvelope = envelope.createEnvelope; + exports.createEventEnvelopeHeaders = envelope.createEventEnvelopeHeaders; + exports.createSpanEnvelopeItem = envelope.createSpanEnvelopeItem; + exports.envelopeContainsItemType = envelope.envelopeContainsItemType; + exports.envelopeItemTypeToDataCategory = envelope.envelopeItemTypeToDataCategory; + exports.forEachEnvelopeItem = envelope.forEachEnvelopeItem; + exports.getSdkMetadataForEnvelopeHeader = envelope.getSdkMetadataForEnvelopeHeader; + exports.parseEnvelope = envelope.parseEnvelope; + exports.serializeEnvelope = envelope.serializeEnvelope; + exports.createClientReportEnvelope = clientreport.createClientReportEnvelope; + exports.DEFAULT_RETRY_AFTER = ratelimit.DEFAULT_RETRY_AFTER; + exports.disabledUntil = ratelimit.disabledUntil; + exports.isRateLimited = ratelimit.isRateLimited; + exports.parseRetryAfterHeader = ratelimit.parseRetryAfterHeader; + exports.updateRateLimits = ratelimit.updateRateLimits; + exports.BAGGAGE_HEADER_NAME = baggage.BAGGAGE_HEADER_NAME; + exports.MAX_BAGGAGE_STRING_LENGTH = baggage.MAX_BAGGAGE_STRING_LENGTH; + exports.SENTRY_BAGGAGE_KEY_PREFIX = baggage.SENTRY_BAGGAGE_KEY_PREFIX; + exports.SENTRY_BAGGAGE_KEY_PREFIX_REGEX = baggage.SENTRY_BAGGAGE_KEY_PREFIX_REGEX; + exports.baggageHeaderToDynamicSamplingContext = baggage.baggageHeaderToDynamicSamplingContext; + exports.dynamicSamplingContextToSentryBaggageHeader = baggage.dynamicSamplingContextToSentryBaggageHeader; + exports.parseBaggageHeader = baggage.parseBaggageHeader; + exports.getNumberOfUrlSegments = url.getNumberOfUrlSegments; + exports.getSanitizedUrlString = url.getSanitizedUrlString; + exports.parseUrl = url.parseUrl; + exports.stripUrlQueryAndFragment = url.stripUrlQueryAndFragment; + exports.makeFifoCache = cache.makeFifoCache; + exports.eventFromMessage = eventbuilder.eventFromMessage; + exports.eventFromUnknownInput = eventbuilder.eventFromUnknownInput; + exports.exceptionFromError = eventbuilder.exceptionFromError; + exports.parseStackFrames = eventbuilder.parseStackFrames; + exports.callFrameToStackFrame = anr.callFrameToStackFrame; + exports.watchdogTimer = anr.watchdogTimer; + exports.LRUMap = lru.LRUMap; + exports._asyncNullishCoalesce = _asyncNullishCoalesce._asyncNullishCoalesce; + exports._asyncOptionalChain = _asyncOptionalChain._asyncOptionalChain; + exports._asyncOptionalChainDelete = _asyncOptionalChainDelete._asyncOptionalChainDelete; + exports._nullishCoalesce = _nullishCoalesce._nullishCoalesce; + exports._optionalChain = _optionalChain._optionalChain; + exports._optionalChainDelete = _optionalChainDelete._optionalChainDelete; + exports.generatePropagationContext = propagationContext.generatePropagationContext; + exports.SDK_VERSION = version.SDK_VERSION; + exports.escapeStringForRegex = escapeStringForRegex.escapeStringForRegex; + exports.supportsHistory = supportsHistory.supportsHistory; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/debug-build.js +var require_debug_build2 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/debug-build.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var DEBUG_BUILD = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__; + exports.DEBUG_BUILD = DEBUG_BUILD; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/carrier.js +var require_carrier = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/carrier.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(); + function getMainCarrier() { + return getSentryCarrier(utils.GLOBAL_OBJ), utils.GLOBAL_OBJ; + } + function getSentryCarrier(carrier) { + let __SENTRY__ = carrier.__SENTRY__ = carrier.__SENTRY__ || {}; + return __SENTRY__.version = __SENTRY__.version || utils.SDK_VERSION, __SENTRY__[utils.SDK_VERSION] = __SENTRY__[utils.SDK_VERSION] || {}; + } + exports.getMainCarrier = getMainCarrier; + exports.getSentryCarrier = getSentryCarrier; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/session.js +var require_session = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/session.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(); + function makeSession(context) { + let startingTime = utils.timestampInSeconds(), session = { + sid: utils.uuid4(), + init: !0, + timestamp: startingTime, + started: startingTime, + duration: 0, + status: "ok", + errors: 0, + ignoreDuration: !1, + toJSON: () => sessionToJSON(session) + }; + return context && updateSession(session, context), session; + } + function updateSession(session, context = {}) { + if (context.user && (!session.ipAddress && context.user.ip_address && (session.ipAddress = context.user.ip_address), !session.did && !context.did && (session.did = context.user.id || context.user.email || context.user.username)), session.timestamp = context.timestamp || utils.timestampInSeconds(), context.abnormal_mechanism && (session.abnormal_mechanism = context.abnormal_mechanism), context.ignoreDuration && (session.ignoreDuration = context.ignoreDuration), context.sid && (session.sid = context.sid.length === 32 ? context.sid : utils.uuid4()), context.init !== void 0 && (session.init = context.init), !session.did && context.did && (session.did = `${context.did}`), typeof context.started == "number" && (session.started = context.started), session.ignoreDuration) + session.duration = void 0; + else if (typeof context.duration == "number") + session.duration = context.duration; + else { + let duration = session.timestamp - session.started; + session.duration = duration >= 0 ? duration : 0; + } + context.release && (session.release = context.release), context.environment && (session.environment = context.environment), !session.ipAddress && context.ipAddress && (session.ipAddress = context.ipAddress), !session.userAgent && context.userAgent && (session.userAgent = context.userAgent), typeof context.errors == "number" && (session.errors = context.errors), context.status && (session.status = context.status); + } + function closeSession(session, status) { + let context = {}; + status ? context = { status } : session.status === "ok" && (context = { status: "exited" }), updateSession(session, context); + } + function sessionToJSON(session) { + return utils.dropUndefinedKeys({ + sid: `${session.sid}`, + init: session.init, + // Make sure that sec is converted to ms for date constructor + started: new Date(session.started * 1e3).toISOString(), + timestamp: new Date(session.timestamp * 1e3).toISOString(), + status: session.status, + errors: session.errors, + did: typeof session.did == "number" || typeof session.did == "string" ? `${session.did}` : void 0, + duration: session.duration, + abnormal_mechanism: session.abnormal_mechanism, + attrs: { + release: session.release, + environment: session.environment, + ip_address: session.ipAddress, + user_agent: session.userAgent + } + }); + } + exports.closeSession = closeSession; + exports.makeSession = makeSession; + exports.updateSession = updateSession; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/spanOnScope.js +var require_spanOnScope = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/spanOnScope.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), SCOPE_SPAN_FIELD = "_sentrySpan"; + function _setSpanForScope(scope, span) { + span ? utils.addNonEnumerableProperty(scope, SCOPE_SPAN_FIELD, span) : delete scope[SCOPE_SPAN_FIELD]; + } + function _getSpanForScope(scope) { + return scope[SCOPE_SPAN_FIELD]; + } + exports._getSpanForScope = _getSpanForScope; + exports._setSpanForScope = _setSpanForScope; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/scope.js +var require_scope = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/scope.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), session = require_session(), spanOnScope = require_spanOnScope(), DEFAULT_MAX_BREADCRUMBS = 100, ScopeClass = class _ScopeClass { + /** Flag if notifying is happening. */ + /** Callback for client to receive scope changes. */ + /** Callback list that will be called during event processing. */ + /** Array of breadcrumbs. */ + /** User */ + /** Tags */ + /** Extra */ + /** Contexts */ + /** Attachments */ + /** Propagation Context for distributed tracing */ + /** + * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get + * sent to Sentry + */ + /** Fingerprint */ + /** Severity */ + /** + * Transaction Name + * + * IMPORTANT: The transaction name on the scope has nothing to do with root spans/transaction objects. + * It's purpose is to assign a transaction to the scope that's added to non-transaction events. + */ + /** Session */ + /** Request Mode Session Status */ + /** The client on this scope */ + /** Contains the last event id of a captured event. */ + // NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method. + constructor() { + this._notifyingListeners = !1, this._scopeListeners = [], this._eventProcessors = [], this._breadcrumbs = [], this._attachments = [], this._user = {}, this._tags = {}, this._extra = {}, this._contexts = {}, this._sdkProcessingMetadata = {}, this._propagationContext = utils.generatePropagationContext(); + } + /** + * @inheritDoc + */ + clone() { + let newScope = new _ScopeClass(); + return newScope._breadcrumbs = [...this._breadcrumbs], newScope._tags = { ...this._tags }, newScope._extra = { ...this._extra }, newScope._contexts = { ...this._contexts }, newScope._user = this._user, newScope._level = this._level, newScope._session = this._session, newScope._transactionName = this._transactionName, newScope._fingerprint = this._fingerprint, newScope._eventProcessors = [...this._eventProcessors], newScope._requestSession = this._requestSession, newScope._attachments = [...this._attachments], newScope._sdkProcessingMetadata = { ...this._sdkProcessingMetadata }, newScope._propagationContext = { ...this._propagationContext }, newScope._client = this._client, newScope._lastEventId = this._lastEventId, spanOnScope._setSpanForScope(newScope, spanOnScope._getSpanForScope(this)), newScope; + } + /** + * @inheritDoc + */ + setClient(client) { + this._client = client; + } + /** + * @inheritDoc + */ + setLastEventId(lastEventId) { + this._lastEventId = lastEventId; + } + /** + * @inheritDoc + */ + getClient() { + return this._client; + } + /** + * @inheritDoc + */ + lastEventId() { + return this._lastEventId; + } + /** + * @inheritDoc + */ + addScopeListener(callback) { + this._scopeListeners.push(callback); + } + /** + * @inheritDoc + */ + addEventProcessor(callback) { + return this._eventProcessors.push(callback), this; + } + /** + * @inheritDoc + */ + setUser(user) { + return this._user = user || { + email: void 0, + id: void 0, + ip_address: void 0, + username: void 0 + }, this._session && session.updateSession(this._session, { user }), this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + getUser() { + return this._user; + } + /** + * @inheritDoc + */ + getRequestSession() { + return this._requestSession; + } + /** + * @inheritDoc + */ + setRequestSession(requestSession) { + return this._requestSession = requestSession, this; + } + /** + * @inheritDoc + */ + setTags(tags) { + return this._tags = { + ...this._tags, + ...tags + }, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + setTag(key, value) { + return this._tags = { ...this._tags, [key]: value }, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + setExtras(extras) { + return this._extra = { + ...this._extra, + ...extras + }, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + setExtra(key, extra) { + return this._extra = { ...this._extra, [key]: extra }, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + setFingerprint(fingerprint) { + return this._fingerprint = fingerprint, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + setLevel(level) { + return this._level = level, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + setTransactionName(name) { + return this._transactionName = name, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + setContext(key, context) { + return context === null ? delete this._contexts[key] : this._contexts[key] = context, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + setSession(session2) { + return session2 ? this._session = session2 : delete this._session, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + getSession() { + return this._session; + } + /** + * @inheritDoc + */ + update(captureContext) { + if (!captureContext) + return this; + let scopeToMerge = typeof captureContext == "function" ? captureContext(this) : captureContext, [scopeInstance, requestSession] = scopeToMerge instanceof Scope ? [scopeToMerge.getScopeData(), scopeToMerge.getRequestSession()] : utils.isPlainObject(scopeToMerge) ? [captureContext, captureContext.requestSession] : [], { tags, extra, user, contexts, level, fingerprint = [], propagationContext } = scopeInstance || {}; + return this._tags = { ...this._tags, ...tags }, this._extra = { ...this._extra, ...extra }, this._contexts = { ...this._contexts, ...contexts }, user && Object.keys(user).length && (this._user = user), level && (this._level = level), fingerprint.length && (this._fingerprint = fingerprint), propagationContext && (this._propagationContext = propagationContext), requestSession && (this._requestSession = requestSession), this; + } + /** + * @inheritDoc + */ + clear() { + return this._breadcrumbs = [], this._tags = {}, this._extra = {}, this._user = {}, this._contexts = {}, this._level = void 0, this._transactionName = void 0, this._fingerprint = void 0, this._requestSession = void 0, this._session = void 0, spanOnScope._setSpanForScope(this, void 0), this._attachments = [], this._propagationContext = utils.generatePropagationContext(), this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + addBreadcrumb(breadcrumb, maxBreadcrumbs) { + let maxCrumbs = typeof maxBreadcrumbs == "number" ? maxBreadcrumbs : DEFAULT_MAX_BREADCRUMBS; + if (maxCrumbs <= 0) + return this; + let mergedBreadcrumb = { + timestamp: utils.dateTimestampInSeconds(), + ...breadcrumb + }, breadcrumbs = this._breadcrumbs; + return breadcrumbs.push(mergedBreadcrumb), this._breadcrumbs = breadcrumbs.length > maxCrumbs ? breadcrumbs.slice(-maxCrumbs) : breadcrumbs, this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + getLastBreadcrumb() { + return this._breadcrumbs[this._breadcrumbs.length - 1]; + } + /** + * @inheritDoc + */ + clearBreadcrumbs() { + return this._breadcrumbs = [], this._notifyScopeListeners(), this; + } + /** + * @inheritDoc + */ + addAttachment(attachment) { + return this._attachments.push(attachment), this; + } + /** + * @inheritDoc + */ + clearAttachments() { + return this._attachments = [], this; + } + /** @inheritDoc */ + getScopeData() { + return { + breadcrumbs: this._breadcrumbs, + attachments: this._attachments, + contexts: this._contexts, + tags: this._tags, + extra: this._extra, + user: this._user, + level: this._level, + fingerprint: this._fingerprint || [], + eventProcessors: this._eventProcessors, + propagationContext: this._propagationContext, + sdkProcessingMetadata: this._sdkProcessingMetadata, + transactionName: this._transactionName, + span: spanOnScope._getSpanForScope(this) + }; + } + /** + * @inheritDoc + */ + setSDKProcessingMetadata(newData) { + return this._sdkProcessingMetadata = { ...this._sdkProcessingMetadata, ...newData }, this; + } + /** + * @inheritDoc + */ + setPropagationContext(context) { + return this._propagationContext = context, this; + } + /** + * @inheritDoc + */ + getPropagationContext() { + return this._propagationContext; + } + /** + * @inheritDoc + */ + captureException(exception, hint) { + let eventId = hint && hint.event_id ? hint.event_id : utils.uuid4(); + if (!this._client) + return utils.logger.warn("No client configured on scope - will not capture exception!"), eventId; + let syntheticException = new Error("Sentry syntheticException"); + return this._client.captureException( + exception, + { + originalException: exception, + syntheticException, + ...hint, + event_id: eventId + }, + this + ), eventId; + } + /** + * @inheritDoc + */ + captureMessage(message, level, hint) { + let eventId = hint && hint.event_id ? hint.event_id : utils.uuid4(); + if (!this._client) + return utils.logger.warn("No client configured on scope - will not capture message!"), eventId; + let syntheticException = new Error(message); + return this._client.captureMessage( + message, + level, + { + originalException: message, + syntheticException, + ...hint, + event_id: eventId + }, + this + ), eventId; + } + /** + * @inheritDoc + */ + captureEvent(event, hint) { + let eventId = hint && hint.event_id ? hint.event_id : utils.uuid4(); + return this._client ? (this._client.captureEvent(event, { ...hint, event_id: eventId }, this), eventId) : (utils.logger.warn("No client configured on scope - will not capture event!"), eventId); + } + /** + * This will be called on every set call. + */ + _notifyScopeListeners() { + this._notifyingListeners || (this._notifyingListeners = !0, this._scopeListeners.forEach((callback) => { + callback(this); + }), this._notifyingListeners = !1); + } + }, Scope = ScopeClass; + exports.Scope = Scope; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/defaultScopes.js +var require_defaultScopes = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/defaultScopes.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), scope = require_scope(); + function getDefaultCurrentScope() { + return utils.getGlobalSingleton("defaultCurrentScope", () => new scope.Scope()); + } + function getDefaultIsolationScope() { + return utils.getGlobalSingleton("defaultIsolationScope", () => new scope.Scope()); + } + exports.getDefaultCurrentScope = getDefaultCurrentScope; + exports.getDefaultIsolationScope = getDefaultIsolationScope; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/asyncContext/stackStrategy.js +var require_stackStrategy = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/asyncContext/stackStrategy.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), defaultScopes = require_defaultScopes(), scope = require_scope(), carrier = require_carrier(), AsyncContextStack = class { + constructor(scope$1, isolationScope) { + let assignedScope; + scope$1 ? assignedScope = scope$1 : assignedScope = new scope.Scope(); + let assignedIsolationScope; + isolationScope ? assignedIsolationScope = isolationScope : assignedIsolationScope = new scope.Scope(), this._stack = [{ scope: assignedScope }], this._isolationScope = assignedIsolationScope; + } + /** + * Fork a scope for the stack. + */ + withScope(callback) { + let scope2 = this._pushScope(), maybePromiseResult; + try { + maybePromiseResult = callback(scope2); + } catch (e) { + throw this._popScope(), e; + } + return utils.isThenable(maybePromiseResult) ? maybePromiseResult.then( + (res) => (this._popScope(), res), + (e) => { + throw this._popScope(), e; + } + ) : (this._popScope(), maybePromiseResult); + } + /** + * Get the client of the stack. + */ + getClient() { + return this.getStackTop().client; + } + /** + * Returns the scope of the top stack. + */ + getScope() { + return this.getStackTop().scope; + } + /** + * Get the isolation scope for the stack. + */ + getIsolationScope() { + return this._isolationScope; + } + /** + * Returns the scope stack for domains or the process. + */ + getStack() { + return this._stack; + } + /** + * Returns the topmost scope layer in the order domain > local > process. + */ + getStackTop() { + return this._stack[this._stack.length - 1]; + } + /** + * Push a scope to the stack. + */ + _pushScope() { + let scope2 = this.getScope().clone(); + return this.getStack().push({ + client: this.getClient(), + scope: scope2 + }), scope2; + } + /** + * Pop a scope from the stack. + */ + _popScope() { + return this.getStack().length <= 1 ? !1 : !!this.getStack().pop(); + } + }; + function getAsyncContextStack() { + let registry = carrier.getMainCarrier(), sentry = carrier.getSentryCarrier(registry); + return sentry.stack = sentry.stack || new AsyncContextStack(defaultScopes.getDefaultCurrentScope(), defaultScopes.getDefaultIsolationScope()); + } + function withScope(callback) { + return getAsyncContextStack().withScope(callback); + } + function withSetScope(scope2, callback) { + let stack = getAsyncContextStack(); + return stack.withScope(() => (stack.getStackTop().scope = scope2, callback(scope2))); + } + function withIsolationScope(callback) { + return getAsyncContextStack().withScope(() => callback(getAsyncContextStack().getIsolationScope())); + } + function getStackAsyncContextStrategy() { + return { + withIsolationScope, + withScope, + withSetScope, + withSetIsolationScope: (_isolationScope, callback) => withIsolationScope(callback), + getCurrentScope: () => getAsyncContextStack().getScope(), + getIsolationScope: () => getAsyncContextStack().getIsolationScope() + }; + } + exports.AsyncContextStack = AsyncContextStack; + exports.getStackAsyncContextStrategy = getStackAsyncContextStrategy; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/asyncContext/index.js +var require_asyncContext = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/asyncContext/index.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var carrier = require_carrier(), stackStrategy = require_stackStrategy(); + function setAsyncContextStrategy(strategy) { + let registry = carrier.getMainCarrier(), sentry = carrier.getSentryCarrier(registry); + sentry.acs = strategy; + } + function getAsyncContextStrategy(carrier$1) { + let sentry = carrier.getSentryCarrier(carrier$1); + return sentry.acs ? sentry.acs : stackStrategy.getStackAsyncContextStrategy(); + } + exports.getAsyncContextStrategy = getAsyncContextStrategy; + exports.setAsyncContextStrategy = setAsyncContextStrategy; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/currentScopes.js +var require_currentScopes = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/currentScopes.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), index = require_asyncContext(), carrier = require_carrier(), scope = require_scope(); + function getCurrentScope() { + let carrier$1 = carrier.getMainCarrier(); + return index.getAsyncContextStrategy(carrier$1).getCurrentScope(); + } + function getIsolationScope() { + let carrier$1 = carrier.getMainCarrier(); + return index.getAsyncContextStrategy(carrier$1).getIsolationScope(); + } + function getGlobalScope() { + return utils.getGlobalSingleton("globalScope", () => new scope.Scope()); + } + function withScope(...rest) { + let carrier$1 = carrier.getMainCarrier(), acs = index.getAsyncContextStrategy(carrier$1); + if (rest.length === 2) { + let [scope2, callback] = rest; + return scope2 ? acs.withSetScope(scope2, callback) : acs.withScope(callback); + } + return acs.withScope(rest[0]); + } + function withIsolationScope(...rest) { + let carrier$1 = carrier.getMainCarrier(), acs = index.getAsyncContextStrategy(carrier$1); + if (rest.length === 2) { + let [isolationScope, callback] = rest; + return isolationScope ? acs.withSetIsolationScope(isolationScope, callback) : acs.withIsolationScope(callback); + } + return acs.withIsolationScope(rest[0]); + } + function getClient() { + return getCurrentScope().getClient(); + } + exports.getClient = getClient; + exports.getCurrentScope = getCurrentScope; + exports.getGlobalScope = getGlobalScope; + exports.getIsolationScope = getIsolationScope; + exports.withIsolationScope = withIsolationScope; + exports.withScope = withScope; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/metric-summary.js +var require_metric_summary = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/metric-summary.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), METRICS_SPAN_FIELD = "_sentryMetrics"; + function getMetricSummaryJsonForSpan(span) { + let storage = span[METRICS_SPAN_FIELD]; + if (!storage) + return; + let output = {}; + for (let [, [exportKey, summary]] of storage) + output[exportKey] || (output[exportKey] = []), output[exportKey].push(utils.dropUndefinedKeys(summary)); + return output; + } + function updateMetricSummaryOnSpan(span, metricType, sanitizedName, value, unit, tags, bucketKey) { + let storage = span[METRICS_SPAN_FIELD] || (span[METRICS_SPAN_FIELD] = /* @__PURE__ */ new Map()), exportKey = `${metricType}:${sanitizedName}@${unit}`, bucketItem = storage.get(bucketKey); + if (bucketItem) { + let [, summary] = bucketItem; + storage.set(bucketKey, [ + exportKey, + { + min: Math.min(summary.min, value), + max: Math.max(summary.max, value), + count: summary.count += 1, + sum: summary.sum += value, + tags: summary.tags + } + ]); + } else + storage.set(bucketKey, [ + exportKey, + { + min: value, + max: value, + count: 1, + sum: value, + tags + } + ]); + } + exports.getMetricSummaryJsonForSpan = getMetricSummaryJsonForSpan; + exports.updateMetricSummaryOnSpan = updateMetricSummaryOnSpan; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/semanticAttributes.js +var require_semanticAttributes = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/semanticAttributes.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = "sentry.source", SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = "sentry.sample_rate", SEMANTIC_ATTRIBUTE_SENTRY_OP = "sentry.op", SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = "sentry.origin", SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON = "sentry.idle_span_finish_reason", SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT = "sentry.measurement_unit", SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE = "sentry.measurement_value", SEMANTIC_ATTRIBUTE_PROFILE_ID = "sentry.profile_id", SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME = "sentry.exclusive_time", SEMANTIC_ATTRIBUTE_CACHE_HIT = "cache.hit", SEMANTIC_ATTRIBUTE_CACHE_KEY = "cache.key", SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE = "cache.item_size"; + exports.SEMANTIC_ATTRIBUTE_CACHE_HIT = SEMANTIC_ATTRIBUTE_CACHE_HIT; + exports.SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE = SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE; + exports.SEMANTIC_ATTRIBUTE_CACHE_KEY = SEMANTIC_ATTRIBUTE_CACHE_KEY; + exports.SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME = SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME; + exports.SEMANTIC_ATTRIBUTE_PROFILE_ID = SEMANTIC_ATTRIBUTE_PROFILE_ID; + exports.SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON = SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON; + exports.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT = SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT; + exports.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE = SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE; + exports.SEMANTIC_ATTRIBUTE_SENTRY_OP = SEMANTIC_ATTRIBUTE_SENTRY_OP; + exports.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN; + exports.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE; + exports.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = SEMANTIC_ATTRIBUTE_SENTRY_SOURCE; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/spanstatus.js +var require_spanstatus = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/spanstatus.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var SPAN_STATUS_UNSET = 0, SPAN_STATUS_OK = 1, SPAN_STATUS_ERROR = 2; + function getSpanStatusFromHttpCode(httpStatus) { + if (httpStatus < 400 && httpStatus >= 100) + return { code: SPAN_STATUS_OK }; + if (httpStatus >= 400 && httpStatus < 500) + switch (httpStatus) { + case 401: + return { code: SPAN_STATUS_ERROR, message: "unauthenticated" }; + case 403: + return { code: SPAN_STATUS_ERROR, message: "permission_denied" }; + case 404: + return { code: SPAN_STATUS_ERROR, message: "not_found" }; + case 409: + return { code: SPAN_STATUS_ERROR, message: "already_exists" }; + case 413: + return { code: SPAN_STATUS_ERROR, message: "failed_precondition" }; + case 429: + return { code: SPAN_STATUS_ERROR, message: "resource_exhausted" }; + case 499: + return { code: SPAN_STATUS_ERROR, message: "cancelled" }; + default: + return { code: SPAN_STATUS_ERROR, message: "invalid_argument" }; + } + if (httpStatus >= 500 && httpStatus < 600) + switch (httpStatus) { + case 501: + return { code: SPAN_STATUS_ERROR, message: "unimplemented" }; + case 503: + return { code: SPAN_STATUS_ERROR, message: "unavailable" }; + case 504: + return { code: SPAN_STATUS_ERROR, message: "deadline_exceeded" }; + default: + return { code: SPAN_STATUS_ERROR, message: "internal_error" }; + } + return { code: SPAN_STATUS_ERROR, message: "unknown_error" }; + } + function setHttpStatus(span, httpStatus) { + span.setAttribute("http.response.status_code", httpStatus); + let spanStatus = getSpanStatusFromHttpCode(httpStatus); + spanStatus.message !== "unknown_error" && span.setStatus(spanStatus); + } + exports.SPAN_STATUS_ERROR = SPAN_STATUS_ERROR; + exports.SPAN_STATUS_OK = SPAN_STATUS_OK; + exports.SPAN_STATUS_UNSET = SPAN_STATUS_UNSET; + exports.getSpanStatusFromHttpCode = getSpanStatusFromHttpCode; + exports.setHttpStatus = setHttpStatus; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/spanUtils.js +var require_spanUtils = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/spanUtils.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), index = require_asyncContext(), carrier = require_carrier(), currentScopes = require_currentScopes(), metricSummary = require_metric_summary(), semanticAttributes = require_semanticAttributes(), spanstatus = require_spanstatus(), spanOnScope = require_spanOnScope(), TRACE_FLAG_NONE = 0, TRACE_FLAG_SAMPLED = 1; + function spanToTransactionTraceContext(span) { + let { spanId: span_id, traceId: trace_id } = span.spanContext(), { data, op, parent_span_id, status, origin } = spanToJSON(span); + return utils.dropUndefinedKeys({ + parent_span_id, + span_id, + trace_id, + data, + op, + status, + origin + }); + } + function spanToTraceContext(span) { + let { spanId: span_id, traceId: trace_id } = span.spanContext(), { parent_span_id } = spanToJSON(span); + return utils.dropUndefinedKeys({ parent_span_id, span_id, trace_id }); + } + function spanToTraceHeader(span) { + let { traceId, spanId } = span.spanContext(), sampled = spanIsSampled(span); + return utils.generateSentryTraceHeader(traceId, spanId, sampled); + } + function spanTimeInputToSeconds(input) { + return typeof input == "number" ? ensureTimestampInSeconds(input) : Array.isArray(input) ? input[0] + input[1] / 1e9 : input instanceof Date ? ensureTimestampInSeconds(input.getTime()) : utils.timestampInSeconds(); + } + function ensureTimestampInSeconds(timestamp) { + return timestamp > 9999999999 ? timestamp / 1e3 : timestamp; + } + function spanToJSON(span) { + if (spanIsSentrySpan(span)) + return span.getSpanJSON(); + try { + let { spanId: span_id, traceId: trace_id } = span.spanContext(); + if (spanIsOpenTelemetrySdkTraceBaseSpan(span)) { + let { attributes, startTime, name, endTime, parentSpanId, status } = span; + return utils.dropUndefinedKeys({ + span_id, + trace_id, + data: attributes, + description: name, + parent_span_id: parentSpanId, + start_timestamp: spanTimeInputToSeconds(startTime), + // This is [0,0] by default in OTEL, in which case we want to interpret this as no end time + timestamp: spanTimeInputToSeconds(endTime) || void 0, + status: getStatusMessage(status), + op: attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP], + origin: attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN], + _metrics_summary: metricSummary.getMetricSummaryJsonForSpan(span) + }); + } + return { + span_id, + trace_id + }; + } catch { + return {}; + } + } + function spanIsOpenTelemetrySdkTraceBaseSpan(span) { + let castSpan = span; + return !!castSpan.attributes && !!castSpan.startTime && !!castSpan.name && !!castSpan.endTime && !!castSpan.status; + } + function spanIsSentrySpan(span) { + return typeof span.getSpanJSON == "function"; + } + function spanIsSampled(span) { + let { traceFlags } = span.spanContext(); + return traceFlags === TRACE_FLAG_SAMPLED; + } + function getStatusMessage(status) { + if (!(!status || status.code === spanstatus.SPAN_STATUS_UNSET)) + return status.code === spanstatus.SPAN_STATUS_OK ? "ok" : status.message || "unknown_error"; + } + var CHILD_SPANS_FIELD = "_sentryChildSpans", ROOT_SPAN_FIELD = "_sentryRootSpan"; + function addChildSpanToSpan(span, childSpan) { + let rootSpan = span[ROOT_SPAN_FIELD] || span; + utils.addNonEnumerableProperty(childSpan, ROOT_SPAN_FIELD, rootSpan), span[CHILD_SPANS_FIELD] ? span[CHILD_SPANS_FIELD].add(childSpan) : utils.addNonEnumerableProperty(span, CHILD_SPANS_FIELD, /* @__PURE__ */ new Set([childSpan])); + } + function removeChildSpanFromSpan(span, childSpan) { + span[CHILD_SPANS_FIELD] && span[CHILD_SPANS_FIELD].delete(childSpan); + } + function getSpanDescendants(span) { + let resultSet = /* @__PURE__ */ new Set(); + function addSpanChildren(span2) { + if (!resultSet.has(span2) && spanIsSampled(span2)) { + resultSet.add(span2); + let childSpans = span2[CHILD_SPANS_FIELD] ? Array.from(span2[CHILD_SPANS_FIELD]) : []; + for (let childSpan of childSpans) + addSpanChildren(childSpan); + } + } + return addSpanChildren(span), Array.from(resultSet); + } + function getRootSpan(span) { + return span[ROOT_SPAN_FIELD] || span; + } + function getActiveSpan() { + let carrier$1 = carrier.getMainCarrier(), acs = index.getAsyncContextStrategy(carrier$1); + return acs.getActiveSpan ? acs.getActiveSpan() : spanOnScope._getSpanForScope(currentScopes.getCurrentScope()); + } + function updateMetricSummaryOnActiveSpan(metricType, sanitizedName, value, unit, tags, bucketKey) { + let span = getActiveSpan(); + span && metricSummary.updateMetricSummaryOnSpan(span, metricType, sanitizedName, value, unit, tags, bucketKey); + } + exports.TRACE_FLAG_NONE = TRACE_FLAG_NONE; + exports.TRACE_FLAG_SAMPLED = TRACE_FLAG_SAMPLED; + exports.addChildSpanToSpan = addChildSpanToSpan; + exports.getActiveSpan = getActiveSpan; + exports.getRootSpan = getRootSpan; + exports.getSpanDescendants = getSpanDescendants; + exports.getStatusMessage = getStatusMessage; + exports.removeChildSpanFromSpan = removeChildSpanFromSpan; + exports.spanIsSampled = spanIsSampled; + exports.spanTimeInputToSeconds = spanTimeInputToSeconds; + exports.spanToJSON = spanToJSON; + exports.spanToTraceContext = spanToTraceContext; + exports.spanToTraceHeader = spanToTraceHeader; + exports.spanToTransactionTraceContext = spanToTransactionTraceContext; + exports.updateMetricSummaryOnActiveSpan = updateMetricSummaryOnActiveSpan; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/errors.js +var require_errors = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/errors.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), debugBuild = require_debug_build2(), spanUtils = require_spanUtils(), spanstatus = require_spanstatus(), errorsInstrumented = !1; + function registerSpanErrorInstrumentation() { + errorsInstrumented || (errorsInstrumented = !0, utils.addGlobalErrorInstrumentationHandler(errorCallback), utils.addGlobalUnhandledRejectionInstrumentationHandler(errorCallback)); + } + function errorCallback() { + let activeSpan = spanUtils.getActiveSpan(), rootSpan = activeSpan && spanUtils.getRootSpan(activeSpan); + if (rootSpan) { + let message = "internal_error"; + debugBuild.DEBUG_BUILD && utils.logger.log(`[Tracing] Root span: ${message} -> Global error occured`), rootSpan.setStatus({ code: spanstatus.SPAN_STATUS_ERROR, message }); + } + } + errorCallback.tag = "sentry_tracingErrorCallback"; + exports.registerSpanErrorInstrumentation = registerSpanErrorInstrumentation; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/utils.js +var require_utils = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/utils.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), SCOPE_ON_START_SPAN_FIELD = "_sentryScope", ISOLATION_SCOPE_ON_START_SPAN_FIELD = "_sentryIsolationScope"; + function setCapturedScopesOnSpan(span, scope, isolationScope) { + span && (utils.addNonEnumerableProperty(span, ISOLATION_SCOPE_ON_START_SPAN_FIELD, isolationScope), utils.addNonEnumerableProperty(span, SCOPE_ON_START_SPAN_FIELD, scope)); + } + function getCapturedScopesOnSpan(span) { + return { + scope: span[SCOPE_ON_START_SPAN_FIELD], + isolationScope: span[ISOLATION_SCOPE_ON_START_SPAN_FIELD] + }; + } + exports.stripUrlQueryAndFragment = utils.stripUrlQueryAndFragment; + exports.getCapturedScopesOnSpan = getCapturedScopesOnSpan; + exports.setCapturedScopesOnSpan = setCapturedScopesOnSpan; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/hubextensions.js +var require_hubextensions = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/hubextensions.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var errors = require_errors(); + function addTracingExtensions() { + errors.registerSpanErrorInstrumentation(); + } + exports.addTracingExtensions = addTracingExtensions; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/hasTracingEnabled.js +var require_hasTracingEnabled = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/hasTracingEnabled.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var currentScopes = require_currentScopes(); + function hasTracingEnabled(maybeOptions) { + if (typeof __SENTRY_TRACING__ == "boolean" && !__SENTRY_TRACING__) + return !1; + let options = maybeOptions || getClientOptions(); + return !!options && (options.enableTracing || "tracesSampleRate" in options || "tracesSampler" in options); + } + function getClientOptions() { + let client = currentScopes.getClient(); + return client && client.getOptions(); + } + exports.hasTracingEnabled = hasTracingEnabled; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/sentryNonRecordingSpan.js +var require_sentryNonRecordingSpan = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/sentryNonRecordingSpan.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), spanUtils = require_spanUtils(), SentryNonRecordingSpan = class { + constructor(spanContext = {}) { + this._traceId = spanContext.traceId || utils.uuid4(), this._spanId = spanContext.spanId || utils.uuid4().substring(16); + } + /** @inheritdoc */ + spanContext() { + return { + spanId: this._spanId, + traceId: this._traceId, + traceFlags: spanUtils.TRACE_FLAG_NONE + }; + } + /** @inheritdoc */ + // eslint-disable-next-line @typescript-eslint/no-empty-function + end(_timestamp) { + } + /** @inheritdoc */ + setAttribute(_key, _value) { + return this; + } + /** @inheritdoc */ + setAttributes(_values) { + return this; + } + /** @inheritdoc */ + setStatus(_status) { + return this; + } + /** @inheritdoc */ + updateName(_name) { + return this; + } + /** @inheritdoc */ + isRecording() { + return !1; + } + /** @inheritdoc */ + addEvent(_name, _attributesOrStartTime, _startTime) { + return this; + } + }; + exports.SentryNonRecordingSpan = SentryNonRecordingSpan; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/handleCallbackErrors.js +var require_handleCallbackErrors = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/handleCallbackErrors.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(); + function handleCallbackErrors(fn, onError, onFinally = () => { + }) { + let maybePromiseResult; + try { + maybePromiseResult = fn(); + } catch (e) { + throw onError(e), onFinally(), e; + } + return maybeHandlePromiseRejection(maybePromiseResult, onError, onFinally); + } + function maybeHandlePromiseRejection(value, onError, onFinally) { + return utils.isThenable(value) ? value.then( + (res) => (onFinally(), res), + (e) => { + throw onError(e), onFinally(), e; + } + ) : (onFinally(), value); + } + exports.handleCallbackErrors = handleCallbackErrors; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/constants.js +var require_constants = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/constants.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var DEFAULT_ENVIRONMENT = "production"; + exports.DEFAULT_ENVIRONMENT = DEFAULT_ENVIRONMENT; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/dynamicSamplingContext.js +var require_dynamicSamplingContext = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/dynamicSamplingContext.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), constants = require_constants(), currentScopes = require_currentScopes(), semanticAttributes = require_semanticAttributes(), spanUtils = require_spanUtils(), FROZEN_DSC_FIELD = "_frozenDsc"; + function freezeDscOnSpan(span, dsc) { + let spanWithMaybeDsc = span; + utils.addNonEnumerableProperty(spanWithMaybeDsc, FROZEN_DSC_FIELD, dsc); + } + function getDynamicSamplingContextFromClient(trace_id, client) { + let options = client.getOptions(), { publicKey: public_key } = client.getDsn() || {}, dsc = utils.dropUndefinedKeys({ + environment: options.environment || constants.DEFAULT_ENVIRONMENT, + release: options.release, + public_key, + trace_id + }); + return client.emit("createDsc", dsc), dsc; + } + function getDynamicSamplingContextFromSpan(span) { + let client = currentScopes.getClient(); + if (!client) + return {}; + let dsc = getDynamicSamplingContextFromClient(spanUtils.spanToJSON(span).trace_id || "", client), rootSpan = spanUtils.getRootSpan(span); + if (!rootSpan) + return dsc; + let frozenDsc = rootSpan[FROZEN_DSC_FIELD]; + if (frozenDsc) + return frozenDsc; + let jsonSpan = spanUtils.spanToJSON(rootSpan), attributes = jsonSpan.data || {}, maybeSampleRate = attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]; + maybeSampleRate != null && (dsc.sample_rate = `${maybeSampleRate}`); + let source = attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]; + return source && source !== "url" && (dsc.transaction = jsonSpan.description), dsc.sampled = String(spanUtils.spanIsSampled(rootSpan)), client.emit("createDsc", dsc), dsc; + } + function spanToBaggageHeader(span) { + let dsc = getDynamicSamplingContextFromSpan(span); + return utils.dynamicSamplingContextToSentryBaggageHeader(dsc); + } + exports.freezeDscOnSpan = freezeDscOnSpan; + exports.getDynamicSamplingContextFromClient = getDynamicSamplingContextFromClient; + exports.getDynamicSamplingContextFromSpan = getDynamicSamplingContextFromSpan; + exports.spanToBaggageHeader = spanToBaggageHeader; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/logSpans.js +var require_logSpans = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/logSpans.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), debugBuild = require_debug_build2(), spanUtils = require_spanUtils(); + function logSpanStart(span) { + if (!debugBuild.DEBUG_BUILD) return; + let { description = "< unknown name >", op = "< unknown op >", parent_span_id: parentSpanId } = spanUtils.spanToJSON(span), { spanId } = span.spanContext(), sampled = spanUtils.spanIsSampled(span), rootSpan = spanUtils.getRootSpan(span), isRootSpan = rootSpan === span, header = `[Tracing] Starting ${sampled ? "sampled" : "unsampled"} ${isRootSpan ? "root " : ""}span`, infoParts = [`op: ${op}`, `name: ${description}`, `ID: ${spanId}`]; + if (parentSpanId && infoParts.push(`parent ID: ${parentSpanId}`), !isRootSpan) { + let { op: op2, description: description2 } = spanUtils.spanToJSON(rootSpan); + infoParts.push(`root ID: ${rootSpan.spanContext().spanId}`), op2 && infoParts.push(`root op: ${op2}`), description2 && infoParts.push(`root description: ${description2}`); + } + utils.logger.log(`${header} + ${infoParts.join(` + `)}`); + } + function logSpanEnd(span) { + if (!debugBuild.DEBUG_BUILD) return; + let { description = "< unknown name >", op = "< unknown op >" } = spanUtils.spanToJSON(span), { spanId } = span.spanContext(), isRootSpan = spanUtils.getRootSpan(span) === span, msg = `[Tracing] Finishing "${op}" ${isRootSpan ? "root " : ""}span "${description}" with ID ${spanId}`; + utils.logger.log(msg); + } + exports.logSpanEnd = logSpanEnd; + exports.logSpanStart = logSpanStart; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/parseSampleRate.js +var require_parseSampleRate = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/parseSampleRate.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), debugBuild = require_debug_build2(); + function parseSampleRate(sampleRate) { + if (typeof sampleRate == "boolean") + return Number(sampleRate); + let rate = typeof sampleRate == "string" ? parseFloat(sampleRate) : sampleRate; + if (typeof rate != "number" || isNaN(rate) || rate < 0 || rate > 1) { + debugBuild.DEBUG_BUILD && utils.logger.warn( + `[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify( + sampleRate + )} of type ${JSON.stringify(typeof sampleRate)}.` + ); + return; + } + return rate; + } + exports.parseSampleRate = parseSampleRate; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/sampling.js +var require_sampling = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/sampling.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), debugBuild = require_debug_build2(), hasTracingEnabled = require_hasTracingEnabled(), parseSampleRate = require_parseSampleRate(); + function sampleSpan(options, samplingContext) { + if (!hasTracingEnabled.hasTracingEnabled(options)) + return [!1]; + let sampleRate; + typeof options.tracesSampler == "function" ? sampleRate = options.tracesSampler(samplingContext) : samplingContext.parentSampled !== void 0 ? sampleRate = samplingContext.parentSampled : typeof options.tracesSampleRate < "u" ? sampleRate = options.tracesSampleRate : sampleRate = 1; + let parsedSampleRate = parseSampleRate.parseSampleRate(sampleRate); + return parsedSampleRate === void 0 ? (debugBuild.DEBUG_BUILD && utils.logger.warn("[Tracing] Discarding transaction because of invalid sample rate."), [!1]) : parsedSampleRate ? Math.random() < parsedSampleRate ? [!0, parsedSampleRate] : (debugBuild.DEBUG_BUILD && utils.logger.log( + `[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number( + sampleRate + )})` + ), [!1, parsedSampleRate]) : (debugBuild.DEBUG_BUILD && utils.logger.log( + `[Tracing] Discarding transaction because ${typeof options.tracesSampler == "function" ? "tracesSampler returned 0 or false" : "a negative sampling decision was inherited or tracesSampleRate is set to 0"}` + ), [!1, parsedSampleRate]); + } + exports.sampleSpan = sampleSpan; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/envelope.js +var require_envelope2 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/envelope.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), dynamicSamplingContext = require_dynamicSamplingContext(), spanUtils = require_spanUtils(); + function enhanceEventWithSdkInfo(event, sdkInfo) { + return sdkInfo && (event.sdk = event.sdk || {}, event.sdk.name = event.sdk.name || sdkInfo.name, event.sdk.version = event.sdk.version || sdkInfo.version, event.sdk.integrations = [...event.sdk.integrations || [], ...sdkInfo.integrations || []], event.sdk.packages = [...event.sdk.packages || [], ...sdkInfo.packages || []]), event; + } + function createSessionEnvelope(session, dsn, metadata, tunnel) { + let sdkInfo = utils.getSdkMetadataForEnvelopeHeader(metadata), envelopeHeaders = { + sent_at: (/* @__PURE__ */ new Date()).toISOString(), + ...sdkInfo && { sdk: sdkInfo }, + ...!!tunnel && dsn && { dsn: utils.dsnToString(dsn) } + }, envelopeItem = "aggregates" in session ? [{ type: "sessions" }, session] : [{ type: "session" }, session.toJSON()]; + return utils.createEnvelope(envelopeHeaders, [envelopeItem]); + } + function createEventEnvelope(event, dsn, metadata, tunnel) { + let sdkInfo = utils.getSdkMetadataForEnvelopeHeader(metadata), eventType = event.type && event.type !== "replay_event" ? event.type : "event"; + enhanceEventWithSdkInfo(event, metadata && metadata.sdk); + let envelopeHeaders = utils.createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn); + delete event.sdkProcessingMetadata; + let eventItem = [{ type: eventType }, event]; + return utils.createEnvelope(envelopeHeaders, [eventItem]); + } + function createSpanEnvelope(spans, client) { + function dscHasRequiredProps(dsc2) { + return !!dsc2.trace_id && !!dsc2.public_key; + } + let dsc = dynamicSamplingContext.getDynamicSamplingContextFromSpan(spans[0]), dsn = client && client.getDsn(), tunnel = client && client.getOptions().tunnel, headers = { + sent_at: (/* @__PURE__ */ new Date()).toISOString(), + ...dscHasRequiredProps(dsc) && { trace: dsc }, + ...!!tunnel && dsn && { dsn: utils.dsnToString(dsn) } + }, beforeSendSpan = client && client.getOptions().beforeSendSpan, convertToSpanJSON = beforeSendSpan ? (span) => beforeSendSpan(spanUtils.spanToJSON(span)) : (span) => spanUtils.spanToJSON(span), items = []; + for (let span of spans) { + let spanJson = convertToSpanJSON(span); + spanJson && items.push(utils.createSpanEnvelopeItem(spanJson)); + } + return utils.createEnvelope(headers, items); + } + exports.createEventEnvelope = createEventEnvelope; + exports.createSessionEnvelope = createSessionEnvelope; + exports.createSpanEnvelope = createSpanEnvelope; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/measurement.js +var require_measurement = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/measurement.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var semanticAttributes = require_semanticAttributes(), spanUtils = require_spanUtils(); + function setMeasurement(name, value, unit) { + let activeSpan = spanUtils.getActiveSpan(), rootSpan = activeSpan && spanUtils.getRootSpan(activeSpan); + rootSpan && rootSpan.addEvent(name, { + [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]: value, + [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]: unit + }); + } + function timedEventsToMeasurements(events) { + if (!events || events.length === 0) + return; + let measurements = {}; + return events.forEach((event) => { + let attributes = event.attributes || {}, unit = attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT], value = attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]; + typeof unit == "string" && typeof value == "number" && (measurements[event.name] = { value, unit }); + }), measurements; + } + exports.setMeasurement = setMeasurement; + exports.timedEventsToMeasurements = timedEventsToMeasurements; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/sentrySpan.js +var require_sentrySpan = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/sentrySpan.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), debugBuild = require_debug_build2(), envelope = require_envelope2(), metricSummary = require_metric_summary(), semanticAttributes = require_semanticAttributes(), spanUtils = require_spanUtils(), dynamicSamplingContext = require_dynamicSamplingContext(), logSpans = require_logSpans(), measurement = require_measurement(), utils$1 = require_utils(), MAX_SPAN_COUNT = 1e3, SentrySpan = class { + /** Epoch timestamp in seconds when the span started. */ + /** Epoch timestamp in seconds when the span ended. */ + /** Internal keeper of the status */ + /** The timed events added to this span. */ + /** if true, treat span as a standalone span (not part of a transaction) */ + /** + * You should never call the constructor manually, always use `Sentry.startSpan()` + * or other span methods. + * @internal + * @hideconstructor + * @hidden + */ + constructor(spanContext = {}) { + this._traceId = spanContext.traceId || utils.uuid4(), this._spanId = spanContext.spanId || utils.uuid4().substring(16), this._startTime = spanContext.startTimestamp || utils.timestampInSeconds(), this._attributes = {}, this.setAttributes({ + [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "manual", + [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP]: spanContext.op, + ...spanContext.attributes + }), this._name = spanContext.name, spanContext.parentSpanId && (this._parentSpanId = spanContext.parentSpanId), "sampled" in spanContext && (this._sampled = spanContext.sampled), spanContext.endTimestamp && (this._endTime = spanContext.endTimestamp), this._events = [], this._isStandaloneSpan = spanContext.isStandalone, this._endTime && this._onSpanEnded(); + } + /** @inheritdoc */ + spanContext() { + let { _spanId: spanId, _traceId: traceId, _sampled: sampled } = this; + return { + spanId, + traceId, + traceFlags: sampled ? spanUtils.TRACE_FLAG_SAMPLED : spanUtils.TRACE_FLAG_NONE + }; + } + /** @inheritdoc */ + setAttribute(key, value) { + value === void 0 ? delete this._attributes[key] : this._attributes[key] = value; + } + /** @inheritdoc */ + setAttributes(attributes) { + Object.keys(attributes).forEach((key) => this.setAttribute(key, attributes[key])); + } + /** + * This should generally not be used, + * but we need it for browser tracing where we want to adjust the start time afterwards. + * USE THIS WITH CAUTION! + * + * @hidden + * @internal + */ + updateStartTime(timeInput) { + this._startTime = spanUtils.spanTimeInputToSeconds(timeInput); + } + /** + * @inheritDoc + */ + setStatus(value) { + return this._status = value, this; + } + /** + * @inheritDoc + */ + updateName(name) { + return this._name = name, this; + } + /** @inheritdoc */ + end(endTimestamp) { + this._endTime || (this._endTime = spanUtils.spanTimeInputToSeconds(endTimestamp), logSpans.logSpanEnd(this), this._onSpanEnded()); + } + /** + * Get JSON representation of this span. + * + * @hidden + * @internal This method is purely for internal purposes and should not be used outside + * of SDK code. If you need to get a JSON representation of a span, + * use `spanToJSON(span)` instead. + */ + getSpanJSON() { + return utils.dropUndefinedKeys({ + data: this._attributes, + description: this._name, + op: this._attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP], + parent_span_id: this._parentSpanId, + span_id: this._spanId, + start_timestamp: this._startTime, + status: spanUtils.getStatusMessage(this._status), + timestamp: this._endTime, + trace_id: this._traceId, + origin: this._attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN], + _metrics_summary: metricSummary.getMetricSummaryJsonForSpan(this), + profile_id: this._attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_PROFILE_ID], + exclusive_time: this._attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME], + measurements: measurement.timedEventsToMeasurements(this._events), + is_segment: this._isStandaloneSpan && spanUtils.getRootSpan(this) === this || void 0, + segment_id: this._isStandaloneSpan ? spanUtils.getRootSpan(this).spanContext().spanId : void 0 + }); + } + /** @inheritdoc */ + isRecording() { + return !this._endTime && !!this._sampled; + } + /** + * @inheritdoc + */ + addEvent(name, attributesOrStartTime, startTime) { + debugBuild.DEBUG_BUILD && utils.logger.log("[Tracing] Adding an event to span:", name); + let time = isSpanTimeInput(attributesOrStartTime) ? attributesOrStartTime : startTime || utils.timestampInSeconds(), attributes = isSpanTimeInput(attributesOrStartTime) ? {} : attributesOrStartTime || {}, event = { + name, + time: spanUtils.spanTimeInputToSeconds(time), + attributes + }; + return this._events.push(event), this; + } + /** + * This method should generally not be used, + * but for now we need a way to publicly check if the `_isStandaloneSpan` flag is set. + * USE THIS WITH CAUTION! + * @internal + * @hidden + * @experimental + */ + isStandaloneSpan() { + return !!this._isStandaloneSpan; + } + /** Emit `spanEnd` when the span is ended. */ + _onSpanEnded() { + let client = currentScopes.getClient(); + if (client && client.emit("spanEnd", this), !(this._isStandaloneSpan || this === spanUtils.getRootSpan(this))) + return; + if (this._isStandaloneSpan) { + sendSpanEnvelope(envelope.createSpanEnvelope([this], client)); + return; + } + let transactionEvent = this._convertSpanToTransaction(); + transactionEvent && (utils$1.getCapturedScopesOnSpan(this).scope || currentScopes.getCurrentScope()).captureEvent(transactionEvent); + } + /** + * Finish the transaction & prepare the event to send to Sentry. + */ + _convertSpanToTransaction() { + if (!isFullFinishedSpan(spanUtils.spanToJSON(this))) + return; + this._name || (debugBuild.DEBUG_BUILD && utils.logger.warn("Transaction has no name, falling back to ``."), this._name = ""); + let { scope: capturedSpanScope, isolationScope: capturedSpanIsolationScope } = utils$1.getCapturedScopesOnSpan(this), client = (capturedSpanScope || currentScopes.getCurrentScope()).getClient() || currentScopes.getClient(); + if (this._sampled !== !0) { + debugBuild.DEBUG_BUILD && utils.logger.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."), client && client.recordDroppedEvent("sample_rate", "transaction"); + return; + } + let spans = spanUtils.getSpanDescendants(this).filter((span) => span !== this && !isStandaloneSpan(span)).map((span) => spanUtils.spanToJSON(span)).filter(isFullFinishedSpan), source = this._attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE], transaction = { + contexts: { + trace: spanUtils.spanToTransactionTraceContext(this) + }, + spans: ( + // spans.sort() mutates the array, but `spans` is already a copy so we can safely do this here + // we do not use spans anymore after this point + spans.length > MAX_SPAN_COUNT ? spans.sort((a, b) => a.start_timestamp - b.start_timestamp).slice(0, MAX_SPAN_COUNT) : spans + ), + start_timestamp: this._startTime, + timestamp: this._endTime, + transaction: this._name, + type: "transaction", + sdkProcessingMetadata: { + capturedSpanScope, + capturedSpanIsolationScope, + ...utils.dropUndefinedKeys({ + dynamicSamplingContext: dynamicSamplingContext.getDynamicSamplingContextFromSpan(this) + }) + }, + _metrics_summary: metricSummary.getMetricSummaryJsonForSpan(this), + ...source && { + transaction_info: { + source + } + } + }, measurements = measurement.timedEventsToMeasurements(this._events); + return measurements && Object.keys(measurements).length && (debugBuild.DEBUG_BUILD && utils.logger.log( + "[Measurements] Adding measurements to transaction event", + JSON.stringify(measurements, void 0, 2) + ), transaction.measurements = measurements), transaction; + } + }; + function isSpanTimeInput(value) { + return value && typeof value == "number" || value instanceof Date || Array.isArray(value); + } + function isFullFinishedSpan(input) { + return !!input.start_timestamp && !!input.timestamp && !!input.span_id && !!input.trace_id; + } + function isStandaloneSpan(span) { + return span instanceof SentrySpan && span.isStandaloneSpan(); + } + function sendSpanEnvelope(envelope2) { + let client = currentScopes.getClient(); + if (!client) + return; + let spanItems = envelope2[1]; + if (!spanItems || spanItems.length === 0) { + client.recordDroppedEvent("before_send", "span"); + return; + } + let transport = client.getTransport(); + transport && transport.send(envelope2).then(null, (reason) => { + debugBuild.DEBUG_BUILD && utils.logger.error("Error while sending span:", reason); + }); + } + exports.SentrySpan = SentrySpan; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/trace.js +var require_trace = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/trace.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), carrier = require_carrier(), currentScopes = require_currentScopes(), index = require_asyncContext(), debugBuild = require_debug_build2(), semanticAttributes = require_semanticAttributes(), handleCallbackErrors = require_handleCallbackErrors(), hasTracingEnabled = require_hasTracingEnabled(), spanOnScope = require_spanOnScope(), spanUtils = require_spanUtils(), dynamicSamplingContext = require_dynamicSamplingContext(), logSpans = require_logSpans(), sampling = require_sampling(), sentryNonRecordingSpan = require_sentryNonRecordingSpan(), sentrySpan = require_sentrySpan(), spanstatus = require_spanstatus(), utils$1 = require_utils(), SUPPRESS_TRACING_KEY = "__SENTRY_SUPPRESS_TRACING__"; + function startSpan(context, callback) { + let acs = getAcs(); + if (acs.startSpan) + return acs.startSpan(context, callback); + let spanContext = normalizeContext(context); + return currentScopes.withScope(context.scope, (scope) => { + let parentSpan = getParentSpan(scope), activeSpan = context.onlyIfParent && !parentSpan ? new sentryNonRecordingSpan.SentryNonRecordingSpan() : createChildOrRootSpan({ + parentSpan, + spanContext, + forceTransaction: context.forceTransaction, + scope + }); + return spanOnScope._setSpanForScope(scope, activeSpan), handleCallbackErrors.handleCallbackErrors( + () => callback(activeSpan), + () => { + let { status } = spanUtils.spanToJSON(activeSpan); + activeSpan.isRecording() && (!status || status === "ok") && activeSpan.setStatus({ code: spanstatus.SPAN_STATUS_ERROR, message: "internal_error" }); + }, + () => activeSpan.end() + ); + }); + } + function startSpanManual(context, callback) { + let acs = getAcs(); + if (acs.startSpanManual) + return acs.startSpanManual(context, callback); + let spanContext = normalizeContext(context); + return currentScopes.withScope(context.scope, (scope) => { + let parentSpan = getParentSpan(scope), activeSpan = context.onlyIfParent && !parentSpan ? new sentryNonRecordingSpan.SentryNonRecordingSpan() : createChildOrRootSpan({ + parentSpan, + spanContext, + forceTransaction: context.forceTransaction, + scope + }); + spanOnScope._setSpanForScope(scope, activeSpan); + function finishAndSetSpan() { + activeSpan.end(); + } + return handleCallbackErrors.handleCallbackErrors( + () => callback(activeSpan, finishAndSetSpan), + () => { + let { status } = spanUtils.spanToJSON(activeSpan); + activeSpan.isRecording() && (!status || status === "ok") && activeSpan.setStatus({ code: spanstatus.SPAN_STATUS_ERROR, message: "internal_error" }); + } + ); + }); + } + function startInactiveSpan(context) { + let acs = getAcs(); + if (acs.startInactiveSpan) + return acs.startInactiveSpan(context); + let spanContext = normalizeContext(context), scope = context.scope || currentScopes.getCurrentScope(), parentSpan = getParentSpan(scope); + return context.onlyIfParent && !parentSpan ? new sentryNonRecordingSpan.SentryNonRecordingSpan() : createChildOrRootSpan({ + parentSpan, + spanContext, + forceTransaction: context.forceTransaction, + scope + }); + } + var continueTrace = ({ + sentryTrace, + baggage + }, callback) => currentScopes.withScope((scope) => { + let propagationContext = utils.propagationContextFromHeaders(sentryTrace, baggage); + return scope.setPropagationContext(propagationContext), callback(); + }); + function withActiveSpan(span, callback) { + let acs = getAcs(); + return acs.withActiveSpan ? acs.withActiveSpan(span, callback) : currentScopes.withScope((scope) => (spanOnScope._setSpanForScope(scope, span || void 0), callback(scope))); + } + function suppressTracing(callback) { + let acs = getAcs(); + return acs.suppressTracing ? acs.suppressTracing(callback) : currentScopes.withScope((scope) => (scope.setSDKProcessingMetadata({ [SUPPRESS_TRACING_KEY]: !0 }), callback())); + } + function startNewTrace(callback) { + return currentScopes.withScope((scope) => (scope.setPropagationContext(utils.generatePropagationContext()), debugBuild.DEBUG_BUILD && utils.logger.info(`Starting a new trace with id ${scope.getPropagationContext().traceId}`), withActiveSpan(null, callback))); + } + function createChildOrRootSpan({ + parentSpan, + spanContext, + forceTransaction, + scope + }) { + if (!hasTracingEnabled.hasTracingEnabled()) + return new sentryNonRecordingSpan.SentryNonRecordingSpan(); + let isolationScope = currentScopes.getIsolationScope(), span; + if (parentSpan && !forceTransaction) + span = _startChildSpan(parentSpan, scope, spanContext), spanUtils.addChildSpanToSpan(parentSpan, span); + else if (parentSpan) { + let dsc = dynamicSamplingContext.getDynamicSamplingContextFromSpan(parentSpan), { traceId, spanId: parentSpanId } = parentSpan.spanContext(), parentSampled = spanUtils.spanIsSampled(parentSpan); + span = _startRootSpan( + { + traceId, + parentSpanId, + ...spanContext + }, + scope, + parentSampled + ), dynamicSamplingContext.freezeDscOnSpan(span, dsc); + } else { + let { + traceId, + dsc, + parentSpanId, + sampled: parentSampled + } = { + ...isolationScope.getPropagationContext(), + ...scope.getPropagationContext() + }; + span = _startRootSpan( + { + traceId, + parentSpanId, + ...spanContext + }, + scope, + parentSampled + ), dsc && dynamicSamplingContext.freezeDscOnSpan(span, dsc); + } + return logSpans.logSpanStart(span), utils$1.setCapturedScopesOnSpan(span, scope, isolationScope), span; + } + function normalizeContext(context) { + let initialCtx = { + isStandalone: (context.experimental || {}).standalone, + ...context + }; + if (context.startTime) { + let ctx = { ...initialCtx }; + return ctx.startTimestamp = spanUtils.spanTimeInputToSeconds(context.startTime), delete ctx.startTime, ctx; + } + return initialCtx; + } + function getAcs() { + let carrier$1 = carrier.getMainCarrier(); + return index.getAsyncContextStrategy(carrier$1); + } + function _startRootSpan(spanArguments, scope, parentSampled) { + let client = currentScopes.getClient(), options = client && client.getOptions() || {}, { name = "", attributes } = spanArguments, [sampled, sampleRate] = scope.getScopeData().sdkProcessingMetadata[SUPPRESS_TRACING_KEY] ? [!1] : sampling.sampleSpan(options, { + name, + parentSampled, + attributes, + transactionContext: { + name, + parentSampled + } + }), rootSpan = new sentrySpan.SentrySpan({ + ...spanArguments, + attributes: { + [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: "custom", + ...spanArguments.attributes + }, + sampled + }); + return sampleRate !== void 0 && rootSpan.setAttribute(semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, sampleRate), client && client.emit("spanStart", rootSpan), rootSpan; + } + function _startChildSpan(parentSpan, scope, spanArguments) { + let { spanId, traceId } = parentSpan.spanContext(), sampled = scope.getScopeData().sdkProcessingMetadata[SUPPRESS_TRACING_KEY] ? !1 : spanUtils.spanIsSampled(parentSpan), childSpan = sampled ? new sentrySpan.SentrySpan({ + ...spanArguments, + parentSpanId: spanId, + traceId, + sampled + }) : new sentryNonRecordingSpan.SentryNonRecordingSpan({ traceId }); + spanUtils.addChildSpanToSpan(parentSpan, childSpan); + let client = currentScopes.getClient(); + return client && (client.emit("spanStart", childSpan), spanArguments.endTimestamp && client.emit("spanEnd", childSpan)), childSpan; + } + function getParentSpan(scope) { + let span = spanOnScope._getSpanForScope(scope); + if (!span) + return; + let client = currentScopes.getClient(); + return (client ? client.getOptions() : {}).parentSpanIsAlwaysRootSpan ? spanUtils.getRootSpan(span) : span; + } + exports.continueTrace = continueTrace; + exports.startInactiveSpan = startInactiveSpan; + exports.startNewTrace = startNewTrace; + exports.startSpan = startSpan; + exports.startSpanManual = startSpanManual; + exports.suppressTracing = suppressTracing; + exports.withActiveSpan = withActiveSpan; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/idleSpan.js +var require_idleSpan = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/tracing/idleSpan.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), debugBuild = require_debug_build2(), semanticAttributes = require_semanticAttributes(), hasTracingEnabled = require_hasTracingEnabled(), spanOnScope = require_spanOnScope(), spanUtils = require_spanUtils(), sentryNonRecordingSpan = require_sentryNonRecordingSpan(), spanstatus = require_spanstatus(), trace = require_trace(), TRACING_DEFAULTS = { + idleTimeout: 1e3, + finalTimeout: 3e4, + childSpanTimeout: 15e3 + }, FINISH_REASON_HEARTBEAT_FAILED = "heartbeatFailed", FINISH_REASON_IDLE_TIMEOUT = "idleTimeout", FINISH_REASON_FINAL_TIMEOUT = "finalTimeout", FINISH_REASON_EXTERNAL_FINISH = "externalFinish"; + function startIdleSpan(startSpanOptions, options = {}) { + let activities = /* @__PURE__ */ new Map(), _finished = !1, _idleTimeoutID, _finishReason = FINISH_REASON_EXTERNAL_FINISH, _autoFinishAllowed = !options.disableAutoFinish, { + idleTimeout = TRACING_DEFAULTS.idleTimeout, + finalTimeout = TRACING_DEFAULTS.finalTimeout, + childSpanTimeout = TRACING_DEFAULTS.childSpanTimeout, + beforeSpanEnd + } = options, client = currentScopes.getClient(); + if (!client || !hasTracingEnabled.hasTracingEnabled()) + return new sentryNonRecordingSpan.SentryNonRecordingSpan(); + let scope = currentScopes.getCurrentScope(), previousActiveSpan = spanUtils.getActiveSpan(), span = _startIdleSpan(startSpanOptions); + span.end = new Proxy(span.end, { + apply(target, thisArg, args) { + beforeSpanEnd && beforeSpanEnd(span); + let [definedEndTimestamp, ...rest] = args, timestamp = definedEndTimestamp || utils.timestampInSeconds(), spanEndTimestamp = spanUtils.spanTimeInputToSeconds(timestamp), spans = spanUtils.getSpanDescendants(span).filter((child) => child !== span); + if (!spans.length) + return onIdleSpanEnded(spanEndTimestamp), Reflect.apply(target, thisArg, [spanEndTimestamp, ...rest]); + let childEndTimestamps = spans.map((span2) => spanUtils.spanToJSON(span2).timestamp).filter((timestamp2) => !!timestamp2), latestSpanEndTimestamp = childEndTimestamps.length ? Math.max(...childEndTimestamps) : void 0, spanStartTimestamp = spanUtils.spanToJSON(span).start_timestamp, endTimestamp = Math.min( + spanStartTimestamp ? spanStartTimestamp + finalTimeout / 1e3 : 1 / 0, + Math.max(spanStartTimestamp || -1 / 0, Math.min(spanEndTimestamp, latestSpanEndTimestamp || 1 / 0)) + ); + return onIdleSpanEnded(endTimestamp), Reflect.apply(target, thisArg, [endTimestamp, ...rest]); + } + }); + function _cancelIdleTimeout() { + _idleTimeoutID && (clearTimeout(_idleTimeoutID), _idleTimeoutID = void 0); + } + function _restartIdleTimeout(endTimestamp) { + _cancelIdleTimeout(), _idleTimeoutID = setTimeout(() => { + !_finished && activities.size === 0 && _autoFinishAllowed && (_finishReason = FINISH_REASON_IDLE_TIMEOUT, span.end(endTimestamp)); + }, idleTimeout); + } + function _restartChildSpanTimeout(endTimestamp) { + _idleTimeoutID = setTimeout(() => { + !_finished && _autoFinishAllowed && (_finishReason = FINISH_REASON_HEARTBEAT_FAILED, span.end(endTimestamp)); + }, childSpanTimeout); + } + function _pushActivity(spanId) { + _cancelIdleTimeout(), activities.set(spanId, !0); + let endTimestamp = utils.timestampInSeconds(); + _restartChildSpanTimeout(endTimestamp + childSpanTimeout / 1e3); + } + function _popActivity(spanId) { + if (activities.has(spanId) && activities.delete(spanId), activities.size === 0) { + let endTimestamp = utils.timestampInSeconds(); + _restartIdleTimeout(endTimestamp + idleTimeout / 1e3); + } + } + function onIdleSpanEnded(endTimestamp) { + _finished = !0, activities.clear(), spanOnScope._setSpanForScope(scope, previousActiveSpan); + let spanJSON = spanUtils.spanToJSON(span), { start_timestamp: startTimestamp } = spanJSON; + if (!startTimestamp) + return; + (spanJSON.data || {})[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON] || span.setAttribute(semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON, _finishReason), utils.logger.log(`[Tracing] Idle span "${spanJSON.op}" finished`); + let childSpans = spanUtils.getSpanDescendants(span).filter((child) => child !== span), discardedSpans = 0; + childSpans.forEach((childSpan) => { + childSpan.isRecording() && (childSpan.setStatus({ code: spanstatus.SPAN_STATUS_ERROR, message: "cancelled" }), childSpan.end(endTimestamp), debugBuild.DEBUG_BUILD && utils.logger.log("[Tracing] Cancelling span since span ended early", JSON.stringify(childSpan, void 0, 2))); + let childSpanJSON = spanUtils.spanToJSON(childSpan), { timestamp: childEndTimestamp = 0, start_timestamp: childStartTimestamp = 0 } = childSpanJSON, spanStartedBeforeIdleSpanEnd = childStartTimestamp <= endTimestamp, timeoutWithMarginOfError = (finalTimeout + idleTimeout) / 1e3, spanEndedBeforeFinalTimeout = childEndTimestamp - childStartTimestamp <= timeoutWithMarginOfError; + if (debugBuild.DEBUG_BUILD) { + let stringifiedSpan = JSON.stringify(childSpan, void 0, 2); + spanStartedBeforeIdleSpanEnd ? spanEndedBeforeFinalTimeout || utils.logger.log("[Tracing] Discarding span since it finished after idle span final timeout", stringifiedSpan) : utils.logger.log("[Tracing] Discarding span since it happened after idle span was finished", stringifiedSpan); + } + (!spanEndedBeforeFinalTimeout || !spanStartedBeforeIdleSpanEnd) && (spanUtils.removeChildSpanFromSpan(span, childSpan), discardedSpans++); + }), discardedSpans > 0 && span.setAttribute("sentry.idle_span_discarded_spans", discardedSpans); + } + return client.on("spanStart", (startedSpan) => { + if (_finished || startedSpan === span || spanUtils.spanToJSON(startedSpan).timestamp) + return; + spanUtils.getSpanDescendants(span).includes(startedSpan) && _pushActivity(startedSpan.spanContext().spanId); + }), client.on("spanEnd", (endedSpan) => { + _finished || _popActivity(endedSpan.spanContext().spanId); + }), client.on("idleSpanEnableAutoFinish", (spanToAllowAutoFinish) => { + spanToAllowAutoFinish === span && (_autoFinishAllowed = !0, _restartIdleTimeout(), activities.size && _restartChildSpanTimeout()); + }), options.disableAutoFinish || _restartIdleTimeout(), setTimeout(() => { + _finished || (span.setStatus({ code: spanstatus.SPAN_STATUS_ERROR, message: "deadline_exceeded" }), _finishReason = FINISH_REASON_FINAL_TIMEOUT, span.end()); + }, finalTimeout), span; + } + function _startIdleSpan(options) { + let span = trace.startInactiveSpan(options); + return spanOnScope._setSpanForScope(currentScopes.getCurrentScope(), span), debugBuild.DEBUG_BUILD && utils.logger.log("[Tracing] Started span is an idle span"), span; + } + exports.TRACING_DEFAULTS = TRACING_DEFAULTS; + exports.startIdleSpan = startIdleSpan; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/eventProcessors.js +var require_eventProcessors = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/eventProcessors.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), debugBuild = require_debug_build2(); + function notifyEventProcessors(processors, event, hint, index = 0) { + return new utils.SyncPromise((resolve, reject) => { + let processor = processors[index]; + if (event === null || typeof processor != "function") + resolve(event); + else { + let result = processor({ ...event }, hint); + debugBuild.DEBUG_BUILD && processor.id && result === null && utils.logger.log(`Event processor "${processor.id}" dropped event`), utils.isThenable(result) ? result.then((final) => notifyEventProcessors(processors, final, hint, index + 1).then(resolve)).then(null, reject) : notifyEventProcessors(processors, result, hint, index + 1).then(resolve).then(null, reject); + } + }); + } + exports.notifyEventProcessors = notifyEventProcessors; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/applyScopeDataToEvent.js +var require_applyScopeDataToEvent = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/applyScopeDataToEvent.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), dynamicSamplingContext = require_dynamicSamplingContext(), spanUtils = require_spanUtils(); + function applyScopeDataToEvent(event, data) { + let { fingerprint, span, breadcrumbs, sdkProcessingMetadata } = data; + applyDataToEvent(event, data), span && applySpanToEvent(event, span), applyFingerprintToEvent(event, fingerprint), applyBreadcrumbsToEvent(event, breadcrumbs), applySdkMetadataToEvent(event, sdkProcessingMetadata); + } + function mergeScopeData(data, mergeData) { + let { + extra, + tags, + user, + contexts, + level, + sdkProcessingMetadata, + breadcrumbs, + fingerprint, + eventProcessors, + attachments, + propagationContext, + transactionName, + span + } = mergeData; + mergeAndOverwriteScopeData(data, "extra", extra), mergeAndOverwriteScopeData(data, "tags", tags), mergeAndOverwriteScopeData(data, "user", user), mergeAndOverwriteScopeData(data, "contexts", contexts), mergeAndOverwriteScopeData(data, "sdkProcessingMetadata", sdkProcessingMetadata), level && (data.level = level), transactionName && (data.transactionName = transactionName), span && (data.span = span), breadcrumbs.length && (data.breadcrumbs = [...data.breadcrumbs, ...breadcrumbs]), fingerprint.length && (data.fingerprint = [...data.fingerprint, ...fingerprint]), eventProcessors.length && (data.eventProcessors = [...data.eventProcessors, ...eventProcessors]), attachments.length && (data.attachments = [...data.attachments, ...attachments]), data.propagationContext = { ...data.propagationContext, ...propagationContext }; + } + function mergeAndOverwriteScopeData(data, prop, mergeVal) { + if (mergeVal && Object.keys(mergeVal).length) { + data[prop] = { ...data[prop] }; + for (let key in mergeVal) + Object.prototype.hasOwnProperty.call(mergeVal, key) && (data[prop][key] = mergeVal[key]); + } + } + function applyDataToEvent(event, data) { + let { extra, tags, user, contexts, level, transactionName } = data, cleanedExtra = utils.dropUndefinedKeys(extra); + cleanedExtra && Object.keys(cleanedExtra).length && (event.extra = { ...cleanedExtra, ...event.extra }); + let cleanedTags = utils.dropUndefinedKeys(tags); + cleanedTags && Object.keys(cleanedTags).length && (event.tags = { ...cleanedTags, ...event.tags }); + let cleanedUser = utils.dropUndefinedKeys(user); + cleanedUser && Object.keys(cleanedUser).length && (event.user = { ...cleanedUser, ...event.user }); + let cleanedContexts = utils.dropUndefinedKeys(contexts); + cleanedContexts && Object.keys(cleanedContexts).length && (event.contexts = { ...cleanedContexts, ...event.contexts }), level && (event.level = level), transactionName && event.type !== "transaction" && (event.transaction = transactionName); + } + function applyBreadcrumbsToEvent(event, breadcrumbs) { + let mergedBreadcrumbs = [...event.breadcrumbs || [], ...breadcrumbs]; + event.breadcrumbs = mergedBreadcrumbs.length ? mergedBreadcrumbs : void 0; + } + function applySdkMetadataToEvent(event, sdkProcessingMetadata) { + event.sdkProcessingMetadata = { + ...event.sdkProcessingMetadata, + ...sdkProcessingMetadata + }; + } + function applySpanToEvent(event, span) { + event.contexts = { + trace: spanUtils.spanToTraceContext(span), + ...event.contexts + }, event.sdkProcessingMetadata = { + dynamicSamplingContext: dynamicSamplingContext.getDynamicSamplingContextFromSpan(span), + ...event.sdkProcessingMetadata + }; + let rootSpan = spanUtils.getRootSpan(span), transactionName = spanUtils.spanToJSON(rootSpan).description; + transactionName && !event.transaction && event.type === "transaction" && (event.transaction = transactionName); + } + function applyFingerprintToEvent(event, fingerprint) { + event.fingerprint = event.fingerprint ? utils.arrayify(event.fingerprint) : [], fingerprint && (event.fingerprint = event.fingerprint.concat(fingerprint)), event.fingerprint && !event.fingerprint.length && delete event.fingerprint; + } + exports.applyScopeDataToEvent = applyScopeDataToEvent; + exports.mergeAndOverwriteScopeData = mergeAndOverwriteScopeData; + exports.mergeScopeData = mergeScopeData; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/prepareEvent.js +var require_prepareEvent = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/prepareEvent.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), constants = require_constants(), currentScopes = require_currentScopes(), eventProcessors = require_eventProcessors(), scope = require_scope(), applyScopeDataToEvent = require_applyScopeDataToEvent(); + function prepareEvent(options, event, hint, scope2, client, isolationScope) { + let { normalizeDepth = 3, normalizeMaxBreadth = 1e3 } = options, prepared = { + ...event, + event_id: event.event_id || hint.event_id || utils.uuid4(), + timestamp: event.timestamp || utils.dateTimestampInSeconds() + }, integrations = hint.integrations || options.integrations.map((i) => i.name); + applyClientOptions(prepared, options), applyIntegrationsMetadata(prepared, integrations), event.type === void 0 && applyDebugIds(prepared, options.stackParser); + let finalScope = getFinalScope(scope2, hint.captureContext); + hint.mechanism && utils.addExceptionMechanism(prepared, hint.mechanism); + let clientEventProcessors = client ? client.getEventProcessors() : [], data = currentScopes.getGlobalScope().getScopeData(); + if (isolationScope) { + let isolationData = isolationScope.getScopeData(); + applyScopeDataToEvent.mergeScopeData(data, isolationData); + } + if (finalScope) { + let finalScopeData = finalScope.getScopeData(); + applyScopeDataToEvent.mergeScopeData(data, finalScopeData); + } + let attachments = [...hint.attachments || [], ...data.attachments]; + attachments.length && (hint.attachments = attachments), applyScopeDataToEvent.applyScopeDataToEvent(prepared, data); + let eventProcessors$1 = [ + ...clientEventProcessors, + // Run scope event processors _after_ all other processors + ...data.eventProcessors + ]; + return eventProcessors.notifyEventProcessors(eventProcessors$1, prepared, hint).then((evt) => (evt && applyDebugMeta(evt), typeof normalizeDepth == "number" && normalizeDepth > 0 ? normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth) : evt)); + } + function applyClientOptions(event, options) { + let { environment, release, dist, maxValueLength = 250 } = options; + "environment" in event || (event.environment = "environment" in options ? environment : constants.DEFAULT_ENVIRONMENT), event.release === void 0 && release !== void 0 && (event.release = release), event.dist === void 0 && dist !== void 0 && (event.dist = dist), event.message && (event.message = utils.truncate(event.message, maxValueLength)); + let exception = event.exception && event.exception.values && event.exception.values[0]; + exception && exception.value && (exception.value = utils.truncate(exception.value, maxValueLength)); + let request = event.request; + request && request.url && (request.url = utils.truncate(request.url, maxValueLength)); + } + var debugIdStackParserCache = /* @__PURE__ */ new WeakMap(); + function applyDebugIds(event, stackParser) { + let debugIdMap = utils.GLOBAL_OBJ._sentryDebugIds; + if (!debugIdMap) + return; + let debugIdStackFramesCache, cachedDebugIdStackFrameCache = debugIdStackParserCache.get(stackParser); + cachedDebugIdStackFrameCache ? debugIdStackFramesCache = cachedDebugIdStackFrameCache : (debugIdStackFramesCache = /* @__PURE__ */ new Map(), debugIdStackParserCache.set(stackParser, debugIdStackFramesCache)); + let filenameDebugIdMap = Object.keys(debugIdMap).reduce((acc, debugIdStackTrace) => { + let parsedStack, cachedParsedStack = debugIdStackFramesCache.get(debugIdStackTrace); + cachedParsedStack ? parsedStack = cachedParsedStack : (parsedStack = stackParser(debugIdStackTrace), debugIdStackFramesCache.set(debugIdStackTrace, parsedStack)); + for (let i = parsedStack.length - 1; i >= 0; i--) { + let stackFrame = parsedStack[i]; + if (stackFrame.filename) { + acc[stackFrame.filename] = debugIdMap[debugIdStackTrace]; + break; + } + } + return acc; + }, {}); + try { + event.exception.values.forEach((exception) => { + exception.stacktrace.frames.forEach((frame) => { + frame.filename && (frame.debug_id = filenameDebugIdMap[frame.filename]); + }); + }); + } catch { + } + } + function applyDebugMeta(event) { + let filenameDebugIdMap = {}; + try { + event.exception.values.forEach((exception) => { + exception.stacktrace.frames.forEach((frame) => { + frame.debug_id && (frame.abs_path ? filenameDebugIdMap[frame.abs_path] = frame.debug_id : frame.filename && (filenameDebugIdMap[frame.filename] = frame.debug_id), delete frame.debug_id); + }); + }); + } catch { + } + if (Object.keys(filenameDebugIdMap).length === 0) + return; + event.debug_meta = event.debug_meta || {}, event.debug_meta.images = event.debug_meta.images || []; + let images = event.debug_meta.images; + Object.keys(filenameDebugIdMap).forEach((filename) => { + images.push({ + type: "sourcemap", + code_file: filename, + debug_id: filenameDebugIdMap[filename] + }); + }); + } + function applyIntegrationsMetadata(event, integrationNames) { + integrationNames.length > 0 && (event.sdk = event.sdk || {}, event.sdk.integrations = [...event.sdk.integrations || [], ...integrationNames]); + } + function normalizeEvent(event, depth, maxBreadth) { + if (!event) + return null; + let normalized = { + ...event, + ...event.breadcrumbs && { + breadcrumbs: event.breadcrumbs.map((b) => ({ + ...b, + ...b.data && { + data: utils.normalize(b.data, depth, maxBreadth) + } + })) + }, + ...event.user && { + user: utils.normalize(event.user, depth, maxBreadth) + }, + ...event.contexts && { + contexts: utils.normalize(event.contexts, depth, maxBreadth) + }, + ...event.extra && { + extra: utils.normalize(event.extra, depth, maxBreadth) + } + }; + return event.contexts && event.contexts.trace && normalized.contexts && (normalized.contexts.trace = event.contexts.trace, event.contexts.trace.data && (normalized.contexts.trace.data = utils.normalize(event.contexts.trace.data, depth, maxBreadth))), event.spans && (normalized.spans = event.spans.map((span) => ({ + ...span, + ...span.data && { + data: utils.normalize(span.data, depth, maxBreadth) + } + }))), normalized; + } + function getFinalScope(scope$1, captureContext) { + if (!captureContext) + return scope$1; + let finalScope = scope$1 ? scope$1.clone() : new scope.Scope(); + return finalScope.update(captureContext), finalScope; + } + function parseEventHintOrCaptureContext(hint) { + if (hint) + return hintIsScopeOrFunction(hint) ? { captureContext: hint } : hintIsScopeContext(hint) ? { + captureContext: hint + } : hint; + } + function hintIsScopeOrFunction(hint) { + return hint instanceof scope.Scope || typeof hint == "function"; + } + var captureContextKeys = [ + "user", + "level", + "extra", + "contexts", + "tags", + "fingerprint", + "requestSession", + "propagationContext" + ]; + function hintIsScopeContext(hint) { + return Object.keys(hint).some((key) => captureContextKeys.includes(key)); + } + exports.applyDebugIds = applyDebugIds; + exports.applyDebugMeta = applyDebugMeta; + exports.parseEventHintOrCaptureContext = parseEventHintOrCaptureContext; + exports.prepareEvent = prepareEvent; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/exports.js +var require_exports = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/exports.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), constants = require_constants(), currentScopes = require_currentScopes(), debugBuild = require_debug_build2(), session = require_session(), prepareEvent = require_prepareEvent(); + function captureException(exception, hint) { + return currentScopes.getCurrentScope().captureException(exception, prepareEvent.parseEventHintOrCaptureContext(hint)); + } + function captureMessage(message, captureContext) { + let level = typeof captureContext == "string" ? captureContext : void 0, context = typeof captureContext != "string" ? { captureContext } : void 0; + return currentScopes.getCurrentScope().captureMessage(message, level, context); + } + function captureEvent(event, hint) { + return currentScopes.getCurrentScope().captureEvent(event, hint); + } + function setContext(name, context) { + currentScopes.getIsolationScope().setContext(name, context); + } + function setExtras(extras) { + currentScopes.getIsolationScope().setExtras(extras); + } + function setExtra(key, extra) { + currentScopes.getIsolationScope().setExtra(key, extra); + } + function setTags(tags) { + currentScopes.getIsolationScope().setTags(tags); + } + function setTag(key, value) { + currentScopes.getIsolationScope().setTag(key, value); + } + function setUser(user) { + currentScopes.getIsolationScope().setUser(user); + } + function lastEventId() { + return currentScopes.getIsolationScope().lastEventId(); + } + function captureCheckIn(checkIn, upsertMonitorConfig) { + let scope = currentScopes.getCurrentScope(), client = currentScopes.getClient(); + if (!client) + debugBuild.DEBUG_BUILD && utils.logger.warn("Cannot capture check-in. No client defined."); + else if (!client.captureCheckIn) + debugBuild.DEBUG_BUILD && utils.logger.warn("Cannot capture check-in. Client does not support sending check-ins."); + else + return client.captureCheckIn(checkIn, upsertMonitorConfig, scope); + return utils.uuid4(); + } + function withMonitor(monitorSlug, callback, upsertMonitorConfig) { + let checkInId = captureCheckIn({ monitorSlug, status: "in_progress" }, upsertMonitorConfig), now = utils.timestampInSeconds(); + function finishCheckIn(status) { + captureCheckIn({ monitorSlug, status, checkInId, duration: utils.timestampInSeconds() - now }); + } + return currentScopes.withIsolationScope(() => { + let maybePromiseResult; + try { + maybePromiseResult = callback(); + } catch (e) { + throw finishCheckIn("error"), e; + } + return utils.isThenable(maybePromiseResult) ? Promise.resolve(maybePromiseResult).then( + () => { + finishCheckIn("ok"); + }, + () => { + finishCheckIn("error"); + } + ) : finishCheckIn("ok"), maybePromiseResult; + }); + } + async function flush(timeout) { + let client = currentScopes.getClient(); + return client ? client.flush(timeout) : (debugBuild.DEBUG_BUILD && utils.logger.warn("Cannot flush events. No client defined."), Promise.resolve(!1)); + } + async function close(timeout) { + let client = currentScopes.getClient(); + return client ? client.close(timeout) : (debugBuild.DEBUG_BUILD && utils.logger.warn("Cannot flush events and disable SDK. No client defined."), Promise.resolve(!1)); + } + function isInitialized() { + return !!currentScopes.getClient(); + } + function isEnabled() { + let client = currentScopes.getClient(); + return !!client && client.getOptions().enabled !== !1 && !!client.getTransport(); + } + function addEventProcessor(callback) { + currentScopes.getIsolationScope().addEventProcessor(callback); + } + function startSession(context) { + let client = currentScopes.getClient(), isolationScope = currentScopes.getIsolationScope(), currentScope = currentScopes.getCurrentScope(), { release, environment = constants.DEFAULT_ENVIRONMENT } = client && client.getOptions() || {}, { userAgent } = utils.GLOBAL_OBJ.navigator || {}, session$1 = session.makeSession({ + release, + environment, + user: currentScope.getUser() || isolationScope.getUser(), + ...userAgent && { userAgent }, + ...context + }), currentSession = isolationScope.getSession(); + return currentSession && currentSession.status === "ok" && session.updateSession(currentSession, { status: "exited" }), endSession(), isolationScope.setSession(session$1), currentScope.setSession(session$1), session$1; + } + function endSession() { + let isolationScope = currentScopes.getIsolationScope(), currentScope = currentScopes.getCurrentScope(), session$1 = currentScope.getSession() || isolationScope.getSession(); + session$1 && session.closeSession(session$1), _sendSessionUpdate(), isolationScope.setSession(), currentScope.setSession(); + } + function _sendSessionUpdate() { + let isolationScope = currentScopes.getIsolationScope(), currentScope = currentScopes.getCurrentScope(), client = currentScopes.getClient(), session2 = currentScope.getSession() || isolationScope.getSession(); + session2 && client && client.captureSession(session2); + } + function captureSession(end = !1) { + if (end) { + endSession(); + return; + } + _sendSessionUpdate(); + } + exports.addEventProcessor = addEventProcessor; + exports.captureCheckIn = captureCheckIn; + exports.captureEvent = captureEvent; + exports.captureException = captureException; + exports.captureMessage = captureMessage; + exports.captureSession = captureSession; + exports.close = close; + exports.endSession = endSession; + exports.flush = flush; + exports.isEnabled = isEnabled; + exports.isInitialized = isInitialized; + exports.lastEventId = lastEventId; + exports.setContext = setContext; + exports.setExtra = setExtra; + exports.setExtras = setExtras; + exports.setTag = setTag; + exports.setTags = setTags; + exports.setUser = setUser; + exports.startSession = startSession; + exports.withMonitor = withMonitor; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/sessionflusher.js +var require_sessionflusher = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/sessionflusher.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), SessionFlusher = class { + // Cast to any so that it can use Node.js timeout + // eslint-disable-next-line @typescript-eslint/no-explicit-any + constructor(client, attrs) { + this._client = client, this.flushTimeout = 60, this._pendingAggregates = {}, this._isEnabled = !0, this._intervalId = setInterval(() => this.flush(), this.flushTimeout * 1e3), this._intervalId.unref && this._intervalId.unref(), this._sessionAttrs = attrs; + } + /** Checks if `pendingAggregates` has entries, and if it does flushes them by calling `sendSession` */ + flush() { + let sessionAggregates = this.getSessionAggregates(); + sessionAggregates.aggregates.length !== 0 && (this._pendingAggregates = {}, this._client.sendSession(sessionAggregates)); + } + /** Massages the entries in `pendingAggregates` and returns aggregated sessions */ + getSessionAggregates() { + let aggregates = Object.keys(this._pendingAggregates).map((key) => this._pendingAggregates[parseInt(key)]), sessionAggregates = { + attrs: this._sessionAttrs, + aggregates + }; + return utils.dropUndefinedKeys(sessionAggregates); + } + /** JSDoc */ + close() { + clearInterval(this._intervalId), this._isEnabled = !1, this.flush(); + } + /** + * Wrapper function for _incrementSessionStatusCount that checks if the instance of SessionFlusher is enabled then + * fetches the session status of the request from `Scope.getRequestSession().status` on the scope and passes them to + * `_incrementSessionStatusCount` along with the start date + */ + incrementSessionStatusCount() { + if (!this._isEnabled) + return; + let isolationScope = currentScopes.getIsolationScope(), requestSession = isolationScope.getRequestSession(); + requestSession && requestSession.status && (this._incrementSessionStatusCount(requestSession.status, /* @__PURE__ */ new Date()), isolationScope.setRequestSession(void 0)); + } + /** + * Increments status bucket in pendingAggregates buffer (internal state) corresponding to status of + * the session received + */ + _incrementSessionStatusCount(status, date) { + let sessionStartedTrunc = new Date(date).setSeconds(0, 0); + this._pendingAggregates[sessionStartedTrunc] = this._pendingAggregates[sessionStartedTrunc] || {}; + let aggregationCounts = this._pendingAggregates[sessionStartedTrunc]; + switch (aggregationCounts.started || (aggregationCounts.started = new Date(sessionStartedTrunc).toISOString()), status) { + case "errored": + return aggregationCounts.errored = (aggregationCounts.errored || 0) + 1, aggregationCounts.errored; + case "ok": + return aggregationCounts.exited = (aggregationCounts.exited || 0) + 1, aggregationCounts.exited; + default: + return aggregationCounts.crashed = (aggregationCounts.crashed || 0) + 1, aggregationCounts.crashed; + } + } + }; + exports.SessionFlusher = SessionFlusher; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/api.js +var require_api = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/api.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), SENTRY_API_VERSION = "7"; + function getBaseApiEndpoint(dsn) { + let protocol = dsn.protocol ? `${dsn.protocol}:` : "", port = dsn.port ? `:${dsn.port}` : ""; + return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : ""}/api/`; + } + function _getIngestEndpoint(dsn) { + return `${getBaseApiEndpoint(dsn)}${dsn.projectId}/envelope/`; + } + function _encodedAuth(dsn, sdkInfo) { + return utils.urlEncode({ + // We send only the minimum set of required information. See + // https://github.com/getsentry/sentry-javascript/issues/2572. + sentry_key: dsn.publicKey, + sentry_version: SENTRY_API_VERSION, + ...sdkInfo && { sentry_client: `${sdkInfo.name}/${sdkInfo.version}` } + }); + } + function getEnvelopeEndpointWithUrlEncodedAuth(dsn, tunnel, sdkInfo) { + return tunnel || `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, sdkInfo)}`; + } + function getReportDialogEndpoint(dsnLike, dialogOptions) { + let dsn = utils.makeDsn(dsnLike); + if (!dsn) + return ""; + let endpoint = `${getBaseApiEndpoint(dsn)}embed/error-page/`, encodedOptions = `dsn=${utils.dsnToString(dsn)}`; + for (let key in dialogOptions) + if (key !== "dsn" && key !== "onClose") + if (key === "user") { + let user = dialogOptions.user; + if (!user) + continue; + user.name && (encodedOptions += `&name=${encodeURIComponent(user.name)}`), user.email && (encodedOptions += `&email=${encodeURIComponent(user.email)}`); + } else + encodedOptions += `&${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key])}`; + return `${endpoint}?${encodedOptions}`; + } + exports.getEnvelopeEndpointWithUrlEncodedAuth = getEnvelopeEndpointWithUrlEncodedAuth; + exports.getReportDialogEndpoint = getReportDialogEndpoint; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integration.js +var require_integration = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integration.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), debugBuild = require_debug_build2(), installedIntegrations = []; + function filterDuplicates(integrations) { + let integrationsByName = {}; + return integrations.forEach((currentInstance) => { + let { name } = currentInstance, existingInstance = integrationsByName[name]; + existingInstance && !existingInstance.isDefaultInstance && currentInstance.isDefaultInstance || (integrationsByName[name] = currentInstance); + }), Object.keys(integrationsByName).map((k) => integrationsByName[k]); + } + function getIntegrationsToSetup(options) { + let defaultIntegrations = options.defaultIntegrations || [], userIntegrations = options.integrations; + defaultIntegrations.forEach((integration) => { + integration.isDefaultInstance = !0; + }); + let integrations; + Array.isArray(userIntegrations) ? integrations = [...defaultIntegrations, ...userIntegrations] : typeof userIntegrations == "function" ? integrations = utils.arrayify(userIntegrations(defaultIntegrations)) : integrations = defaultIntegrations; + let finalIntegrations = filterDuplicates(integrations), debugIndex = findIndex(finalIntegrations, (integration) => integration.name === "Debug"); + if (debugIndex !== -1) { + let [debugInstance] = finalIntegrations.splice(debugIndex, 1); + finalIntegrations.push(debugInstance); + } + return finalIntegrations; + } + function setupIntegrations(client, integrations) { + let integrationIndex = {}; + return integrations.forEach((integration) => { + integration && setupIntegration(client, integration, integrationIndex); + }), integrationIndex; + } + function afterSetupIntegrations(client, integrations) { + for (let integration of integrations) + integration && integration.afterAllSetup && integration.afterAllSetup(client); + } + function setupIntegration(client, integration, integrationIndex) { + if (integrationIndex[integration.name]) { + debugBuild.DEBUG_BUILD && utils.logger.log(`Integration skipped because it was already installed: ${integration.name}`); + return; + } + if (integrationIndex[integration.name] = integration, installedIntegrations.indexOf(integration.name) === -1 && typeof integration.setupOnce == "function" && (integration.setupOnce(), installedIntegrations.push(integration.name)), integration.setup && typeof integration.setup == "function" && integration.setup(client), typeof integration.preprocessEvent == "function") { + let callback = integration.preprocessEvent.bind(integration); + client.on("preprocessEvent", (event, hint) => callback(event, hint, client)); + } + if (typeof integration.processEvent == "function") { + let callback = integration.processEvent.bind(integration), processor = Object.assign((event, hint) => callback(event, hint, client), { + id: integration.name + }); + client.addEventProcessor(processor); + } + debugBuild.DEBUG_BUILD && utils.logger.log(`Integration installed: ${integration.name}`); + } + function addIntegration(integration) { + let client = currentScopes.getClient(); + if (!client) { + debugBuild.DEBUG_BUILD && utils.logger.warn(`Cannot add integration "${integration.name}" because no SDK Client is available.`); + return; + } + client.addIntegration(integration); + } + function findIndex(arr, callback) { + for (let i = 0; i < arr.length; i++) + if (callback(arr[i]) === !0) + return i; + return -1; + } + function defineIntegration(fn) { + return fn; + } + exports.addIntegration = addIntegration; + exports.afterSetupIntegrations = afterSetupIntegrations; + exports.defineIntegration = defineIntegration; + exports.getIntegrationsToSetup = getIntegrationsToSetup; + exports.installedIntegrations = installedIntegrations; + exports.setupIntegration = setupIntegration; + exports.setupIntegrations = setupIntegrations; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/baseclient.js +var require_baseclient = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/baseclient.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), api = require_api(), currentScopes = require_currentScopes(), debugBuild = require_debug_build2(), envelope = require_envelope2(), integration = require_integration(), session = require_session(), dynamicSamplingContext = require_dynamicSamplingContext(), parseSampleRate = require_parseSampleRate(), prepareEvent = require_prepareEvent(), ALREADY_SEEN_ERROR = "Not capturing exception because it's already been captured.", BaseClient = class { + /** Options passed to the SDK. */ + /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */ + /** Array of set up integrations. */ + /** Number of calls being processed */ + /** Holds flushable */ + // eslint-disable-next-line @typescript-eslint/ban-types + /** + * Initializes this client instance. + * + * @param options Options for the client. + */ + constructor(options) { + if (this._options = options, this._integrations = {}, this._numProcessing = 0, this._outcomes = {}, this._hooks = {}, this._eventProcessors = [], options.dsn ? this._dsn = utils.makeDsn(options.dsn) : debugBuild.DEBUG_BUILD && utils.logger.warn("No DSN provided, client will not send events."), this._dsn) { + let url = api.getEnvelopeEndpointWithUrlEncodedAuth( + this._dsn, + options.tunnel, + options._metadata ? options._metadata.sdk : void 0 + ); + this._transport = options.transport({ + tunnel: this._options.tunnel, + recordDroppedEvent: this.recordDroppedEvent.bind(this), + ...options.transportOptions, + url + }); + } + } + /** + * @inheritDoc + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + captureException(exception, hint, scope) { + let eventId = utils.uuid4(); + if (utils.checkOrSetAlreadyCaught(exception)) + return debugBuild.DEBUG_BUILD && utils.logger.log(ALREADY_SEEN_ERROR), eventId; + let hintWithEventId = { + event_id: eventId, + ...hint + }; + return this._process( + this.eventFromException(exception, hintWithEventId).then( + (event) => this._captureEvent(event, hintWithEventId, scope) + ) + ), hintWithEventId.event_id; + } + /** + * @inheritDoc + */ + captureMessage(message, level, hint, currentScope) { + let hintWithEventId = { + event_id: utils.uuid4(), + ...hint + }, eventMessage = utils.isParameterizedString(message) ? message : String(message), promisedEvent = utils.isPrimitive(message) ? this.eventFromMessage(eventMessage, level, hintWithEventId) : this.eventFromException(message, hintWithEventId); + return this._process(promisedEvent.then((event) => this._captureEvent(event, hintWithEventId, currentScope))), hintWithEventId.event_id; + } + /** + * @inheritDoc + */ + captureEvent(event, hint, currentScope) { + let eventId = utils.uuid4(); + if (hint && hint.originalException && utils.checkOrSetAlreadyCaught(hint.originalException)) + return debugBuild.DEBUG_BUILD && utils.logger.log(ALREADY_SEEN_ERROR), eventId; + let hintWithEventId = { + event_id: eventId, + ...hint + }, capturedSpanScope = (event.sdkProcessingMetadata || {}).capturedSpanScope; + return this._process(this._captureEvent(event, hintWithEventId, capturedSpanScope || currentScope)), hintWithEventId.event_id; + } + /** + * @inheritDoc + */ + captureSession(session$1) { + typeof session$1.release != "string" ? debugBuild.DEBUG_BUILD && utils.logger.warn("Discarded session because of missing or non-string release") : (this.sendSession(session$1), session.updateSession(session$1, { init: !1 })); + } + /** + * @inheritDoc + */ + getDsn() { + return this._dsn; + } + /** + * @inheritDoc + */ + getOptions() { + return this._options; + } + /** + * @see SdkMetadata in @sentry/types + * + * @return The metadata of the SDK + */ + getSdkMetadata() { + return this._options._metadata; + } + /** + * @inheritDoc + */ + getTransport() { + return this._transport; + } + /** + * @inheritDoc + */ + flush(timeout) { + let transport = this._transport; + return transport ? (this.emit("flush"), this._isClientDoneProcessing(timeout).then((clientFinished) => transport.flush(timeout).then((transportFlushed) => clientFinished && transportFlushed))) : utils.resolvedSyncPromise(!0); + } + /** + * @inheritDoc + */ + close(timeout) { + return this.flush(timeout).then((result) => (this.getOptions().enabled = !1, this.emit("close"), result)); + } + /** Get all installed event processors. */ + getEventProcessors() { + return this._eventProcessors; + } + /** @inheritDoc */ + addEventProcessor(eventProcessor) { + this._eventProcessors.push(eventProcessor); + } + /** @inheritdoc */ + init() { + this._isEnabled() && this._setupIntegrations(); + } + /** + * Gets an installed integration by its name. + * + * @returns The installed integration or `undefined` if no integration with that `name` was installed. + */ + getIntegrationByName(integrationName) { + return this._integrations[integrationName]; + } + /** + * @inheritDoc + */ + addIntegration(integration$1) { + let isAlreadyInstalled = this._integrations[integration$1.name]; + integration.setupIntegration(this, integration$1, this._integrations), isAlreadyInstalled || integration.afterSetupIntegrations(this, [integration$1]); + } + /** + * @inheritDoc + */ + sendEvent(event, hint = {}) { + this.emit("beforeSendEvent", event, hint); + let env = envelope.createEventEnvelope(event, this._dsn, this._options._metadata, this._options.tunnel); + for (let attachment of hint.attachments || []) + env = utils.addItemToEnvelope(env, utils.createAttachmentEnvelopeItem(attachment)); + let promise = this.sendEnvelope(env); + promise && promise.then((sendResponse) => this.emit("afterSendEvent", event, sendResponse), null); + } + /** + * @inheritDoc + */ + sendSession(session2) { + let env = envelope.createSessionEnvelope(session2, this._dsn, this._options._metadata, this._options.tunnel); + this.sendEnvelope(env); + } + /** + * @inheritDoc + */ + recordDroppedEvent(reason, category, _event) { + if (this._options.sendClientReports) { + let key = `${reason}:${category}`; + debugBuild.DEBUG_BUILD && utils.logger.log(`Adding outcome: "${key}"`), this._outcomes[key] = this._outcomes[key] + 1 || 1; + } + } + // Keep on() & emit() signatures in sync with types' client.ts interface + /* eslint-disable @typescript-eslint/unified-signatures */ + /** @inheritdoc */ + /** @inheritdoc */ + on(hook, callback) { + this._hooks[hook] || (this._hooks[hook] = []), this._hooks[hook].push(callback); + } + /** @inheritdoc */ + /** @inheritdoc */ + emit(hook, ...rest) { + this._hooks[hook] && this._hooks[hook].forEach((callback) => callback(...rest)); + } + /** + * @inheritdoc + */ + sendEnvelope(envelope2) { + return this.emit("beforeEnvelope", envelope2), this._isEnabled() && this._transport ? this._transport.send(envelope2).then(null, (reason) => (debugBuild.DEBUG_BUILD && utils.logger.error("Error while sending event:", reason), reason)) : (debugBuild.DEBUG_BUILD && utils.logger.error("Transport disabled"), utils.resolvedSyncPromise({})); + } + /* eslint-enable @typescript-eslint/unified-signatures */ + /** Setup integrations for this client. */ + _setupIntegrations() { + let { integrations } = this._options; + this._integrations = integration.setupIntegrations(this, integrations), integration.afterSetupIntegrations(this, integrations); + } + /** Updates existing session based on the provided event */ + _updateSessionFromEvent(session$1, event) { + let crashed = !1, errored = !1, exceptions = event.exception && event.exception.values; + if (exceptions) { + errored = !0; + for (let ex of exceptions) { + let mechanism = ex.mechanism; + if (mechanism && mechanism.handled === !1) { + crashed = !0; + break; + } + } + } + let sessionNonTerminal = session$1.status === "ok"; + (sessionNonTerminal && session$1.errors === 0 || sessionNonTerminal && crashed) && (session.updateSession(session$1, { + ...crashed && { status: "crashed" }, + errors: session$1.errors || Number(errored || crashed) + }), this.captureSession(session$1)); + } + /** + * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying + * "no" (resolving to `false`) in order to give the client a chance to potentially finish first. + * + * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not + * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to + * `true`. + * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and + * `false` otherwise + */ + _isClientDoneProcessing(timeout) { + return new utils.SyncPromise((resolve) => { + let ticked = 0, tick = 1, interval = setInterval(() => { + this._numProcessing == 0 ? (clearInterval(interval), resolve(!0)) : (ticked += tick, timeout && ticked >= timeout && (clearInterval(interval), resolve(!1))); + }, tick); + }); + } + /** Determines whether this SDK is enabled and a transport is present. */ + _isEnabled() { + return this.getOptions().enabled !== !1 && this._transport !== void 0; + } + /** + * Adds common information to events. + * + * The information includes release and environment from `options`, + * breadcrumbs and context (extra, tags and user) from the scope. + * + * Information that is already present in the event is never overwritten. For + * nested objects, such as the context, keys are merged. + * + * @param event The original event. + * @param hint May contain additional information about the original exception. + * @param currentScope A scope containing event metadata. + * @returns A new event with more information. + */ + _prepareEvent(event, hint, currentScope, isolationScope = currentScopes.getIsolationScope()) { + let options = this.getOptions(), integrations = Object.keys(this._integrations); + return !hint.integrations && integrations.length > 0 && (hint.integrations = integrations), this.emit("preprocessEvent", event, hint), event.type || isolationScope.setLastEventId(event.event_id || hint.event_id), prepareEvent.prepareEvent(options, event, hint, currentScope, this, isolationScope).then((evt) => { + if (evt === null) + return evt; + let propagationContext = { + ...isolationScope.getPropagationContext(), + ...currentScope ? currentScope.getPropagationContext() : void 0 + }; + if (!(evt.contexts && evt.contexts.trace) && propagationContext) { + let { traceId: trace_id, spanId, parentSpanId, dsc } = propagationContext; + evt.contexts = { + trace: utils.dropUndefinedKeys({ + trace_id, + span_id: spanId, + parent_span_id: parentSpanId + }), + ...evt.contexts + }; + let dynamicSamplingContext$1 = dsc || dynamicSamplingContext.getDynamicSamplingContextFromClient(trace_id, this); + evt.sdkProcessingMetadata = { + dynamicSamplingContext: dynamicSamplingContext$1, + ...evt.sdkProcessingMetadata + }; + } + return evt; + }); + } + /** + * Processes the event and logs an error in case of rejection + * @param event + * @param hint + * @param scope + */ + _captureEvent(event, hint = {}, scope) { + return this._processEvent(event, hint, scope).then( + (finalEvent) => finalEvent.event_id, + (reason) => { + if (debugBuild.DEBUG_BUILD) { + let sentryError = reason; + sentryError.logLevel === "log" ? utils.logger.log(sentryError.message) : utils.logger.warn(sentryError); + } + } + ); + } + /** + * Processes an event (either error or message) and sends it to Sentry. + * + * This also adds breadcrumbs and context information to the event. However, + * platform specific meta data (such as the User's IP address) must be added + * by the SDK implementor. + * + * + * @param event The event to send to Sentry. + * @param hint May contain additional information about the original exception. + * @param currentScope A scope containing event metadata. + * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send. + */ + _processEvent(event, hint, currentScope) { + let options = this.getOptions(), { sampleRate } = options, isTransaction = isTransactionEvent(event), isError = isErrorEvent(event), eventType = event.type || "error", beforeSendLabel = `before send for type \`${eventType}\``, parsedSampleRate = typeof sampleRate > "u" ? void 0 : parseSampleRate.parseSampleRate(sampleRate); + if (isError && typeof parsedSampleRate == "number" && Math.random() > parsedSampleRate) + return this.recordDroppedEvent("sample_rate", "error", event), utils.rejectedSyncPromise( + new utils.SentryError( + `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`, + "log" + ) + ); + let dataCategory = eventType === "replay_event" ? "replay" : eventType, capturedSpanIsolationScope = (event.sdkProcessingMetadata || {}).capturedSpanIsolationScope; + return this._prepareEvent(event, hint, currentScope, capturedSpanIsolationScope).then((prepared) => { + if (prepared === null) + throw this.recordDroppedEvent("event_processor", dataCategory, event), new utils.SentryError("An event processor returned `null`, will not send event.", "log"); + if (hint.data && hint.data.__sentry__ === !0) + return prepared; + let result = processBeforeSend(options, prepared, hint); + return _validateBeforeSendResult(result, beforeSendLabel); + }).then((processedEvent) => { + if (processedEvent === null) + throw this.recordDroppedEvent("before_send", dataCategory, event), new utils.SentryError(`${beforeSendLabel} returned \`null\`, will not send event.`, "log"); + let session2 = currentScope && currentScope.getSession(); + !isTransaction && session2 && this._updateSessionFromEvent(session2, processedEvent); + let transactionInfo = processedEvent.transaction_info; + if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) { + let source = "custom"; + processedEvent.transaction_info = { + ...transactionInfo, + source + }; + } + return this.sendEvent(processedEvent, hint), processedEvent; + }).then(null, (reason) => { + throw reason instanceof utils.SentryError ? reason : (this.captureException(reason, { + data: { + __sentry__: !0 + }, + originalException: reason + }), new utils.SentryError( + `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. +Reason: ${reason}` + )); + }); + } + /** + * Occupies the client with processing and event + */ + _process(promise) { + this._numProcessing++, promise.then( + (value) => (this._numProcessing--, value), + (reason) => (this._numProcessing--, reason) + ); + } + /** + * Clears outcomes on this client and returns them. + */ + _clearOutcomes() { + let outcomes = this._outcomes; + return this._outcomes = {}, Object.keys(outcomes).map((key) => { + let [reason, category] = key.split(":"); + return { + reason, + category, + quantity: outcomes[key] + }; + }); + } + /** + * @inheritDoc + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + }; + function _validateBeforeSendResult(beforeSendResult, beforeSendLabel) { + let invalidValueError = `${beforeSendLabel} must return \`null\` or a valid event.`; + if (utils.isThenable(beforeSendResult)) + return beforeSendResult.then( + (event) => { + if (!utils.isPlainObject(event) && event !== null) + throw new utils.SentryError(invalidValueError); + return event; + }, + (e) => { + throw new utils.SentryError(`${beforeSendLabel} rejected with ${e}`); + } + ); + if (!utils.isPlainObject(beforeSendResult) && beforeSendResult !== null) + throw new utils.SentryError(invalidValueError); + return beforeSendResult; + } + function processBeforeSend(options, event, hint) { + let { beforeSend, beforeSendTransaction, beforeSendSpan } = options; + if (isErrorEvent(event) && beforeSend) + return beforeSend(event, hint); + if (isTransactionEvent(event)) { + if (event.spans && beforeSendSpan) { + let processedSpans = []; + for (let span of event.spans) { + let processedSpan = beforeSendSpan(span); + processedSpan && processedSpans.push(processedSpan); + } + event.spans = processedSpans; + } + if (beforeSendTransaction) + return beforeSendTransaction(event, hint); + } + return event; + } + function isErrorEvent(event) { + return event.type === void 0; + } + function isTransactionEvent(event) { + return event.type === "transaction"; + } + exports.BaseClient = BaseClient; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/checkin.js +var require_checkin = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/checkin.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(); + function createCheckInEnvelope(checkIn, dynamicSamplingContext, metadata, tunnel, dsn) { + let headers = { + sent_at: (/* @__PURE__ */ new Date()).toISOString() + }; + metadata && metadata.sdk && (headers.sdk = { + name: metadata.sdk.name, + version: metadata.sdk.version + }), tunnel && dsn && (headers.dsn = utils.dsnToString(dsn)), dynamicSamplingContext && (headers.trace = utils.dropUndefinedKeys(dynamicSamplingContext)); + let item = createCheckInEnvelopeItem(checkIn); + return utils.createEnvelope(headers, [item]); + } + function createCheckInEnvelopeItem(checkIn) { + return [{ + type: "check_in" + }, checkIn]; + } + exports.createCheckInEnvelope = createCheckInEnvelope; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/server-runtime-client.js +var require_server_runtime_client = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/server-runtime-client.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), baseclient = require_baseclient(), checkin = require_checkin(), currentScopes = require_currentScopes(), debugBuild = require_debug_build2(), sessionflusher = require_sessionflusher(), errors = require_errors(), spanOnScope = require_spanOnScope(), spanUtils = require_spanUtils(), dynamicSamplingContext = require_dynamicSamplingContext(), ServerRuntimeClient = class extends baseclient.BaseClient { + /** + * Creates a new Edge SDK instance. + * @param options Configuration options for this SDK. + */ + constructor(options) { + errors.registerSpanErrorInstrumentation(), super(options); + } + /** + * @inheritDoc + */ + eventFromException(exception, hint) { + return utils.resolvedSyncPromise(utils.eventFromUnknownInput(this, this._options.stackParser, exception, hint)); + } + /** + * @inheritDoc + */ + eventFromMessage(message, level = "info", hint) { + return utils.resolvedSyncPromise( + utils.eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace) + ); + } + /** + * @inheritDoc + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + captureException(exception, hint, scope) { + if (this._options.autoSessionTracking && this._sessionFlusher) { + let requestSession = currentScopes.getIsolationScope().getRequestSession(); + requestSession && requestSession.status === "ok" && (requestSession.status = "errored"); + } + return super.captureException(exception, hint, scope); + } + /** + * @inheritDoc + */ + captureEvent(event, hint, scope) { + if (this._options.autoSessionTracking && this._sessionFlusher && (event.type || "exception") === "exception" && event.exception && event.exception.values && event.exception.values.length > 0) { + let requestSession = currentScopes.getIsolationScope().getRequestSession(); + requestSession && requestSession.status === "ok" && (requestSession.status = "errored"); + } + return super.captureEvent(event, hint, scope); + } + /** + * + * @inheritdoc + */ + close(timeout) { + return this._sessionFlusher && this._sessionFlusher.close(), super.close(timeout); + } + /** Method that initialises an instance of SessionFlusher on Client */ + initSessionFlusher() { + let { release, environment } = this._options; + release ? this._sessionFlusher = new sessionflusher.SessionFlusher(this, { + release, + environment + }) : debugBuild.DEBUG_BUILD && utils.logger.warn("Cannot initialise an instance of SessionFlusher if no release is provided!"); + } + /** + * Create a cron monitor check in and send it to Sentry. + * + * @param checkIn An object that describes a check in. + * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want + * to create a monitor automatically when sending a check in. + */ + captureCheckIn(checkIn, monitorConfig, scope) { + let id = "checkInId" in checkIn && checkIn.checkInId ? checkIn.checkInId : utils.uuid4(); + if (!this._isEnabled()) + return debugBuild.DEBUG_BUILD && utils.logger.warn("SDK not enabled, will not capture checkin."), id; + let options = this.getOptions(), { release, environment, tunnel } = options, serializedCheckIn = { + check_in_id: id, + monitor_slug: checkIn.monitorSlug, + status: checkIn.status, + release, + environment + }; + "duration" in checkIn && (serializedCheckIn.duration = checkIn.duration), monitorConfig && (serializedCheckIn.monitor_config = { + schedule: monitorConfig.schedule, + checkin_margin: monitorConfig.checkinMargin, + max_runtime: monitorConfig.maxRuntime, + timezone: monitorConfig.timezone, + failure_issue_threshold: monitorConfig.failureIssueThreshold, + recovery_threshold: monitorConfig.recoveryThreshold + }); + let [dynamicSamplingContext2, traceContext] = this._getTraceInfoFromScope(scope); + traceContext && (serializedCheckIn.contexts = { + trace: traceContext + }); + let envelope = checkin.createCheckInEnvelope( + serializedCheckIn, + dynamicSamplingContext2, + this.getSdkMetadata(), + tunnel, + this.getDsn() + ); + return debugBuild.DEBUG_BUILD && utils.logger.info("Sending checkin:", checkIn.monitorSlug, checkIn.status), this.sendEnvelope(envelope), id; + } + /** + * Method responsible for capturing/ending a request session by calling `incrementSessionStatusCount` to increment + * appropriate session aggregates bucket + */ + _captureRequestSession() { + this._sessionFlusher ? this._sessionFlusher.incrementSessionStatusCount() : debugBuild.DEBUG_BUILD && utils.logger.warn("Discarded request mode session because autoSessionTracking option was disabled"); + } + /** + * @inheritDoc + */ + _prepareEvent(event, hint, scope, isolationScope) { + return this._options.platform && (event.platform = event.platform || this._options.platform), this._options.runtime && (event.contexts = { + ...event.contexts, + runtime: (event.contexts || {}).runtime || this._options.runtime + }), this._options.serverName && (event.server_name = event.server_name || this._options.serverName), super._prepareEvent(event, hint, scope, isolationScope); + } + /** Extract trace information from scope */ + _getTraceInfoFromScope(scope) { + if (!scope) + return [void 0, void 0]; + let span = spanOnScope._getSpanForScope(scope); + if (span) { + let rootSpan = spanUtils.getRootSpan(span); + return [dynamicSamplingContext.getDynamicSamplingContextFromSpan(rootSpan), spanUtils.spanToTraceContext(rootSpan)]; + } + let { traceId, spanId, parentSpanId, dsc } = scope.getPropagationContext(), traceContext = { + trace_id: traceId, + span_id: spanId, + parent_span_id: parentSpanId + }; + return dsc ? [dsc, traceContext] : [dynamicSamplingContext.getDynamicSamplingContextFromClient(traceId, this), traceContext]; + } + }; + exports.ServerRuntimeClient = ServerRuntimeClient; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/sdk.js +var require_sdk = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/sdk.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), debugBuild = require_debug_build2(); + function initAndBind(clientClass, options) { + options.debug === !0 && (debugBuild.DEBUG_BUILD ? utils.logger.enable() : utils.consoleSandbox(() => { + console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."); + })), currentScopes.getCurrentScope().update(options.initialScope); + let client = new clientClass(options); + setCurrentClient(client), client.init(); + } + function setCurrentClient(client) { + currentScopes.getCurrentScope().setClient(client); + } + exports.initAndBind = initAndBind; + exports.setCurrentClient = setCurrentClient; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/transports/base.js +var require_base = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/transports/base.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), debugBuild = require_debug_build2(), DEFAULT_TRANSPORT_BUFFER_SIZE = 64; + function createTransport(options, makeRequest, buffer = utils.makePromiseBuffer( + options.bufferSize || DEFAULT_TRANSPORT_BUFFER_SIZE + )) { + let rateLimits = {}, flush = (timeout) => buffer.drain(timeout); + function send(envelope) { + let filteredEnvelopeItems = []; + if (utils.forEachEnvelopeItem(envelope, (item, type) => { + let dataCategory = utils.envelopeItemTypeToDataCategory(type); + if (utils.isRateLimited(rateLimits, dataCategory)) { + let event = getEventForEnvelopeItem(item, type); + options.recordDroppedEvent("ratelimit_backoff", dataCategory, event); + } else + filteredEnvelopeItems.push(item); + }), filteredEnvelopeItems.length === 0) + return utils.resolvedSyncPromise({}); + let filteredEnvelope = utils.createEnvelope(envelope[0], filteredEnvelopeItems), recordEnvelopeLoss = (reason) => { + utils.forEachEnvelopeItem(filteredEnvelope, (item, type) => { + let event = getEventForEnvelopeItem(item, type); + options.recordDroppedEvent(reason, utils.envelopeItemTypeToDataCategory(type), event); + }); + }, requestTask = () => makeRequest({ body: utils.serializeEnvelope(filteredEnvelope) }).then( + (response) => (response.statusCode !== void 0 && (response.statusCode < 200 || response.statusCode >= 300) && debugBuild.DEBUG_BUILD && utils.logger.warn(`Sentry responded with status code ${response.statusCode} to sent event.`), rateLimits = utils.updateRateLimits(rateLimits, response), response), + (error) => { + throw recordEnvelopeLoss("network_error"), error; + } + ); + return buffer.add(requestTask).then( + (result) => result, + (error) => { + if (error instanceof utils.SentryError) + return debugBuild.DEBUG_BUILD && utils.logger.error("Skipped sending event because buffer is full."), recordEnvelopeLoss("queue_overflow"), utils.resolvedSyncPromise({}); + throw error; + } + ); + } + return { + send, + flush + }; + } + function getEventForEnvelopeItem(item, type) { + if (!(type !== "event" && type !== "transaction")) + return Array.isArray(item) ? item[1] : void 0; + } + exports.DEFAULT_TRANSPORT_BUFFER_SIZE = DEFAULT_TRANSPORT_BUFFER_SIZE; + exports.createTransport = createTransport; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/transports/offline.js +var require_offline = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/transports/offline.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), debugBuild = require_debug_build2(), MIN_DELAY = 100, START_DELAY = 5e3, MAX_DELAY = 36e5; + function makeOfflineTransport(createTransport) { + function log(...args) { + debugBuild.DEBUG_BUILD && utils.logger.info("[Offline]:", ...args); + } + return (options) => { + let transport = createTransport(options); + if (!options.createStore) + throw new Error("No `createStore` function was provided"); + let store = options.createStore(options), retryDelay = START_DELAY, flushTimer; + function shouldQueue(env, error, retryDelay2) { + return utils.envelopeContainsItemType(env, ["client_report"]) ? !1 : options.shouldStore ? options.shouldStore(env, error, retryDelay2) : !0; + } + function flushIn(delay) { + flushTimer && clearTimeout(flushTimer), flushTimer = setTimeout(async () => { + flushTimer = void 0; + let found = await store.shift(); + found && (log("Attempting to send previously queued event"), found[0].sent_at = (/* @__PURE__ */ new Date()).toISOString(), send(found, !0).catch((e) => { + log("Failed to retry sending", e); + })); + }, delay), typeof flushTimer != "number" && flushTimer.unref && flushTimer.unref(); + } + function flushWithBackOff() { + flushTimer || (flushIn(retryDelay), retryDelay = Math.min(retryDelay * 2, MAX_DELAY)); + } + async function send(envelope, isRetry = !1) { + if (!isRetry && utils.envelopeContainsItemType(envelope, ["replay_event", "replay_recording"])) + return await store.push(envelope), flushIn(MIN_DELAY), {}; + try { + let result = await transport.send(envelope), delay = MIN_DELAY; + if (result) { + if (result.headers && result.headers["retry-after"]) + delay = utils.parseRetryAfterHeader(result.headers["retry-after"]); + else if (result.headers && result.headers["x-sentry-rate-limits"]) + delay = 6e4; + else if ((result.statusCode || 0) >= 400) + return result; + } + return flushIn(delay), retryDelay = START_DELAY, result; + } catch (e) { + if (await shouldQueue(envelope, e, retryDelay)) + return isRetry ? await store.unshift(envelope) : await store.push(envelope), flushWithBackOff(), log("Error sending. Event queued.", e), {}; + throw e; + } + } + return options.flushAtStartup && flushWithBackOff(), { + send, + flush: (t) => transport.flush(t) + }; + }; + } + exports.MIN_DELAY = MIN_DELAY; + exports.START_DELAY = START_DELAY; + exports.makeOfflineTransport = makeOfflineTransport; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/transports/multiplexed.js +var require_multiplexed = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/transports/multiplexed.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), api = require_api(); + function eventFromEnvelope(env, types) { + let event; + return utils.forEachEnvelopeItem(env, (item, type) => (types.includes(type) && (event = Array.isArray(item) ? item[1] : void 0), !!event)), event; + } + function makeOverrideReleaseTransport(createTransport, release) { + return (options) => { + let transport = createTransport(options); + return { + ...transport, + send: async (envelope) => { + let event = eventFromEnvelope(envelope, ["event", "transaction", "profile", "replay_event"]); + return event && (event.release = release), transport.send(envelope); + } + }; + }; + } + function overrideDsn(envelope, dsn) { + return utils.createEnvelope( + dsn ? { + ...envelope[0], + dsn + } : envelope[0], + envelope[1] + ); + } + function makeMultiplexedTransport(createTransport, matcher) { + return (options) => { + let fallbackTransport = createTransport(options), otherTransports = /* @__PURE__ */ new Map(); + function getTransport(dsn, release) { + let key = release ? `${dsn}:${release}` : dsn, transport = otherTransports.get(key); + if (!transport) { + let validatedDsn = utils.dsnFromString(dsn); + if (!validatedDsn) + return; + let url = api.getEnvelopeEndpointWithUrlEncodedAuth(validatedDsn, options.tunnel); + transport = release ? makeOverrideReleaseTransport(createTransport, release)({ ...options, url }) : createTransport({ ...options, url }), otherTransports.set(key, transport); + } + return [dsn, transport]; + } + async function send(envelope) { + function getEvent(types) { + let eventTypes = types && types.length ? types : ["event"]; + return eventFromEnvelope(envelope, eventTypes); + } + let transports = matcher({ envelope, getEvent }).map((result) => typeof result == "string" ? getTransport(result, void 0) : getTransport(result.dsn, result.release)).filter((t) => !!t); + return transports.length === 0 && transports.push(["", fallbackTransport]), (await Promise.all( + transports.map(([dsn, transport]) => transport.send(overrideDsn(envelope, dsn))) + ))[0]; + } + async function flush(timeout) { + let allTransports = [...otherTransports.values(), fallbackTransport]; + return (await Promise.all(allTransports.map((transport) => transport.flush(timeout)))).every((r) => r); + } + return { + send, + flush + }; + }; + } + exports.eventFromEnvelope = eventFromEnvelope; + exports.makeMultiplexedTransport = makeMultiplexedTransport; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/isSentryRequestUrl.js +var require_isSentryRequestUrl = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/isSentryRequestUrl.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function isSentryRequestUrl(url, client) { + let dsn = client && client.getDsn(), tunnel = client && client.getOptions().tunnel; + return checkDsn(url, dsn) || checkTunnel(url, tunnel); + } + function checkTunnel(url, tunnel) { + return tunnel ? removeTrailingSlash(url) === removeTrailingSlash(tunnel) : !1; + } + function checkDsn(url, dsn) { + return dsn ? url.includes(dsn.host) : !1; + } + function removeTrailingSlash(str) { + return str[str.length - 1] === "/" ? str.slice(0, -1) : str; + } + exports.isSentryRequestUrl = isSentryRequestUrl; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/parameterize.js +var require_parameterize = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/parameterize.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + function parameterize(strings, ...values) { + let formatted = new String(String.raw(strings, ...values)); + return formatted.__sentry_template_string__ = strings.join("\0").replace(/%/g, "%%").replace(/\0/g, "%s"), formatted.__sentry_template_values__ = values, formatted; + } + exports.parameterize = parameterize; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/sdkMetadata.js +var require_sdkMetadata = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/utils/sdkMetadata.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(); + function applySdkMetadata(options, name, names = [name], source = "npm") { + let metadata = options._metadata || {}; + metadata.sdk || (metadata.sdk = { + name: `sentry.javascript.${name}`, + packages: names.map((name2) => ({ + name: `${source}:@sentry/${name2}`, + version: utils.SDK_VERSION + })), + version: utils.SDK_VERSION + }), options._metadata = metadata; + } + exports.applySdkMetadata = applySdkMetadata; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/breadcrumbs.js +var require_breadcrumbs = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/breadcrumbs.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), DEFAULT_BREADCRUMBS = 100; + function addBreadcrumb(breadcrumb, hint) { + let client = currentScopes.getClient(), isolationScope = currentScopes.getIsolationScope(); + if (!client) return; + let { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } = client.getOptions(); + if (maxBreadcrumbs <= 0) return; + let mergedBreadcrumb = { timestamp: utils.dateTimestampInSeconds(), ...breadcrumb }, finalBreadcrumb = beforeBreadcrumb ? utils.consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint)) : mergedBreadcrumb; + finalBreadcrumb !== null && (client.emit && client.emit("beforeAddBreadcrumb", finalBreadcrumb, hint), isolationScope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs)); + } + exports.addBreadcrumb = addBreadcrumb; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/functiontostring.js +var require_functiontostring = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/functiontostring.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), integration = require_integration(), originalFunctionToString, INTEGRATION_NAME = "FunctionToString", SETUP_CLIENTS = /* @__PURE__ */ new WeakMap(), _functionToStringIntegration = () => ({ + name: INTEGRATION_NAME, + setupOnce() { + originalFunctionToString = Function.prototype.toString; + try { + Function.prototype.toString = function(...args) { + let originalFunction = utils.getOriginalFunction(this), context = SETUP_CLIENTS.has(currentScopes.getClient()) && originalFunction !== void 0 ? originalFunction : this; + return originalFunctionToString.apply(context, args); + }; + } catch { + } + }, + setup(client) { + SETUP_CLIENTS.set(client, !0); + } + }), functionToStringIntegration = integration.defineIntegration(_functionToStringIntegration); + exports.functionToStringIntegration = functionToStringIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/inboundfilters.js +var require_inboundfilters = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/inboundfilters.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), debugBuild = require_debug_build2(), integration = require_integration(), DEFAULT_IGNORE_ERRORS = [ + /^Script error\.?$/, + /^Javascript error: Script error\.? on line 0$/, + /^ResizeObserver loop completed with undelivered notifications.$/, + // The browser logs this when a ResizeObserver handler takes a bit longer. Usually this is not an actual issue though. It indicates slowness. + /^Cannot redefine property: googletag$/, + // This is thrown when google tag manager is used in combination with an ad blocker + "undefined is not an object (evaluating 'a.L')", + // Random error that happens but not actionable or noticeable to end-users. + `can't redefine non-configurable property "solana"`, + // Probably a browser extension or custom browser (Brave) throwing this error + "vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)", + // Error thrown by GTM, seemingly not affecting end-users + "Can't find variable: _AutofillCallbackHandler" + // Unactionable error in instagram webview https://developers.facebook.com/community/threads/320013549791141/ + ], INTEGRATION_NAME = "InboundFilters", _inboundFiltersIntegration = (options = {}) => ({ + name: INTEGRATION_NAME, + processEvent(event, _hint, client) { + let clientOptions = client.getOptions(), mergedOptions = _mergeOptions(options, clientOptions); + return _shouldDropEvent(event, mergedOptions) ? null : event; + } + }), inboundFiltersIntegration = integration.defineIntegration(_inboundFiltersIntegration); + function _mergeOptions(internalOptions = {}, clientOptions = {}) { + return { + allowUrls: [...internalOptions.allowUrls || [], ...clientOptions.allowUrls || []], + denyUrls: [...internalOptions.denyUrls || [], ...clientOptions.denyUrls || []], + ignoreErrors: [ + ...internalOptions.ignoreErrors || [], + ...clientOptions.ignoreErrors || [], + ...internalOptions.disableErrorDefaults ? [] : DEFAULT_IGNORE_ERRORS + ], + ignoreTransactions: [...internalOptions.ignoreTransactions || [], ...clientOptions.ignoreTransactions || []], + ignoreInternal: internalOptions.ignoreInternal !== void 0 ? internalOptions.ignoreInternal : !0 + }; + } + function _shouldDropEvent(event, options) { + return options.ignoreInternal && _isSentryError(event) ? (debugBuild.DEBUG_BUILD && utils.logger.warn(`Event dropped due to being internal Sentry Error. +Event: ${utils.getEventDescription(event)}`), !0) : _isIgnoredError(event, options.ignoreErrors) ? (debugBuild.DEBUG_BUILD && utils.logger.warn( + `Event dropped due to being matched by \`ignoreErrors\` option. +Event: ${utils.getEventDescription(event)}` + ), !0) : _isUselessError(event) ? (debugBuild.DEBUG_BUILD && utils.logger.warn( + `Event dropped due to not having an error message, error type or stacktrace. +Event: ${utils.getEventDescription( + event + )}` + ), !0) : _isIgnoredTransaction(event, options.ignoreTransactions) ? (debugBuild.DEBUG_BUILD && utils.logger.warn( + `Event dropped due to being matched by \`ignoreTransactions\` option. +Event: ${utils.getEventDescription(event)}` + ), !0) : _isDeniedUrl(event, options.denyUrls) ? (debugBuild.DEBUG_BUILD && utils.logger.warn( + `Event dropped due to being matched by \`denyUrls\` option. +Event: ${utils.getEventDescription( + event + )}. +Url: ${_getEventFilterUrl(event)}` + ), !0) : _isAllowedUrl(event, options.allowUrls) ? !1 : (debugBuild.DEBUG_BUILD && utils.logger.warn( + `Event dropped due to not being matched by \`allowUrls\` option. +Event: ${utils.getEventDescription( + event + )}. +Url: ${_getEventFilterUrl(event)}` + ), !0); + } + function _isIgnoredError(event, ignoreErrors) { + return event.type || !ignoreErrors || !ignoreErrors.length ? !1 : _getPossibleEventMessages(event).some((message) => utils.stringMatchesSomePattern(message, ignoreErrors)); + } + function _isIgnoredTransaction(event, ignoreTransactions) { + if (event.type !== "transaction" || !ignoreTransactions || !ignoreTransactions.length) + return !1; + let name = event.transaction; + return name ? utils.stringMatchesSomePattern(name, ignoreTransactions) : !1; + } + function _isDeniedUrl(event, denyUrls) { + if (!denyUrls || !denyUrls.length) + return !1; + let url = _getEventFilterUrl(event); + return url ? utils.stringMatchesSomePattern(url, denyUrls) : !1; + } + function _isAllowedUrl(event, allowUrls) { + if (!allowUrls || !allowUrls.length) + return !0; + let url = _getEventFilterUrl(event); + return url ? utils.stringMatchesSomePattern(url, allowUrls) : !0; + } + function _getPossibleEventMessages(event) { + let possibleMessages = []; + event.message && possibleMessages.push(event.message); + let lastException; + try { + lastException = event.exception.values[event.exception.values.length - 1]; + } catch { + } + return lastException && lastException.value && (possibleMessages.push(lastException.value), lastException.type && possibleMessages.push(`${lastException.type}: ${lastException.value}`)), possibleMessages; + } + function _isSentryError(event) { + try { + return event.exception.values[0].type === "SentryError"; + } catch { + } + return !1; + } + function _getLastValidUrl(frames = []) { + for (let i = frames.length - 1; i >= 0; i--) { + let frame = frames[i]; + if (frame && frame.filename !== "" && frame.filename !== "[native code]") + return frame.filename || null; + } + return null; + } + function _getEventFilterUrl(event) { + try { + let frames; + try { + frames = event.exception.values[0].stacktrace.frames; + } catch { + } + return frames ? _getLastValidUrl(frames) : null; + } catch { + return debugBuild.DEBUG_BUILD && utils.logger.error(`Cannot extract url for event ${utils.getEventDescription(event)}`), null; + } + } + function _isUselessError(event) { + return event.type || !event.exception || !event.exception.values || event.exception.values.length === 0 ? !1 : ( + // No top-level message + !event.message && // There are no exception values that have a stacktrace, a non-generic-Error type or value + !event.exception.values.some((value) => value.stacktrace || value.type && value.type !== "Error" || value.value) + ); + } + exports.inboundFiltersIntegration = inboundFiltersIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/linkederrors.js +var require_linkederrors = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/linkederrors.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), DEFAULT_KEY = "cause", DEFAULT_LIMIT = 5, INTEGRATION_NAME = "LinkedErrors", _linkedErrorsIntegration = (options = {}) => { + let limit = options.limit || DEFAULT_LIMIT, key = options.key || DEFAULT_KEY; + return { + name: INTEGRATION_NAME, + preprocessEvent(event, hint, client) { + let options2 = client.getOptions(); + utils.applyAggregateErrorsToEvent( + utils.exceptionFromError, + options2.stackParser, + options2.maxValueLength, + key, + limit, + event, + hint + ); + } + }; + }, linkedErrorsIntegration = integration.defineIntegration(_linkedErrorsIntegration); + exports.linkedErrorsIntegration = linkedErrorsIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metadata.js +var require_metadata = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metadata.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), filenameMetadataMap = /* @__PURE__ */ new Map(), parsedStacks = /* @__PURE__ */ new Set(); + function ensureMetadataStacksAreParsed(parser) { + if (utils.GLOBAL_OBJ._sentryModuleMetadata) + for (let stack of Object.keys(utils.GLOBAL_OBJ._sentryModuleMetadata)) { + let metadata = utils.GLOBAL_OBJ._sentryModuleMetadata[stack]; + if (parsedStacks.has(stack)) + continue; + parsedStacks.add(stack); + let frames = parser(stack); + for (let frame of frames.reverse()) + if (frame.filename) { + filenameMetadataMap.set(frame.filename, metadata); + break; + } + } + } + function getMetadataForUrl(parser, filename) { + return ensureMetadataStacksAreParsed(parser), filenameMetadataMap.get(filename); + } + function addMetadataToStackFrames(parser, event) { + try { + event.exception.values.forEach((exception) => { + if (exception.stacktrace) + for (let frame of exception.stacktrace.frames || []) { + if (!frame.filename || frame.module_metadata) + continue; + let metadata = getMetadataForUrl(parser, frame.filename); + metadata && (frame.module_metadata = metadata); + } + }); + } catch { + } + } + function stripMetadataFromStackFrames(event) { + try { + event.exception.values.forEach((exception) => { + if (exception.stacktrace) + for (let frame of exception.stacktrace.frames || []) + delete frame.module_metadata; + }); + } catch { + } + } + exports.addMetadataToStackFrames = addMetadataToStackFrames; + exports.getMetadataForUrl = getMetadataForUrl; + exports.stripMetadataFromStackFrames = stripMetadataFromStackFrames; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/metadata.js +var require_metadata2 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/metadata.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), metadata = require_metadata(), INTEGRATION_NAME = "ModuleMetadata", _moduleMetadataIntegration = () => ({ + name: INTEGRATION_NAME, + setup(client) { + client.on("beforeEnvelope", (envelope) => { + utils.forEachEnvelopeItem(envelope, (item, type) => { + if (type === "event") { + let event = Array.isArray(item) ? item[1] : void 0; + event && (metadata.stripMetadataFromStackFrames(event), item[1] = event); + } + }); + }); + }, + processEvent(event, _hint, client) { + let stackParser = client.getOptions().stackParser; + return metadata.addMetadataToStackFrames(stackParser, event), event; + } + }), moduleMetadataIntegration = integration.defineIntegration(_moduleMetadataIntegration); + exports.moduleMetadataIntegration = moduleMetadataIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/requestdata.js +var require_requestdata2 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/requestdata.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), DEFAULT_OPTIONS = { + include: { + cookies: !0, + data: !0, + headers: !0, + ip: !1, + query_string: !0, + url: !0, + user: { + id: !0, + username: !0, + email: !0 + } + }, + transactionNamingScheme: "methodPath" + }, INTEGRATION_NAME = "RequestData", _requestDataIntegration = (options = {}) => { + let _options = { + ...DEFAULT_OPTIONS, + ...options, + include: { + ...DEFAULT_OPTIONS.include, + ...options.include, + user: options.include && typeof options.include.user == "boolean" ? options.include.user : { + ...DEFAULT_OPTIONS.include.user, + // Unclear why TS still thinks `options.include.user` could be a boolean at this point + ...(options.include || {}).user + } + } + }; + return { + name: INTEGRATION_NAME, + processEvent(event) { + let { sdkProcessingMetadata = {} } = event, req = sdkProcessingMetadata.request; + if (!req) + return event; + let addRequestDataOptions = convertReqDataIntegrationOptsToAddReqDataOpts(_options); + return utils.addRequestDataToEvent(event, req, addRequestDataOptions); + } + }; + }, requestDataIntegration = integration.defineIntegration(_requestDataIntegration); + function convertReqDataIntegrationOptsToAddReqDataOpts(integrationOptions) { + let { + transactionNamingScheme, + include: { ip, user, ...requestOptions } + } = integrationOptions, requestIncludeKeys = ["method"]; + for (let [key, value] of Object.entries(requestOptions)) + value && requestIncludeKeys.push(key); + let addReqDataUserOpt; + if (user === void 0) + addReqDataUserOpt = !0; + else if (typeof user == "boolean") + addReqDataUserOpt = user; + else { + let userIncludeKeys = []; + for (let [key, value] of Object.entries(user)) + value && userIncludeKeys.push(key); + addReqDataUserOpt = userIncludeKeys; + } + return { + include: { + ip, + user: addReqDataUserOpt, + request: requestIncludeKeys.length !== 0 ? requestIncludeKeys : void 0, + transaction: transactionNamingScheme + } + }; + } + exports.requestDataIntegration = requestDataIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/captureconsole.js +var require_captureconsole = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/captureconsole.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), exports$1 = require_exports(), integration = require_integration(), INTEGRATION_NAME = "CaptureConsole", _captureConsoleIntegration = (options = {}) => { + let levels = options.levels || utils.CONSOLE_LEVELS; + return { + name: INTEGRATION_NAME, + setup(client) { + "console" in utils.GLOBAL_OBJ && utils.addConsoleInstrumentationHandler(({ args, level }) => { + currentScopes.getClient() !== client || !levels.includes(level) || consoleHandler(args, level); + }); + } + }; + }, captureConsoleIntegration = integration.defineIntegration(_captureConsoleIntegration); + function consoleHandler(args, level) { + let captureContext = { + level: utils.severityLevelFromString(level), + extra: { + arguments: args + } + }; + currentScopes.withScope((scope) => { + if (scope.addEventProcessor((event) => (event.logger = "console", utils.addExceptionMechanism(event, { + handled: !1, + type: "console" + }), event)), level === "assert") { + if (!args[0]) { + let message2 = `Assertion failed: ${utils.safeJoin(args.slice(1), " ") || "console.assert"}`; + scope.setExtra("arguments", args.slice(1)), exports$1.captureMessage(message2, captureContext); + } + return; + } + let error = args.find((arg) => arg instanceof Error); + if (error) { + exports$1.captureException(error, captureContext); + return; + } + let message = utils.safeJoin(args, " "); + exports$1.captureMessage(message, captureContext); + }); + } + exports.captureConsoleIntegration = captureConsoleIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/debug.js +var require_debug = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/debug.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), INTEGRATION_NAME = "Debug", _debugIntegration = (options = {}) => { + let _options = { + debugger: !1, + stringify: !1, + ...options + }; + return { + name: INTEGRATION_NAME, + setup(client) { + client.on("beforeSendEvent", (event, hint) => { + if (_options.debugger) + debugger; + utils.consoleSandbox(() => { + _options.stringify ? (console.log(JSON.stringify(event, null, 2)), hint && Object.keys(hint).length && console.log(JSON.stringify(hint, null, 2))) : (console.log(event), hint && Object.keys(hint).length && console.log(hint)); + }); + }); + } + }; + }, debugIntegration = integration.defineIntegration(_debugIntegration); + exports.debugIntegration = debugIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/dedupe.js +var require_dedupe = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/dedupe.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), debugBuild = require_debug_build2(), INTEGRATION_NAME = "Dedupe", _dedupeIntegration = () => { + let previousEvent; + return { + name: INTEGRATION_NAME, + processEvent(currentEvent) { + if (currentEvent.type) + return currentEvent; + try { + if (_shouldDropEvent(currentEvent, previousEvent)) + return debugBuild.DEBUG_BUILD && utils.logger.warn("Event dropped due to being a duplicate of previously captured event."), null; + } catch { + } + return previousEvent = currentEvent; + } + }; + }, dedupeIntegration = integration.defineIntegration(_dedupeIntegration); + function _shouldDropEvent(currentEvent, previousEvent) { + return previousEvent ? !!(_isSameMessageEvent(currentEvent, previousEvent) || _isSameExceptionEvent(currentEvent, previousEvent)) : !1; + } + function _isSameMessageEvent(currentEvent, previousEvent) { + let currentMessage = currentEvent.message, previousMessage = previousEvent.message; + return !(!currentMessage && !previousMessage || currentMessage && !previousMessage || !currentMessage && previousMessage || currentMessage !== previousMessage || !_isSameFingerprint(currentEvent, previousEvent) || !_isSameStacktrace(currentEvent, previousEvent)); + } + function _isSameExceptionEvent(currentEvent, previousEvent) { + let previousException = _getExceptionFromEvent(previousEvent), currentException = _getExceptionFromEvent(currentEvent); + return !(!previousException || !currentException || previousException.type !== currentException.type || previousException.value !== currentException.value || !_isSameFingerprint(currentEvent, previousEvent) || !_isSameStacktrace(currentEvent, previousEvent)); + } + function _isSameStacktrace(currentEvent, previousEvent) { + let currentFrames = utils.getFramesFromEvent(currentEvent), previousFrames = utils.getFramesFromEvent(previousEvent); + if (!currentFrames && !previousFrames) + return !0; + if (currentFrames && !previousFrames || !currentFrames && previousFrames || (currentFrames = currentFrames, previousFrames = previousFrames, previousFrames.length !== currentFrames.length)) + return !1; + for (let i = 0; i < previousFrames.length; i++) { + let frameA = previousFrames[i], frameB = currentFrames[i]; + if (frameA.filename !== frameB.filename || frameA.lineno !== frameB.lineno || frameA.colno !== frameB.colno || frameA.function !== frameB.function) + return !1; + } + return !0; + } + function _isSameFingerprint(currentEvent, previousEvent) { + let currentFingerprint = currentEvent.fingerprint, previousFingerprint = previousEvent.fingerprint; + if (!currentFingerprint && !previousFingerprint) + return !0; + if (currentFingerprint && !previousFingerprint || !currentFingerprint && previousFingerprint) + return !1; + currentFingerprint = currentFingerprint, previousFingerprint = previousFingerprint; + try { + return currentFingerprint.join("") === previousFingerprint.join(""); + } catch { + return !1; + } + } + function _getExceptionFromEvent(event) { + return event.exception && event.exception.values && event.exception.values[0]; + } + exports._shouldDropEvent = _shouldDropEvent; + exports.dedupeIntegration = dedupeIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/extraerrordata.js +var require_extraerrordata = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/extraerrordata.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), debugBuild = require_debug_build2(), INTEGRATION_NAME = "ExtraErrorData", _extraErrorDataIntegration = (options = {}) => { + let { depth = 3, captureErrorCause = !0 } = options; + return { + name: INTEGRATION_NAME, + processEvent(event, hint) { + return _enhanceEventWithErrorData(event, hint, depth, captureErrorCause); + } + }; + }, extraErrorDataIntegration = integration.defineIntegration(_extraErrorDataIntegration); + function _enhanceEventWithErrorData(event, hint = {}, depth, captureErrorCause) { + if (!hint.originalException || !utils.isError(hint.originalException)) + return event; + let exceptionName = hint.originalException.name || hint.originalException.constructor.name, errorData = _extractErrorData(hint.originalException, captureErrorCause); + if (errorData) { + let contexts = { + ...event.contexts + }, normalizedErrorData = utils.normalize(errorData, depth); + return utils.isPlainObject(normalizedErrorData) && (utils.addNonEnumerableProperty(normalizedErrorData, "__sentry_skip_normalization__", !0), contexts[exceptionName] = normalizedErrorData), { + ...event, + contexts + }; + } + return event; + } + function _extractErrorData(error, captureErrorCause) { + try { + let nativeKeys = [ + "name", + "message", + "stack", + "line", + "column", + "fileName", + "lineNumber", + "columnNumber", + "toJSON" + ], extraErrorInfo = {}; + for (let key of Object.keys(error)) { + if (nativeKeys.indexOf(key) !== -1) + continue; + let value = error[key]; + extraErrorInfo[key] = utils.isError(value) ? value.toString() : value; + } + if (captureErrorCause && error.cause !== void 0 && (extraErrorInfo.cause = utils.isError(error.cause) ? error.cause.toString() : error.cause), typeof error.toJSON == "function") { + let serializedError = error.toJSON(); + for (let key of Object.keys(serializedError)) { + let value = serializedError[key]; + extraErrorInfo[key] = utils.isError(value) ? value.toString() : value; + } + } + return extraErrorInfo; + } catch (oO) { + debugBuild.DEBUG_BUILD && utils.logger.error("Unable to extract extra data from the Error object:", oO); + } + return null; + } + exports.extraErrorDataIntegration = extraErrorDataIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/rewriteframes.js +var require_rewriteframes = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/rewriteframes.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), INTEGRATION_NAME = "RewriteFrames", rewriteFramesIntegration2 = integration.defineIntegration((options = {}) => { + let root = options.root, prefix = options.prefix || "app:///", isBrowser = "window" in utils.GLOBAL_OBJ && utils.GLOBAL_OBJ.window !== void 0, iteratee = options.iteratee || generateIteratee({ isBrowser, root, prefix }); + function _processExceptionsEvent(event) { + try { + return { + ...event, + exception: { + ...event.exception, + // The check for this is performed inside `process` call itself, safe to skip here + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + values: event.exception.values.map((value) => ({ + ...value, + ...value.stacktrace && { stacktrace: _processStacktrace(value.stacktrace) } + })) + } + }; + } catch { + return event; + } + } + function _processStacktrace(stacktrace) { + return { + ...stacktrace, + frames: stacktrace && stacktrace.frames && stacktrace.frames.map((f) => iteratee(f)) + }; + } + return { + name: INTEGRATION_NAME, + processEvent(originalEvent) { + let processedEvent = originalEvent; + return originalEvent.exception && Array.isArray(originalEvent.exception.values) && (processedEvent = _processExceptionsEvent(processedEvent)), processedEvent; + } + }; + }); + function generateIteratee({ + isBrowser, + root, + prefix + }) { + return (frame) => { + if (!frame.filename) + return frame; + let isWindowsFrame = /^[a-zA-Z]:\\/.test(frame.filename) || // or the presence of a backslash without a forward slash (which are not allowed on Windows) + frame.filename.includes("\\") && !frame.filename.includes("/"), startsWithSlash = /^\//.test(frame.filename); + if (isBrowser) { + if (root) { + let oldFilename = frame.filename; + oldFilename.indexOf(root) === 0 && (frame.filename = oldFilename.replace(root, prefix)); + } + } else if (isWindowsFrame || startsWithSlash) { + let filename = isWindowsFrame ? frame.filename.replace(/^[a-zA-Z]:/, "").replace(/\\/g, "/") : frame.filename, base = root ? utils.relative(root, filename) : utils.basename(filename); + frame.filename = `${prefix}${base}`; + } + return frame; + }; + } + exports.generateIteratee = generateIteratee; + exports.rewriteFramesIntegration = rewriteFramesIntegration2; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/sessiontiming.js +var require_sessiontiming = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/sessiontiming.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), INTEGRATION_NAME = "SessionTiming", _sessionTimingIntegration = () => { + let startTime = utils.timestampInSeconds() * 1e3; + return { + name: INTEGRATION_NAME, + processEvent(event) { + let now = utils.timestampInSeconds() * 1e3; + return { + ...event, + extra: { + ...event.extra, + "session:start": startTime, + "session:duration": now - startTime, + "session:end": now + } + }; + } + }; + }, sessionTimingIntegration = integration.defineIntegration(_sessionTimingIntegration); + exports.sessionTimingIntegration = sessionTimingIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/zoderrors.js +var require_zoderrors = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/zoderrors.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), DEFAULT_LIMIT = 10, INTEGRATION_NAME = "ZodErrors"; + function originalExceptionIsZodError(originalException) { + return utils.isError(originalException) && originalException.name === "ZodError" && Array.isArray(originalException.errors); + } + function formatIssueTitle(issue) { + return { + ...issue, + path: "path" in issue && Array.isArray(issue.path) ? issue.path.join(".") : void 0, + keys: "keys" in issue ? JSON.stringify(issue.keys) : void 0, + unionErrors: "unionErrors" in issue ? JSON.stringify(issue.unionErrors) : void 0 + }; + } + function formatIssueMessage(zodError) { + let errorKeyMap = /* @__PURE__ */ new Set(); + for (let iss of zodError.issues) + iss.path && errorKeyMap.add(iss.path[0]); + let errorKeys = Array.from(errorKeyMap); + return `Failed to validate keys: ${utils.truncate(errorKeys.join(", "), 100)}`; + } + function applyZodErrorsToEvent(limit, event, hint) { + return !event.exception || !event.exception.values || !hint || !hint.originalException || !originalExceptionIsZodError(hint.originalException) || hint.originalException.issues.length === 0 ? event : { + ...event, + exception: { + ...event.exception, + values: [ + { + ...event.exception.values[0], + value: formatIssueMessage(hint.originalException) + }, + ...event.exception.values.slice(1) + ] + }, + extra: { + ...event.extra, + "zoderror.issues": hint.originalException.errors.slice(0, limit).map(formatIssueTitle) + } + }; + } + var _zodErrorsIntegration = (options = {}) => { + let limit = options.limit || DEFAULT_LIMIT; + return { + name: INTEGRATION_NAME, + processEvent(originalEvent, hint) { + return applyZodErrorsToEvent(limit, originalEvent, hint); + } + }; + }, zodErrorsIntegration = integration.defineIntegration(_zodErrorsIntegration); + exports.applyZodErrorsToEvent = applyZodErrorsToEvent; + exports.zodErrorsIntegration = zodErrorsIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/third-party-errors-filter.js +var require_third_party_errors_filter = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/integrations/third-party-errors-filter.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), integration = require_integration(), metadata = require_metadata(), thirdPartyErrorFilterIntegration = integration.defineIntegration((options) => ({ + name: "ThirdPartyErrorsFilter", + setup(client) { + client.on("beforeEnvelope", (envelope) => { + utils.forEachEnvelopeItem(envelope, (item, type) => { + if (type === "event") { + let event = Array.isArray(item) ? item[1] : void 0; + event && (metadata.stripMetadataFromStackFrames(event), item[1] = event); + } + }); + }); + }, + processEvent(event, _hint, client) { + let stackParser = client.getOptions().stackParser; + metadata.addMetadataToStackFrames(stackParser, event); + let frameKeys = getBundleKeysForAllFramesWithFilenames(event); + if (frameKeys) { + let arrayMethod = options.behaviour === "drop-error-if-contains-third-party-frames" || options.behaviour === "apply-tag-if-contains-third-party-frames" ? "some" : "every"; + if (frameKeys[arrayMethod]((keys) => !keys.some((key) => options.filterKeys.includes(key)))) { + if (options.behaviour === "drop-error-if-contains-third-party-frames" || options.behaviour === "drop-error-if-exclusively-contains-third-party-frames") + return null; + event.tags = { + ...event.tags, + third_party_code: !0 + }; + } + } + return event; + } + })); + function getBundleKeysForAllFramesWithFilenames(event) { + let frames = utils.getFramesFromEvent(event); + if (frames) + return frames.filter((frame) => !!frame.filename).map((frame) => frame.module_metadata ? Object.keys(frame.module_metadata).filter((key) => key.startsWith(BUNDLER_PLUGIN_APP_KEY_PREFIX)).map((key) => key.slice(BUNDLER_PLUGIN_APP_KEY_PREFIX.length)) : []); + } + var BUNDLER_PLUGIN_APP_KEY_PREFIX = "_sentryBundlerPluginAppKey:"; + exports.thirdPartyErrorFilterIntegration = thirdPartyErrorFilterIntegration; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/constants.js +var require_constants2 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/constants.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var COUNTER_METRIC_TYPE = "c", GAUGE_METRIC_TYPE = "g", SET_METRIC_TYPE = "s", DISTRIBUTION_METRIC_TYPE = "d", DEFAULT_BROWSER_FLUSH_INTERVAL = 5e3, DEFAULT_FLUSH_INTERVAL = 1e4, MAX_WEIGHT = 1e4; + exports.COUNTER_METRIC_TYPE = COUNTER_METRIC_TYPE; + exports.DEFAULT_BROWSER_FLUSH_INTERVAL = DEFAULT_BROWSER_FLUSH_INTERVAL; + exports.DEFAULT_FLUSH_INTERVAL = DEFAULT_FLUSH_INTERVAL; + exports.DISTRIBUTION_METRIC_TYPE = DISTRIBUTION_METRIC_TYPE; + exports.GAUGE_METRIC_TYPE = GAUGE_METRIC_TYPE; + exports.MAX_WEIGHT = MAX_WEIGHT; + exports.SET_METRIC_TYPE = SET_METRIC_TYPE; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/exports.js +var require_exports2 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/exports.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), debugBuild = require_debug_build2(); + require_errors(); + var spanUtils = require_spanUtils(), trace = require_trace(), handleCallbackErrors = require_handleCallbackErrors(), constants = require_constants2(); + function getMetricsAggregatorForClient(client, Aggregator) { + let globalMetricsAggregators = utils.getGlobalSingleton( + "globalMetricsAggregators", + () => /* @__PURE__ */ new WeakMap() + ), aggregator = globalMetricsAggregators.get(client); + if (aggregator) + return aggregator; + let newAggregator = new Aggregator(client); + return client.on("flush", () => newAggregator.flush()), client.on("close", () => newAggregator.close()), globalMetricsAggregators.set(client, newAggregator), newAggregator; + } + function addToMetricsAggregator(Aggregator, metricType, name, value, data = {}) { + let client = data.client || currentScopes.getClient(); + if (!client) + return; + let span = spanUtils.getActiveSpan(), rootSpan = span ? spanUtils.getRootSpan(span) : void 0, transactionName = rootSpan && spanUtils.spanToJSON(rootSpan).description, { unit, tags, timestamp } = data, { release, environment } = client.getOptions(), metricTags = {}; + release && (metricTags.release = release), environment && (metricTags.environment = environment), transactionName && (metricTags.transaction = transactionName), debugBuild.DEBUG_BUILD && utils.logger.log(`Adding value of ${value} to ${metricType} metric ${name}`), getMetricsAggregatorForClient(client, Aggregator).add(metricType, name, value, unit, { ...metricTags, ...tags }, timestamp); + } + function increment(aggregator, name, value = 1, data) { + addToMetricsAggregator(aggregator, constants.COUNTER_METRIC_TYPE, name, ensureNumber(value), data); + } + function distribution(aggregator, name, value, data) { + addToMetricsAggregator(aggregator, constants.DISTRIBUTION_METRIC_TYPE, name, ensureNumber(value), data); + } + function timing(aggregator, name, value, unit = "second", data) { + if (typeof value == "function") { + let startTime = utils.timestampInSeconds(); + return trace.startSpanManual( + { + op: "metrics.timing", + name, + startTime, + onlyIfParent: !0 + }, + (span) => handleCallbackErrors.handleCallbackErrors( + () => value(), + () => { + }, + () => { + let endTime = utils.timestampInSeconds(), timeDiff = endTime - startTime; + distribution(aggregator, name, timeDiff, { ...data, unit: "second" }), span.end(endTime); + } + ) + ); + } + distribution(aggregator, name, value, { ...data, unit }); + } + function set(aggregator, name, value, data) { + addToMetricsAggregator(aggregator, constants.SET_METRIC_TYPE, name, value, data); + } + function gauge(aggregator, name, value, data) { + addToMetricsAggregator(aggregator, constants.GAUGE_METRIC_TYPE, name, ensureNumber(value), data); + } + var metrics = { + increment, + distribution, + set, + gauge, + timing, + /** + * @ignore This is for internal use only. + */ + getMetricsAggregatorForClient + }; + function ensureNumber(number) { + return typeof number == "string" ? parseInt(number) : number; + } + exports.metrics = metrics; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/utils.js +var require_utils2 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/utils.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(); + function getBucketKey(metricType, name, unit, tags) { + let stringifiedTags = Object.entries(utils.dropUndefinedKeys(tags)).sort((a, b) => a[0].localeCompare(b[0])); + return `${metricType}${name}${unit}${stringifiedTags}`; + } + function simpleHash(s) { + let rv = 0; + for (let i = 0; i < s.length; i++) { + let c = s.charCodeAt(i); + rv = (rv << 5) - rv + c, rv &= rv; + } + return rv >>> 0; + } + function serializeMetricBuckets(metricBucketItems) { + let out = ""; + for (let item of metricBucketItems) { + let tagEntries = Object.entries(item.tags), maybeTags = tagEntries.length > 0 ? `|#${tagEntries.map(([key, value]) => `${key}:${value}`).join(",")}` : ""; + out += `${item.name}@${item.unit}:${item.metric}|${item.metricType}${maybeTags}|T${item.timestamp} +`; + } + return out; + } + function sanitizeUnit(unit) { + return unit.replace(/[^\w]+/gi, "_"); + } + function sanitizeMetricKey(key) { + return key.replace(/[^\w\-.]+/gi, "_"); + } + function sanitizeTagKey(key) { + return key.replace(/[^\w\-./]+/gi, ""); + } + var tagValueReplacements = [ + [` +`, "\\n"], + ["\r", "\\r"], + [" ", "\\t"], + ["\\", "\\\\"], + ["|", "\\u{7c}"], + [",", "\\u{2c}"] + ]; + function getCharOrReplacement(input) { + for (let [search, replacement] of tagValueReplacements) + if (input === search) + return replacement; + return input; + } + function sanitizeTagValue(value) { + return [...value].reduce((acc, char) => acc + getCharOrReplacement(char), ""); + } + function sanitizeTags(unsanitizedTags) { + let tags = {}; + for (let key in unsanitizedTags) + if (Object.prototype.hasOwnProperty.call(unsanitizedTags, key)) { + let sanitizedKey = sanitizeTagKey(key); + tags[sanitizedKey] = sanitizeTagValue(String(unsanitizedTags[key])); + } + return tags; + } + exports.getBucketKey = getBucketKey; + exports.sanitizeMetricKey = sanitizeMetricKey; + exports.sanitizeTags = sanitizeTags; + exports.sanitizeUnit = sanitizeUnit; + exports.serializeMetricBuckets = serializeMetricBuckets; + exports.simpleHash = simpleHash; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/envelope.js +var require_envelope3 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/envelope.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), utils$1 = require_utils2(); + function captureAggregateMetrics(client, metricBucketItems) { + utils.logger.log(`Flushing aggregated metrics, number of metrics: ${metricBucketItems.length}`); + let dsn = client.getDsn(), metadata = client.getSdkMetadata(), tunnel = client.getOptions().tunnel, metricsEnvelope = createMetricEnvelope(metricBucketItems, dsn, metadata, tunnel); + client.sendEnvelope(metricsEnvelope); + } + function createMetricEnvelope(metricBucketItems, dsn, metadata, tunnel) { + let headers = { + sent_at: (/* @__PURE__ */ new Date()).toISOString() + }; + metadata && metadata.sdk && (headers.sdk = { + name: metadata.sdk.name, + version: metadata.sdk.version + }), tunnel && dsn && (headers.dsn = utils.dsnToString(dsn)); + let item = createMetricEnvelopeItem(metricBucketItems); + return utils.createEnvelope(headers, [item]); + } + function createMetricEnvelopeItem(metricBucketItems) { + let payload = utils$1.serializeMetricBuckets(metricBucketItems); + return [{ + type: "statsd", + length: payload.length + }, payload]; + } + exports.captureAggregateMetrics = captureAggregateMetrics; + exports.createMetricEnvelope = createMetricEnvelope; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/instance.js +var require_instance = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/instance.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var constants = require_constants2(), utils = require_utils2(), CounterMetric = class { + constructor(_value) { + this._value = _value; + } + /** @inheritDoc */ + get weight() { + return 1; + } + /** @inheritdoc */ + add(value) { + this._value += value; + } + /** @inheritdoc */ + toString() { + return `${this._value}`; + } + }, GaugeMetric = class { + constructor(value) { + this._last = value, this._min = value, this._max = value, this._sum = value, this._count = 1; + } + /** @inheritDoc */ + get weight() { + return 5; + } + /** @inheritdoc */ + add(value) { + this._last = value, value < this._min && (this._min = value), value > this._max && (this._max = value), this._sum += value, this._count++; + } + /** @inheritdoc */ + toString() { + return `${this._last}:${this._min}:${this._max}:${this._sum}:${this._count}`; + } + }, DistributionMetric = class { + constructor(first) { + this._value = [first]; + } + /** @inheritDoc */ + get weight() { + return this._value.length; + } + /** @inheritdoc */ + add(value) { + this._value.push(value); + } + /** @inheritdoc */ + toString() { + return this._value.join(":"); + } + }, SetMetric = class { + constructor(first) { + this.first = first, this._value = /* @__PURE__ */ new Set([first]); + } + /** @inheritDoc */ + get weight() { + return this._value.size; + } + /** @inheritdoc */ + add(value) { + this._value.add(value); + } + /** @inheritdoc */ + toString() { + return Array.from(this._value).map((val) => typeof val == "string" ? utils.simpleHash(val) : val).join(":"); + } + }, METRIC_MAP = { + [constants.COUNTER_METRIC_TYPE]: CounterMetric, + [constants.GAUGE_METRIC_TYPE]: GaugeMetric, + [constants.DISTRIBUTION_METRIC_TYPE]: DistributionMetric, + [constants.SET_METRIC_TYPE]: SetMetric + }; + exports.CounterMetric = CounterMetric; + exports.DistributionMetric = DistributionMetric; + exports.GaugeMetric = GaugeMetric; + exports.METRIC_MAP = METRIC_MAP; + exports.SetMetric = SetMetric; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/aggregator.js +var require_aggregator = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/aggregator.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils$1 = require_cjs(), spanUtils = require_spanUtils(), constants = require_constants2(), envelope = require_envelope3(), instance = require_instance(), utils = require_utils2(), MetricsAggregator = class { + // TODO(@anonrig): Use FinalizationRegistry to have a proper way of flushing the buckets + // when the aggregator is garbage collected. + // Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry + // Different metrics have different weights. We use this to limit the number of metrics + // that we store in memory. + // Cast to any so that it can use Node.js timeout + // eslint-disable-next-line @typescript-eslint/no-explicit-any + // SDKs are required to shift the flush interval by random() * rollup_in_seconds. + // That shift is determined once per startup to create jittering. + // An SDK is required to perform force flushing ahead of scheduled time if the memory + // pressure is too high. There is no rule for this other than that SDKs should be tracking + // abstract aggregation complexity (eg: a counter only carries a single float, whereas a + // distribution is a float per emission). + // + // Force flush is used on either shutdown, flush() or when we exceed the max weight. + constructor(_client) { + this._client = _client, this._buckets = /* @__PURE__ */ new Map(), this._bucketsTotalWeight = 0, this._interval = setInterval(() => this._flush(), constants.DEFAULT_FLUSH_INTERVAL), this._interval.unref && this._interval.unref(), this._flushShift = Math.floor(Math.random() * constants.DEFAULT_FLUSH_INTERVAL / 1e3), this._forceFlush = !1; + } + /** + * @inheritDoc + */ + add(metricType, unsanitizedName, value, unsanitizedUnit = "none", unsanitizedTags = {}, maybeFloatTimestamp = utils$1.timestampInSeconds()) { + let timestamp = Math.floor(maybeFloatTimestamp), name = utils.sanitizeMetricKey(unsanitizedName), tags = utils.sanitizeTags(unsanitizedTags), unit = utils.sanitizeUnit(unsanitizedUnit), bucketKey = utils.getBucketKey(metricType, name, unit, tags), bucketItem = this._buckets.get(bucketKey), previousWeight = bucketItem && metricType === constants.SET_METRIC_TYPE ? bucketItem.metric.weight : 0; + bucketItem ? (bucketItem.metric.add(value), bucketItem.timestamp < timestamp && (bucketItem.timestamp = timestamp)) : (bucketItem = { + // @ts-expect-error we don't need to narrow down the type of value here, saves bundle size. + metric: new instance.METRIC_MAP[metricType](value), + timestamp, + metricType, + name, + unit, + tags + }, this._buckets.set(bucketKey, bucketItem)); + let val = typeof value == "string" ? bucketItem.metric.weight - previousWeight : value; + spanUtils.updateMetricSummaryOnActiveSpan(metricType, name, val, unit, unsanitizedTags, bucketKey), this._bucketsTotalWeight += bucketItem.metric.weight, this._bucketsTotalWeight >= constants.MAX_WEIGHT && this.flush(); + } + /** + * Flushes the current metrics to the transport via the transport. + */ + flush() { + this._forceFlush = !0, this._flush(); + } + /** + * Shuts down metrics aggregator and clears all metrics. + */ + close() { + this._forceFlush = !0, clearInterval(this._interval), this._flush(); + } + /** + * Flushes the buckets according to the internal state of the aggregator. + * If it is a force flush, which happens on shutdown, it will flush all buckets. + * Otherwise, it will only flush buckets that are older than the flush interval, + * and according to the flush shift. + * + * This function mutates `_forceFlush` and `_bucketsTotalWeight` properties. + */ + _flush() { + if (this._forceFlush) { + this._forceFlush = !1, this._bucketsTotalWeight = 0, this._captureMetrics(this._buckets), this._buckets.clear(); + return; + } + let cutoffSeconds = Math.floor(utils$1.timestampInSeconds()) - constants.DEFAULT_FLUSH_INTERVAL / 1e3 - this._flushShift, flushedBuckets = /* @__PURE__ */ new Map(); + for (let [key, bucket] of this._buckets) + bucket.timestamp <= cutoffSeconds && (flushedBuckets.set(key, bucket), this._bucketsTotalWeight -= bucket.metric.weight); + for (let [key] of flushedBuckets) + this._buckets.delete(key); + this._captureMetrics(flushedBuckets); + } + /** + * Only captures a subset of the buckets passed to this function. + * @param flushedBuckets + */ + _captureMetrics(flushedBuckets) { + if (flushedBuckets.size > 0) { + let buckets = Array.from(flushedBuckets).map(([, bucketItem]) => bucketItem); + envelope.captureAggregateMetrics(this._client, buckets); + } + } + }; + exports.MetricsAggregator = MetricsAggregator; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/exports-default.js +var require_exports_default = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/exports-default.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var aggregator = require_aggregator(), exports$1 = require_exports2(); + function increment(name, value = 1, data) { + exports$1.metrics.increment(aggregator.MetricsAggregator, name, value, data); + } + function distribution(name, value, data) { + exports$1.metrics.distribution(aggregator.MetricsAggregator, name, value, data); + } + function set(name, value, data) { + exports$1.metrics.set(aggregator.MetricsAggregator, name, value, data); + } + function gauge(name, value, data) { + exports$1.metrics.gauge(aggregator.MetricsAggregator, name, value, data); + } + function timing(name, value, unit = "second", data) { + return exports$1.metrics.timing(aggregator.MetricsAggregator, name, value, unit, data); + } + function getMetricsAggregatorForClient(client) { + return exports$1.metrics.getMetricsAggregatorForClient(client, aggregator.MetricsAggregator); + } + var metricsDefault = { + increment, + distribution, + set, + gauge, + timing, + /** + * @ignore This is for internal use only. + */ + getMetricsAggregatorForClient + }; + exports.metricsDefault = metricsDefault; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/browser-aggregator.js +var require_browser_aggregator = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/metrics/browser-aggregator.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils$1 = require_cjs(), spanUtils = require_spanUtils(), constants = require_constants2(), envelope = require_envelope3(), instance = require_instance(), utils = require_utils2(), BrowserMetricsAggregator = class { + // TODO(@anonrig): Use FinalizationRegistry to have a proper way of flushing the buckets + // when the aggregator is garbage collected. + // Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry + constructor(_client) { + this._client = _client, this._buckets = /* @__PURE__ */ new Map(), this._interval = setInterval(() => this.flush(), constants.DEFAULT_BROWSER_FLUSH_INTERVAL); + } + /** + * @inheritDoc + */ + add(metricType, unsanitizedName, value, unsanitizedUnit = "none", unsanitizedTags = {}, maybeFloatTimestamp = utils$1.timestampInSeconds()) { + let timestamp = Math.floor(maybeFloatTimestamp), name = utils.sanitizeMetricKey(unsanitizedName), tags = utils.sanitizeTags(unsanitizedTags), unit = utils.sanitizeUnit(unsanitizedUnit), bucketKey = utils.getBucketKey(metricType, name, unit, tags), bucketItem = this._buckets.get(bucketKey), previousWeight = bucketItem && metricType === constants.SET_METRIC_TYPE ? bucketItem.metric.weight : 0; + bucketItem ? (bucketItem.metric.add(value), bucketItem.timestamp < timestamp && (bucketItem.timestamp = timestamp)) : (bucketItem = { + // @ts-expect-error we don't need to narrow down the type of value here, saves bundle size. + metric: new instance.METRIC_MAP[metricType](value), + timestamp, + metricType, + name, + unit, + tags + }, this._buckets.set(bucketKey, bucketItem)); + let val = typeof value == "string" ? bucketItem.metric.weight - previousWeight : value; + spanUtils.updateMetricSummaryOnActiveSpan(metricType, name, val, unit, unsanitizedTags, bucketKey); + } + /** + * @inheritDoc + */ + flush() { + if (this._buckets.size === 0) + return; + let metricBuckets = Array.from(this._buckets.values()); + envelope.captureAggregateMetrics(this._client, metricBuckets), this._buckets.clear(); + } + /** + * @inheritDoc + */ + close() { + clearInterval(this._interval), this.flush(); + } + }; + exports.BrowserMetricsAggregator = BrowserMetricsAggregator; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/fetch.js +var require_fetch2 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/fetch.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), semanticAttributes = require_semanticAttributes(); + require_errors(); + require_debug_build2(); + var hasTracingEnabled = require_hasTracingEnabled(), spanUtils = require_spanUtils(), sentryNonRecordingSpan = require_sentryNonRecordingSpan(), spanstatus = require_spanstatus(), trace = require_trace(), dynamicSamplingContext = require_dynamicSamplingContext(); + function instrumentFetchRequest(handlerData, shouldCreateSpan, shouldAttachHeaders, spans, spanOrigin = "auto.http.browser") { + if (!handlerData.fetchData) + return; + let shouldCreateSpanResult = hasTracingEnabled.hasTracingEnabled() && shouldCreateSpan(handlerData.fetchData.url); + if (handlerData.endTimestamp && shouldCreateSpanResult) { + let spanId = handlerData.fetchData.__span; + if (!spanId) return; + let span2 = spans[spanId]; + span2 && (endSpan(span2, handlerData), delete spans[spanId]); + return; + } + let scope = currentScopes.getCurrentScope(), client = currentScopes.getClient(), { method, url } = handlerData.fetchData, fullUrl = getFullURL(url), host = fullUrl ? utils.parseUrl(fullUrl).host : void 0, hasParent = !!spanUtils.getActiveSpan(), span = shouldCreateSpanResult && hasParent ? trace.startInactiveSpan({ + name: `${method} ${url}`, + attributes: { + url, + type: "fetch", + "http.method": method, + "http.url": fullUrl, + "server.address": host, + [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: spanOrigin, + [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP]: "http.client" + } + }) : new sentryNonRecordingSpan.SentryNonRecordingSpan(); + if (handlerData.fetchData.__span = span.spanContext().spanId, spans[span.spanContext().spanId] = span, shouldAttachHeaders(handlerData.fetchData.url) && client) { + let request = handlerData.args[0]; + handlerData.args[1] = handlerData.args[1] || {}; + let options = handlerData.args[1]; + options.headers = addTracingHeadersToFetchRequest( + request, + client, + scope, + options, + // If performance is disabled (TWP) or there's no active root span (pageload/navigation/interaction), + // we do not want to use the span as base for the trace headers, + // which means that the headers will be generated from the scope and the sampling decision is deferred + hasTracingEnabled.hasTracingEnabled() && hasParent ? span : void 0 + ); + } + return span; + } + function addTracingHeadersToFetchRequest(request, client, scope, options, span) { + let isolationScope = currentScopes.getIsolationScope(), { traceId, spanId, sampled, dsc } = { + ...isolationScope.getPropagationContext(), + ...scope.getPropagationContext() + }, sentryTraceHeader = span ? spanUtils.spanToTraceHeader(span) : utils.generateSentryTraceHeader(traceId, spanId, sampled), sentryBaggageHeader = utils.dynamicSamplingContextToSentryBaggageHeader( + dsc || (span ? dynamicSamplingContext.getDynamicSamplingContextFromSpan(span) : dynamicSamplingContext.getDynamicSamplingContextFromClient(traceId, client)) + ), headers = options.headers || (typeof Request < "u" && utils.isInstanceOf(request, Request) ? request.headers : void 0); + if (headers) + if (typeof Headers < "u" && utils.isInstanceOf(headers, Headers)) { + let newHeaders = new Headers(headers); + return newHeaders.append("sentry-trace", sentryTraceHeader), sentryBaggageHeader && newHeaders.append(utils.BAGGAGE_HEADER_NAME, sentryBaggageHeader), newHeaders; + } else if (Array.isArray(headers)) { + let newHeaders = [...headers, ["sentry-trace", sentryTraceHeader]]; + return sentryBaggageHeader && newHeaders.push([utils.BAGGAGE_HEADER_NAME, sentryBaggageHeader]), newHeaders; + } else { + let existingBaggageHeader = "baggage" in headers ? headers.baggage : void 0, newBaggageHeaders = []; + return Array.isArray(existingBaggageHeader) ? newBaggageHeaders.push(...existingBaggageHeader) : existingBaggageHeader && newBaggageHeaders.push(existingBaggageHeader), sentryBaggageHeader && newBaggageHeaders.push(sentryBaggageHeader), { + ...headers, + "sentry-trace": sentryTraceHeader, + baggage: newBaggageHeaders.length > 0 ? newBaggageHeaders.join(",") : void 0 + }; + } + else return { "sentry-trace": sentryTraceHeader, baggage: sentryBaggageHeader }; + } + function getFullURL(url) { + try { + return new URL(url).href; + } catch { + return; + } + } + function endSpan(span, handlerData) { + if (handlerData.response) { + spanstatus.setHttpStatus(span, handlerData.response.status); + let contentLength = handlerData.response && handlerData.response.headers && handlerData.response.headers.get("content-length"); + if (contentLength) { + let contentLengthNum = parseInt(contentLength); + contentLengthNum > 0 && span.setAttribute("http.response_content_length", contentLengthNum); + } + } else handlerData.error && span.setStatus({ code: spanstatus.SPAN_STATUS_ERROR, message: "internal_error" }); + span.end(); + } + exports.addTracingHeadersToFetchRequest = addTracingHeadersToFetchRequest; + exports.instrumentFetchRequest = instrumentFetchRequest; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/trpc.js +var require_trpc = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/trpc.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(), exports$1 = require_exports(), semanticAttributes = require_semanticAttributes(); + require_errors(); + require_debug_build2(); + var trace = require_trace(), trpcCaptureContext = { mechanism: { handled: !1, data: { function: "trpcMiddleware" } } }; + function trpcMiddleware(options = {}) { + return function(opts) { + let { path, type, next, rawInput } = opts, client = currentScopes.getClient(), clientOptions = client && client.getOptions(), trpcContext = { + procedure_type: type + }; + (options.attachRpcInput !== void 0 ? options.attachRpcInput : clientOptions && clientOptions.sendDefaultPii) && (trpcContext.input = utils.normalize(rawInput)), exports$1.setContext("trpc", trpcContext); + function captureIfError(nextResult) { + typeof nextResult == "object" && nextResult !== null && "ok" in nextResult && !nextResult.ok && "error" in nextResult && exports$1.captureException(nextResult.error, trpcCaptureContext); + } + return trace.startSpanManual( + { + name: `trpc/${path}`, + op: "rpc.server", + attributes: { + [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: "route", + [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.rpc.trpc" + } + }, + (span) => { + let maybePromiseResult; + try { + maybePromiseResult = next(); + } catch (e) { + throw exports$1.captureException(e, trpcCaptureContext), span.end(), e; + } + return utils.isThenable(maybePromiseResult) ? maybePromiseResult.then( + (nextResult) => (captureIfError(nextResult), span.end(), nextResult), + (e) => { + throw exports$1.captureException(e, trpcCaptureContext), span.end(), e; + } + ) : (captureIfError(maybePromiseResult), span.end(), maybePromiseResult); + } + ); + }; + } + exports.trpcMiddleware = trpcMiddleware; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/feedback.js +var require_feedback = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/feedback.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var utils = require_cjs(), currentScopes = require_currentScopes(); + function captureFeedback(feedbackParams, hint = {}, scope = currentScopes.getCurrentScope()) { + let { message, name, email, url, source, associatedEventId } = feedbackParams, feedbackEvent = { + contexts: { + feedback: utils.dropUndefinedKeys({ + contact_email: email, + name, + message, + url, + source, + associated_event_id: associatedEventId + }) + }, + type: "feedback", + level: "info" + }, client = scope && scope.getClient() || currentScopes.getClient(); + return client && client.emit("beforeSendFeedback", feedbackEvent, hint), scope.captureEvent(feedbackEvent, hint); + } + exports.captureFeedback = captureFeedback; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/getCurrentHubShim.js +var require_getCurrentHubShim = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/getCurrentHubShim.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var breadcrumbs = require_breadcrumbs(), currentScopes = require_currentScopes(), exports$1 = require_exports(); + function getCurrentHubShim() { + return { + bindClient(client) { + currentScopes.getCurrentScope().setClient(client); + }, + withScope: currentScopes.withScope, + getClient: () => currentScopes.getClient(), + getScope: currentScopes.getCurrentScope, + getIsolationScope: currentScopes.getIsolationScope, + captureException: (exception, hint) => currentScopes.getCurrentScope().captureException(exception, hint), + captureMessage: (message, level, hint) => currentScopes.getCurrentScope().captureMessage(message, level, hint), + captureEvent: exports$1.captureEvent, + addBreadcrumb: breadcrumbs.addBreadcrumb, + setUser: exports$1.setUser, + setTags: exports$1.setTags, + setTag: exports$1.setTag, + setExtra: exports$1.setExtra, + setExtras: exports$1.setExtras, + setContext: exports$1.setContext, + getIntegration(integration) { + let client = currentScopes.getClient(); + return client && client.getIntegrationByName(integration.id) || null; + }, + startSession: exports$1.startSession, + endSession: exports$1.endSession, + captureSession(end) { + if (end) + return exports$1.endSession(); + _sendSessionUpdate(); + } + }; + } + var getCurrentHub = getCurrentHubShim; + function _sendSessionUpdate() { + let scope = currentScopes.getCurrentScope(), client = currentScopes.getClient(), session = scope.getSession(); + client && session && client.captureSession(session); + } + exports.getCurrentHub = getCurrentHub; + exports.getCurrentHubShim = getCurrentHubShim; + } +}); + +// ../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/index.js +var require_cjs2 = __commonJS({ + "../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/index.js"(exports) { + Object.defineProperty(exports, "__esModule", { value: !0 }); + var errors = require_errors(), utils$1 = require_utils(), hubextensions = require_hubextensions(), idleSpan = require_idleSpan(), sentrySpan = require_sentrySpan(), sentryNonRecordingSpan = require_sentryNonRecordingSpan(), spanstatus = require_spanstatus(), trace = require_trace(), dynamicSamplingContext = require_dynamicSamplingContext(), measurement = require_measurement(), sampling = require_sampling(), logSpans = require_logSpans(), semanticAttributes = require_semanticAttributes(), envelope = require_envelope2(), exports$1 = require_exports(), currentScopes = require_currentScopes(), defaultScopes = require_defaultScopes(), index = require_asyncContext(), carrier = require_carrier(), session = require_session(), sessionflusher = require_sessionflusher(), scope = require_scope(), eventProcessors = require_eventProcessors(), api = require_api(), baseclient = require_baseclient(), serverRuntimeClient = require_server_runtime_client(), sdk = require_sdk(), base = require_base(), offline = require_offline(), multiplexed = require_multiplexed(), integration = require_integration(), applyScopeDataToEvent = require_applyScopeDataToEvent(), prepareEvent = require_prepareEvent(), checkin = require_checkin(), hasTracingEnabled = require_hasTracingEnabled(), isSentryRequestUrl = require_isSentryRequestUrl(), handleCallbackErrors = require_handleCallbackErrors(), parameterize = require_parameterize(), spanUtils = require_spanUtils(), parseSampleRate = require_parseSampleRate(), sdkMetadata = require_sdkMetadata(), constants = require_constants(), breadcrumbs = require_breadcrumbs(), functiontostring = require_functiontostring(), inboundfilters = require_inboundfilters(), linkederrors = require_linkederrors(), metadata = require_metadata2(), requestdata = require_requestdata2(), captureconsole = require_captureconsole(), debug = require_debug(), dedupe = require_dedupe(), extraerrordata = require_extraerrordata(), rewriteframes = require_rewriteframes(), sessiontiming = require_sessiontiming(), zoderrors = require_zoderrors(), thirdPartyErrorsFilter = require_third_party_errors_filter(), exports$2 = require_exports2(), exportsDefault = require_exports_default(), browserAggregator = require_browser_aggregator(), metricSummary = require_metric_summary(), fetch2 = require_fetch2(), trpc = require_trpc(), feedback = require_feedback(), getCurrentHubShim = require_getCurrentHubShim(), utils = require_cjs(); + exports.registerSpanErrorInstrumentation = errors.registerSpanErrorInstrumentation; + exports.getCapturedScopesOnSpan = utils$1.getCapturedScopesOnSpan; + exports.setCapturedScopesOnSpan = utils$1.setCapturedScopesOnSpan; + exports.addTracingExtensions = hubextensions.addTracingExtensions; + exports.TRACING_DEFAULTS = idleSpan.TRACING_DEFAULTS; + exports.startIdleSpan = idleSpan.startIdleSpan; + exports.SentrySpan = sentrySpan.SentrySpan; + exports.SentryNonRecordingSpan = sentryNonRecordingSpan.SentryNonRecordingSpan; + exports.SPAN_STATUS_ERROR = spanstatus.SPAN_STATUS_ERROR; + exports.SPAN_STATUS_OK = spanstatus.SPAN_STATUS_OK; + exports.SPAN_STATUS_UNSET = spanstatus.SPAN_STATUS_UNSET; + exports.getSpanStatusFromHttpCode = spanstatus.getSpanStatusFromHttpCode; + exports.setHttpStatus = spanstatus.setHttpStatus; + exports.continueTrace = trace.continueTrace; + exports.startInactiveSpan = trace.startInactiveSpan; + exports.startNewTrace = trace.startNewTrace; + exports.startSpan = trace.startSpan; + exports.startSpanManual = trace.startSpanManual; + exports.suppressTracing = trace.suppressTracing; + exports.withActiveSpan = trace.withActiveSpan; + exports.getDynamicSamplingContextFromClient = dynamicSamplingContext.getDynamicSamplingContextFromClient; + exports.getDynamicSamplingContextFromSpan = dynamicSamplingContext.getDynamicSamplingContextFromSpan; + exports.spanToBaggageHeader = dynamicSamplingContext.spanToBaggageHeader; + exports.setMeasurement = measurement.setMeasurement; + exports.timedEventsToMeasurements = measurement.timedEventsToMeasurements; + exports.sampleSpan = sampling.sampleSpan; + exports.logSpanEnd = logSpans.logSpanEnd; + exports.logSpanStart = logSpans.logSpanStart; + exports.SEMANTIC_ATTRIBUTE_CACHE_HIT = semanticAttributes.SEMANTIC_ATTRIBUTE_CACHE_HIT; + exports.SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE = semanticAttributes.SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE; + exports.SEMANTIC_ATTRIBUTE_CACHE_KEY = semanticAttributes.SEMANTIC_ATTRIBUTE_CACHE_KEY; + exports.SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME = semanticAttributes.SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME; + exports.SEMANTIC_ATTRIBUTE_PROFILE_ID = semanticAttributes.SEMANTIC_ATTRIBUTE_PROFILE_ID; + exports.SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON; + exports.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT; + exports.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE; + exports.SEMANTIC_ATTRIBUTE_SENTRY_OP = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP; + exports.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN; + exports.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE; + exports.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE; + exports.createEventEnvelope = envelope.createEventEnvelope; + exports.createSessionEnvelope = envelope.createSessionEnvelope; + exports.createSpanEnvelope = envelope.createSpanEnvelope; + exports.addEventProcessor = exports$1.addEventProcessor; + exports.captureCheckIn = exports$1.captureCheckIn; + exports.captureEvent = exports$1.captureEvent; + exports.captureException = exports$1.captureException; + exports.captureMessage = exports$1.captureMessage; + exports.captureSession = exports$1.captureSession; + exports.close = exports$1.close; + exports.endSession = exports$1.endSession; + exports.flush = exports$1.flush; + exports.isEnabled = exports$1.isEnabled; + exports.isInitialized = exports$1.isInitialized; + exports.lastEventId = exports$1.lastEventId; + exports.setContext = exports$1.setContext; + exports.setExtra = exports$1.setExtra; + exports.setExtras = exports$1.setExtras; + exports.setTag = exports$1.setTag; + exports.setTags = exports$1.setTags; + exports.setUser = exports$1.setUser; + exports.startSession = exports$1.startSession; + exports.withMonitor = exports$1.withMonitor; + exports.getClient = currentScopes.getClient; + exports.getCurrentScope = currentScopes.getCurrentScope; + exports.getGlobalScope = currentScopes.getGlobalScope; + exports.getIsolationScope = currentScopes.getIsolationScope; + exports.withIsolationScope = currentScopes.withIsolationScope; + exports.withScope = currentScopes.withScope; + exports.getDefaultCurrentScope = defaultScopes.getDefaultCurrentScope; + exports.getDefaultIsolationScope = defaultScopes.getDefaultIsolationScope; + exports.setAsyncContextStrategy = index.setAsyncContextStrategy; + exports.getMainCarrier = carrier.getMainCarrier; + exports.closeSession = session.closeSession; + exports.makeSession = session.makeSession; + exports.updateSession = session.updateSession; + exports.SessionFlusher = sessionflusher.SessionFlusher; + exports.Scope = scope.Scope; + exports.notifyEventProcessors = eventProcessors.notifyEventProcessors; + exports.getEnvelopeEndpointWithUrlEncodedAuth = api.getEnvelopeEndpointWithUrlEncodedAuth; + exports.getReportDialogEndpoint = api.getReportDialogEndpoint; + exports.BaseClient = baseclient.BaseClient; + exports.ServerRuntimeClient = serverRuntimeClient.ServerRuntimeClient; + exports.initAndBind = sdk.initAndBind; + exports.setCurrentClient = sdk.setCurrentClient; + exports.createTransport = base.createTransport; + exports.makeOfflineTransport = offline.makeOfflineTransport; + exports.makeMultiplexedTransport = multiplexed.makeMultiplexedTransport; + exports.addIntegration = integration.addIntegration; + exports.defineIntegration = integration.defineIntegration; + exports.getIntegrationsToSetup = integration.getIntegrationsToSetup; + exports.applyScopeDataToEvent = applyScopeDataToEvent.applyScopeDataToEvent; + exports.mergeScopeData = applyScopeDataToEvent.mergeScopeData; + exports.prepareEvent = prepareEvent.prepareEvent; + exports.createCheckInEnvelope = checkin.createCheckInEnvelope; + exports.hasTracingEnabled = hasTracingEnabled.hasTracingEnabled; + exports.isSentryRequestUrl = isSentryRequestUrl.isSentryRequestUrl; + exports.handleCallbackErrors = handleCallbackErrors.handleCallbackErrors; + exports.parameterize = parameterize.parameterize; + exports.addChildSpanToSpan = spanUtils.addChildSpanToSpan; + exports.getActiveSpan = spanUtils.getActiveSpan; + exports.getRootSpan = spanUtils.getRootSpan; + exports.getSpanDescendants = spanUtils.getSpanDescendants; + exports.getStatusMessage = spanUtils.getStatusMessage; + exports.spanIsSampled = spanUtils.spanIsSampled; + exports.spanToJSON = spanUtils.spanToJSON; + exports.spanToTraceContext = spanUtils.spanToTraceContext; + exports.spanToTraceHeader = spanUtils.spanToTraceHeader; + exports.parseSampleRate = parseSampleRate.parseSampleRate; + exports.applySdkMetadata = sdkMetadata.applySdkMetadata; + exports.DEFAULT_ENVIRONMENT = constants.DEFAULT_ENVIRONMENT; + exports.addBreadcrumb = breadcrumbs.addBreadcrumb; + exports.functionToStringIntegration = functiontostring.functionToStringIntegration; + exports.inboundFiltersIntegration = inboundfilters.inboundFiltersIntegration; + exports.linkedErrorsIntegration = linkederrors.linkedErrorsIntegration; + exports.moduleMetadataIntegration = metadata.moduleMetadataIntegration; + exports.requestDataIntegration = requestdata.requestDataIntegration; + exports.captureConsoleIntegration = captureconsole.captureConsoleIntegration; + exports.debugIntegration = debug.debugIntegration; + exports.dedupeIntegration = dedupe.dedupeIntegration; + exports.extraErrorDataIntegration = extraerrordata.extraErrorDataIntegration; + exports.rewriteFramesIntegration = rewriteframes.rewriteFramesIntegration; + exports.sessionTimingIntegration = sessiontiming.sessionTimingIntegration; + exports.zodErrorsIntegration = zoderrors.zodErrorsIntegration; + exports.thirdPartyErrorFilterIntegration = thirdPartyErrorsFilter.thirdPartyErrorFilterIntegration; + exports.metrics = exports$2.metrics; + exports.metricsDefault = exportsDefault.metricsDefault; + exports.BrowserMetricsAggregator = browserAggregator.BrowserMetricsAggregator; + exports.getMetricSummaryJsonForSpan = metricSummary.getMetricSummaryJsonForSpan; + exports.addTracingHeadersToFetchRequest = fetch2.addTracingHeadersToFetchRequest; + exports.instrumentFetchRequest = fetch2.instrumentFetchRequest; + exports.trpcMiddleware = trpc.trpcMiddleware; + exports.captureFeedback = feedback.captureFeedback; + exports.getCurrentHub = getCurrentHubShim.getCurrentHub; + exports.getCurrentHubShim = getCurrentHubShim.getCurrentHubShim; + exports.SDK_VERSION = utils.SDK_VERSION; + } +}); + +// ../../node_modules/.pnpm/toucan-js@4.0.0_patch_hash=qxsfpdzvzbhq2ecirbu5xq4vlq/node_modules/toucan-js/dist/index.cjs.js +var require_index_cjs = __commonJS({ + "../../node_modules/.pnpm/toucan-js@4.0.0_patch_hash=qxsfpdzvzbhq2ecirbu5xq4vlq/node_modules/toucan-js/dist/index.cjs.js"(exports) { + "use strict"; + var utils = require_cjs(), core = require_cjs2(); + function isObject(value) { + return typeof value == "object" && value !== null; + } + function isMechanism(value) { + return isObject(value) && "handled" in value && typeof value.handled == "boolean" && "type" in value && typeof value.type == "string"; + } + function containsMechanism(value) { + return isObject(value) && "mechanism" in value && isMechanism(value.mechanism); + } + function getSentryRelease() { + if (utils.GLOBAL_OBJ.SENTRY_RELEASE && utils.GLOBAL_OBJ.SENTRY_RELEASE.id) + return utils.GLOBAL_OBJ.SENTRY_RELEASE.id; + } + function setOnOptional(target, entry) { + return target !== void 0 ? (target[entry[0]] = entry[1], target) : { [entry[0]]: entry[1] }; + } + function parseStackFrames(stackParser, error) { + return stackParser(error.stack || "", 1); + } + function extractMessage(ex) { + let message = ex && ex.message; + return message ? message.error && typeof message.error.message == "string" ? message.error.message : message : "No error message"; + } + function exceptionFromError(stackParser, error) { + let exception = { + type: error.name || error.constructor.name, + value: extractMessage(error) + }, frames = parseStackFrames(stackParser, error); + return frames.length && (exception.stacktrace = { frames }), exception.type === void 0 && exception.value === "" && (exception.value = "Unrecoverable error caught"), exception; + } + function eventFromUnknownInput(sdk, stackParser, exception, hint) { + let ex, mechanism = (hint && hint.data && containsMechanism(hint.data) ? hint.data.mechanism : void 0) ?? { + handled: !0, + type: "generic" + }; + if (utils.isError(exception)) + ex = exception; + else { + if (utils.isPlainObject(exception)) { + let message = `Non-Error exception captured with keys: ${utils.extractExceptionKeysForMessage(exception)}`, client = sdk?.getClient(), normalizeDepth = client && client.getOptions().normalizeDepth; + sdk?.setExtra("__serialized__", utils.normalizeToSize(exception, normalizeDepth)), ex = hint && hint.syntheticException || new Error(message), ex.message = message; + } else + ex = hint && hint.syntheticException || new Error(exception), ex.message = exception; + mechanism.synthetic = !0; + } + let event = { + exception: { + values: [exceptionFromError(stackParser, ex)] + } + }; + return utils.addExceptionTypeValue(event, void 0, void 0), utils.addExceptionMechanism(event, mechanism), { + ...event, + event_id: hint && hint.event_id + }; + } + function eventFromMessage(stackParser, message, level = "info", hint, attachStacktrace) { + let event = { + event_id: hint && hint.event_id, + level, + message + }; + if (attachStacktrace && hint && hint.syntheticException) { + let frames = parseStackFrames(stackParser, hint.syntheticException); + frames.length && (event.exception = { + values: [ + { + value: message, + stacktrace: { frames } + } + ] + }); + } + return event; + } + var DEFAULT_LIMIT = 5, linkedErrorsIntegration = core.defineIntegration((options = { limit: DEFAULT_LIMIT }) => ({ + name: "LinkedErrors", + processEvent: (event, hint, client) => handler(client.getOptions().stackParser, options.limit, event, hint) + })); + function handler(parser, limit, event, hint) { + if (!event.exception || !event.exception.values || !hint || !utils.isInstanceOf(hint.originalException, Error)) + return event; + let linkedErrors = walkErrorTree(parser, limit, hint.originalException); + return event.exception.values = [...linkedErrors, ...event.exception.values], event; + } + function walkErrorTree(parser, limit, error, stack = []) { + if (!utils.isInstanceOf(error.cause, Error) || stack.length + 1 >= limit) + return stack; + let exception = exceptionFromError(parser, error.cause); + return walkErrorTree(parser, limit, error.cause, [ + exception, + ...stack + ]); + } + var defaultRequestDataOptions = { + allowedHeaders: ["CF-RAY", "CF-Worker"] + }, requestDataIntegration = core.defineIntegration((userOptions = {}) => { + let options = { ...defaultRequestDataOptions, ...userOptions }; + return { + name: "RequestData", + preprocessEvent: (event) => { + let { sdkProcessingMetadata } = event; + return sdkProcessingMetadata && ("request" in sdkProcessingMetadata && sdkProcessingMetadata.request instanceof Request && (event.request = toEventRequest(sdkProcessingMetadata.request, options), event.user = toEventUser(event.user ?? {}, sdkProcessingMetadata.request, options)), "requestData" in sdkProcessingMetadata && (event.request ? event.request.data = sdkProcessingMetadata.requestData : event.request = { + data: sdkProcessingMetadata.requestData + })), event; + } + }; + }); + function toEventUser(user, request, options) { + let ip_address = request.headers.get("CF-Connecting-IP"), { allowedIps } = options, newUser = { ...user }; + return !("ip_address" in user) && // If ip_address is already set from explicitly called setUser, we don't want to overwrite it + ip_address && allowedIps !== void 0 && testAllowlist(ip_address, allowedIps) && (newUser.ip_address = ip_address), Object.keys(newUser).length > 0 ? newUser : void 0; + } + function toEventRequest(request, options) { + let cookieString = request.headers.get("cookie"), cookies; + if (cookieString) + try { + cookies = parseCookie(cookieString); + } catch { + } + let headers = {}; + for (let [k, v] of request.headers.entries()) + k !== "cookie" && (headers[k] = v); + let eventRequest = { + method: request.method, + cookies, + headers + }; + try { + let url = new URL(request.url); + eventRequest.url = `${url.protocol}//${url.hostname}${url.pathname}`, eventRequest.query_string = url.search; + } catch { + let qi = request.url.indexOf("?"); + qi < 0 ? eventRequest.url = request.url : (eventRequest.url = request.url.substr(0, qi), eventRequest.query_string = request.url.substr(qi + 1)); + } + let { allowedHeaders, allowedCookies, allowedSearchParams } = options; + if (allowedHeaders !== void 0 && eventRequest.headers ? (eventRequest.headers = applyAllowlistToObject(eventRequest.headers, allowedHeaders), Object.keys(eventRequest.headers).length === 0 && delete eventRequest.headers) : delete eventRequest.headers, allowedCookies !== void 0 && eventRequest.cookies ? (eventRequest.cookies = applyAllowlistToObject(eventRequest.cookies, allowedCookies), Object.keys(eventRequest.cookies).length === 0 && delete eventRequest.cookies) : delete eventRequest.cookies, allowedSearchParams !== void 0) { + let params = Object.fromEntries(new URLSearchParams(eventRequest.query_string)), allowedParams = new URLSearchParams(); + Object.keys(applyAllowlistToObject(params, allowedSearchParams)).forEach((allowedKey) => { + allowedParams.set(allowedKey, params[allowedKey]); + }), eventRequest.query_string = allowedParams.toString(); + } else + delete eventRequest.query_string; + return eventRequest; + } + function testAllowlist(target, allowlist) { + return typeof allowlist == "boolean" ? allowlist : allowlist instanceof RegExp ? allowlist.test(target) : Array.isArray(allowlist) ? allowlist.map((item) => item.toLowerCase()).includes(target) : !1; + } + function applyAllowlistToObject(target, allowlist) { + let predicate = () => !1; + if (typeof allowlist == "boolean") + return allowlist ? target : {}; + if (allowlist instanceof RegExp) + predicate = (item) => allowlist.test(item); + else if (Array.isArray(allowlist)) { + let allowlistLowercased = allowlist.map((item) => item.toLowerCase()); + predicate = (item) => allowlistLowercased.includes(item.toLowerCase()); + } else + return {}; + return Object.keys(target).filter(predicate).reduce((allowed, key) => (allowed[key] = target[key], allowed), {}); + } + function parseCookie(cookieString) { + if (typeof cookieString != "string") + return {}; + try { + return cookieString.split(";").map((part) => part.split("=")).reduce((acc, [cookieKey, cookieValue]) => (acc[decodeURIComponent(cookieKey.trim())] = decodeURIComponent(cookieValue.trim()), acc), {}); + } catch { + return {}; + } + } + function setupIntegrations(integrations, sdk) { + let integrationIndex = {}; + return integrations.forEach((integration) => { + integrationIndex[integration.name] = integration, typeof integration.setupOnce == "function" && integration.setupOnce(); + let client = sdk.getClient(); + if (client) { + if (typeof integration.setup == "function" && integration.setup(client), typeof integration.preprocessEvent == "function") { + let callback = integration.preprocessEvent.bind(integration); + client.on("preprocessEvent", (event, hint) => callback(event, hint, client)); + } + if (typeof integration.processEvent == "function") { + let callback = integration.processEvent.bind(integration), processor = Object.assign((event, hint) => callback(event, hint, client), { + id: integration.name + }); + client.addEventProcessor(processor); + } + } + }), integrationIndex; + } + var ToucanClient = class extends core.ServerRuntimeClient { + /** + * Some functions need to access the scope (Toucan instance) this client is bound to, + * but calling 'getCurrentHub()' is unsafe because it uses globals. + * So we store a reference to the Hub after binding to it and provide it to methods that need it. + */ + #sdk = null; + #integrationsInitialized = !1; + /** + * Creates a new Toucan SDK instance. + * @param options Configuration options for this SDK. + */ + constructor(options) { + options._metadata = options._metadata || {}, options._metadata.sdk = options._metadata.sdk || { + name: "toucan-js", + packages: [ + { + name: "npm:toucan-js", + version: "4.0.0" + } + ], + version: "4.0.0" + }, super(options); + } + /** + * By default, integrations are stored in a global. We want to store them in a local instance because they may have contextual data, such as event request. + */ + setupIntegrations() { + this._isEnabled() && !this.#integrationsInitialized && this.#sdk && (this._integrations = setupIntegrations(this._options.integrations, this.#sdk), this.#integrationsInitialized = !0); + } + eventFromException(exception, hint) { + return utils.resolvedSyncPromise(eventFromUnknownInput(this.#sdk, this._options.stackParser, exception, hint)); + } + eventFromMessage(message, level = "info", hint) { + return utils.resolvedSyncPromise(eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace)); + } + _prepareEvent(event, hint, scope) { + return event.platform = event.platform || "javascript", this.getOptions().request && (event.sdkProcessingMetadata = setOnOptional(event.sdkProcessingMetadata, [ + "request", + this.getOptions().request + ])), this.getOptions().requestData && (event.sdkProcessingMetadata = setOnOptional(event.sdkProcessingMetadata, [ + "requestData", + this.getOptions().requestData + ])), super._prepareEvent(event, hint, scope); + } + getSdk() { + return this.#sdk; + } + setSdk(sdk) { + this.#sdk = sdk; + } + /** + * Sets the request body context on all future events. + * + * @param body Request body. + * @example + * const body = await request.text(); + * toucan.setRequestBody(body); + */ + setRequestBody(body) { + this.getOptions().requestData = body; + } + /** + * Enable/disable the SDK. + * + * @param enabled + */ + setEnabled(enabled) { + this.getOptions().enabled = enabled; + } + }; + function workersStackLineParser(getModule2) { + let [arg1, arg2] = utils.nodeStackLineParser(getModule2); + return [arg1, (line) => { + let result = arg2(line); + if (result) { + let filename = result.filename; + result.abs_path = filename !== void 0 && !filename.startsWith("/") ? `/${filename}` : filename, result.in_app = filename !== void 0; + } + return result; + }]; + } + function getModule(filename) { + if (filename) + return utils.basename(filename, ".js"); + } + var defaultStackParser = utils.createStackParser(workersStackLineParser(getModule)); + function makeFetchTransport(options) { + function makeRequest({ body }) { + try { + let request = (options.fetcher ?? fetch)(options.url, { + method: "POST", + headers: options.headers, + body + }).then((response) => ({ + statusCode: response.status, + headers: { + "retry-after": response.headers.get("Retry-After"), + "x-sentry-rate-limits": response.headers.get("X-Sentry-Rate-Limits") + } + })); + return options.context && options.context.waitUntil(request), request; + } catch (e) { + return utils.rejectedSyncPromise(e); + } + } + return core.createTransport(options, makeRequest); + } + var Toucan2 = class _Toucan extends core.Scope { + #options; + constructor(options) { + if (super(), options.defaultIntegrations = options.defaultIntegrations === !1 ? [] : [ + ...Array.isArray(options.defaultIntegrations) ? options.defaultIntegrations : [ + requestDataIntegration(options.requestDataOptions), + linkedErrorsIntegration() + ] + ], options.release === void 0) { + let detectedRelease = getSentryRelease(); + detectedRelease !== void 0 && (options.release = detectedRelease); + } + this.#options = options, this.attachNewClient(); + } + /** + * Creates new ToucanClient and links it to this instance. + */ + attachNewClient() { + let client = new ToucanClient({ + ...this.#options, + transport: makeFetchTransport, + integrations: core.getIntegrationsToSetup(this.#options), + stackParser: utils.stackParserFromStackParserOptions(this.#options.stackParser || defaultStackParser), + transportOptions: { + ...this.#options.transportOptions, + context: this.#options.context + } + }); + this.setClient(client), client.setSdk(this), client.setupIntegrations(); + } + /** + * Sets the request body context on all future events. + * + * @param body Request body. + * @example + * const body = await request.text(); + * toucan.setRequestBody(body); + */ + setRequestBody(body) { + this.getClient()?.setRequestBody(body); + } + /** + * Enable/disable the SDK. + * + * @param enabled + */ + setEnabled(enabled) { + this.getClient()?.setEnabled(enabled); + } + /** + * Create a cron monitor check in and send it to Sentry. + * + * @param checkIn An object that describes a check in. + * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want + * to create a monitor automatically when sending a check in. + */ + captureCheckIn(checkIn, monitorConfig, scope) { + return checkIn.status === "in_progress" && this.setContext("monitor", { slug: checkIn.monitorSlug }), this.getClient().captureCheckIn(checkIn, monitorConfig, scope); + } + /** + * Add a breadcrumb to the current scope. + */ + addBreadcrumb(breadcrumb, maxBreadcrumbs = 100) { + let max = this.getClient().getOptions().maxBreadcrumbs || maxBreadcrumbs; + return super.addBreadcrumb(breadcrumb, max); + } + /** + * Clone all data from this instance into a new Toucan instance. + * + * @override + * @returns New Toucan instance. + */ + clone() { + let toucan = new _Toucan({ ...this.#options }); + return toucan._breadcrumbs = [...this._breadcrumbs], toucan._tags = { ...this._tags }, toucan._extra = { ...this._extra }, toucan._contexts = { ...this._contexts }, toucan._user = this._user, toucan._level = this._level, toucan._session = this._session, toucan._transactionName = this._transactionName, toucan._fingerprint = this._fingerprint, toucan._eventProcessors = [...this._eventProcessors], toucan._requestSession = this._requestSession, toucan._attachments = [...this._attachments], toucan._sdkProcessingMetadata = { ...this._sdkProcessingMetadata }, toucan._propagationContext = { ...this._propagationContext }, toucan._lastEventId = this._lastEventId, toucan; + } + /** + * Creates a new scope with and executes the given operation within. + * The scope is automatically removed once the operation + * finishes or throws. + */ + withScope(callback) { + let toucan = this.clone(); + return callback(toucan); + } + }; + Object.defineProperty(exports, "dedupeIntegration", { + enumerable: !0, + get: function() { + return core.dedupeIntegration; + } + }); + Object.defineProperty(exports, "extraErrorDataIntegration", { + enumerable: !0, + get: function() { + return core.extraErrorDataIntegration; + } + }); + Object.defineProperty(exports, "rewriteFramesIntegration", { + enumerable: !0, + get: function() { + return core.rewriteFramesIntegration; + } + }); + Object.defineProperty(exports, "sessionTimingIntegration", { + enumerable: !0, + get: function() { + return core.sessionTimingIntegration; + } + }); + exports.Toucan = Toucan2; + exports.linkedErrorsIntegration = linkedErrorsIntegration; + exports.requestDataIntegration = requestDataIntegration; + } +}); + +// ../workers-shared/utils/performance.ts +var PerformanceTimer = class { + constructor(performanceTimer) { + this.performanceTimer = performanceTimer; + } + now() { + return this.performanceTimer ? this.performanceTimer.timeOrigin + this.performanceTimer.now() : Date.now(); + } +}; + +// ../workers-shared/utils/sentry.ts +var import_toucan_js = __toESM(require_index_cjs()); +function setupSentry(request, context, dsn, clientId, clientSecret, coloMetadata, versionMetadata, accountId, scriptId) { + if (!(dsn && clientId && clientSecret)) + return; + let sentry = new import_toucan_js.Toucan({ + dsn, + request, + context, + sampleRate: 1, + release: versionMetadata?.tag, + integrations: [ + (0, import_toucan_js.rewriteFramesIntegration)({ + iteratee(frame) { + return frame.filename = "/index.js", frame; + } + }) + ], + requestDataOptions: { + allowedHeaders: [ + "user-agent", + "cf-challenge", + "accept-encoding", + "accept-language", + "cf-ray", + "content-length", + "content-type", + "host" + ], + allowedSearchParams: /(.*)/ + }, + transportOptions: { + headers: { + "CF-Access-Client-ID": clientId, + "CF-Access-Client-Secret": clientSecret + } + } + }); + return coloMetadata && (sentry.setTag("colo", coloMetadata.coloId), sentry.setTag("metal", coloMetadata.metalId)), accountId && scriptId && (sentry.setTag("accountId", accountId), sentry.setTag("scriptId", scriptId)), sentry.setUser({ id: accountId?.toString() }), sentry; +} + +// ../workers-shared/utils/tracing.ts +function mockJaegerBindingSpan() { + return { + addLogs: () => { + }, + setTags: () => { + }, + end: () => { + }, + isRecording: !0 + }; +} +function mockJaegerBinding() { + return { + enterSpan: (_, span, ...args) => span(mockJaegerBindingSpan(), ...args), + getSpanContext: () => ({ + traceId: "test-trace", + spanId: "test-span", + parentSpanId: "test-parent-span", + traceFlags: 0 + }), + runWithSpanContext: (_, callback, ...args) => callback(...args), + traceId: "test-trace", + spanId: "test-span", + parentSpanId: "test-parent-span", + cfTraceIdHeader: "test-trace:test-span:0" + }; +} + +// ../workers-shared/router-worker/src/analytics.ts +var Analytics = class { + constructor(readyAnalytics) { + this.data = {}; + this.hasWritten = !1; + this.readyAnalytics = readyAnalytics; + } + setData(newData) { + this.data = { ...this.data, ...newData }; + } + getData(key) { + return this.data[key]; + } + write() { + this.hasWritten || this.readyAnalytics && (this.hasWritten = !0, this.readyAnalytics.logEvent({ + version: 1, + accountId: this.data.accountId, + indexId: this.data.scriptId?.toString(), + doubles: [ + this.data.requestTime ?? -1, + // double1 + this.data.coloId ?? -1, + // double2 + this.data.metalId ?? -1, + // double3 + this.data.coloTier ?? -1, + // double4 + this.data.userWorkerAhead === void 0 ? -1 : Number(this.data.userWorkerAhead) + ], + blobs: [ + this.data.hostname?.substring(0, 256), + // blob1 - trim to 256 bytes + this.data.dispatchtype, + // blob2 + this.data.error?.substring(0, 256), + // blob3 - trim to 256 bytes + this.data.version, + // blob4 + this.data.coloRegion + // blob5 + ] + })); + } +}; + +// ../workers-shared/router-worker/src/configuration.ts +var applyConfigurationDefaults = (configuration) => ({ + invoke_user_worker_ahead_of_assets: configuration?.invoke_user_worker_ahead_of_assets ?? !1, + has_user_worker: configuration?.has_user_worker ?? !1, + account_id: configuration?.account_id ?? -1, + script_id: configuration?.script_id ?? -1, + debug: configuration?.debug ?? !1 +}); + +// ../workers-shared/router-worker/src/index.ts +var src_default = { + async fetch(request, env, ctx) { + let sentry, userWorkerInvocation = !1, analytics = new Analytics(env.ANALYTICS), performance = new PerformanceTimer(env.UNSAFE_PERFORMANCE), startTimeMs = performance.now(); + try { + env.JAEGER || (env.JAEGER = mockJaegerBinding()), sentry = setupSentry( + request, + ctx, + env.SENTRY_DSN, + env.SENTRY_ACCESS_CLIENT_ID, + env.SENTRY_ACCESS_CLIENT_SECRET, + env.COLO_METADATA, + env.VERSION_METADATA, + env.CONFIG?.account_id, + env.CONFIG?.script_id + ); + let config = applyConfigurationDefaults(env.CONFIG), url = new URL(request.url); + env.COLO_METADATA && env.VERSION_METADATA && env.CONFIG && analytics.setData({ + accountId: env.CONFIG.account_id, + scriptId: env.CONFIG.script_id, + coloId: env.COLO_METADATA.coloId, + metalId: env.COLO_METADATA.metalId, + coloTier: env.COLO_METADATA.coloTier, + coloRegion: env.COLO_METADATA.coloRegion, + hostname: url.hostname, + version: env.VERSION_METADATA.tag, + userWorkerAhead: config.invoke_user_worker_ahead_of_assets + }); + let maybeSecondRequest = request.clone(); + if (config.invoke_user_worker_ahead_of_assets) { + if (!config.has_user_worker) + throw new Error( + "Fetch for user worker without having a user worker binding" + ); + return analytics.setData({ dispatchtype: "worker" /* WORKER */ }), await env.JAEGER.enterSpan("dispatch_worker", async (span) => (span.setTags({ + hasUserWorker: !0, + asset: "ignored", + dispatchType: "worker" /* WORKER */ + }), userWorkerInvocation = !0, env.USER_WORKER.fetch(maybeSecondRequest))); + } + let assetsExist = await env.ASSET_WORKER.unstable_canFetch(request); + return config.has_user_worker && !assetsExist ? (analytics.setData({ dispatchtype: "worker" /* WORKER */ }), await env.JAEGER.enterSpan("dispatch_worker", async (span) => (span.setTags({ + hasUserWorker: config.has_user_worker, + asset: assetsExist, + dispatchType: "worker" /* WORKER */ + }), userWorkerInvocation = !0, env.USER_WORKER.fetch(maybeSecondRequest)))) : (analytics.setData({ dispatchtype: "asset" /* ASSETS */ }), await env.JAEGER.enterSpan("dispatch_assets", async (span) => (span.setTags({ + hasUserWorker: config.has_user_worker, + asset: assetsExist, + dispatchType: "asset" /* ASSETS */ + }), env.ASSET_WORKER.fetch(maybeSecondRequest)))); + } catch (err) { + throw userWorkerInvocation || (err instanceof Error && analytics.setData({ error: err.message }), sentry && sentry.captureException(err)), err; + } finally { + analytics.setData({ requestTime: performance.now() - startTimeMs }), analytics.write(); + } + } +}; + +// src/workers/assets/router.worker.ts +var router_worker_default = src_default; +export { + router_worker_default as default +}; +//# sourceMappingURL=router.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/assets/router.worker.js.map b/node_modules/miniflare/dist/src/workers/assets/router.worker.js.map new file mode 100644 index 0000000..d305e2a --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/assets/router.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/is.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/string.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/aggregate-errors.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/array.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/version.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/worldwide.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/browser.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/debug-build.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/logger.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/dsn.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/error.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/object.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/stacktrace.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/instrument/handlers.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/instrument/console.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/supports.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/time.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/instrument/fetch.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/instrument/globalError.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/instrument/globalUnhandledRejection.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/env.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/node.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/isBrowser.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/memo.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/misc.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/normalize.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/path.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/syncpromise.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/promisebuffer.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/cookie.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/url.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/requestdata.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/severity.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/node-stack-trace.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/baggage.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/tracing.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/envelope.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/clientreport.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/ratelimit.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/cache.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/eventbuilder.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/anr.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/lru.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/buildPolyfills/_nullishCoalesce.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/buildPolyfills/_asyncNullishCoalesce.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/buildPolyfills/_asyncOptionalChain.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/buildPolyfills/_asyncOptionalChainDelete.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/buildPolyfills/_optionalChain.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/buildPolyfills/_optionalChainDelete.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/propagationContext.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/vendor/escapeStringForRegex.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/src/vendor/supportsHistory.ts", "../../../../../../node_modules/.pnpm/@sentry+utils@8.9.2/node_modules/@sentry/utils/cjs/index.js", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/debug-build.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/carrier.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/session.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/spanOnScope.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/scope.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/defaultScopes.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/asyncContext/stackStrategy.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/asyncContext/index.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/currentScopes.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metrics/metric-summary.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/semanticAttributes.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/spanstatus.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/spanUtils.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/errors.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/utils.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/hubextensions.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/hasTracingEnabled.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/sentryNonRecordingSpan.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/handleCallbackErrors.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/constants.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/dynamicSamplingContext.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/logSpans.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/parseSampleRate.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/sampling.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/envelope.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/measurement.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/sentrySpan.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/trace.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/tracing/idleSpan.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/eventProcessors.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/applyScopeDataToEvent.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/prepareEvent.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/exports.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/sessionflusher.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/api.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integration.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/baseclient.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/checkin.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/server-runtime-client.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/sdk.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/transports/base.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/transports/offline.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/transports/multiplexed.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/isSentryRequestUrl.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/parameterize.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/utils/sdkMetadata.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/breadcrumbs.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/functiontostring.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/inboundfilters.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/linkederrors.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metadata.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/metadata.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/requestdata.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/captureconsole.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/debug.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/dedupe.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/extraerrordata.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/rewriteframes.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/sessiontiming.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/zoderrors.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/integrations/third-party-errors-filter.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metrics/constants.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metrics/exports.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metrics/utils.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metrics/envelope.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metrics/instance.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metrics/aggregator.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metrics/exports-default.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/metrics/browser-aggregator.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/fetch.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/trpc.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/feedback.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/src/getCurrentHubShim.ts", "../../../../../../node_modules/.pnpm/@sentry+core@8.9.2/node_modules/@sentry/core/cjs/index.js", "../../../../../../node_modules/.pnpm/toucan-js@4.0.0_patch_hash=qxsfpdzvzbhq2ecirbu5xq4vlq/node_modules/toucan-js/dist/index.cjs.js", "../../../../../workers-shared/utils/performance.ts", "../../../../../workers-shared/utils/sentry.ts", "../../../../../workers-shared/utils/tracing.ts", "../../../../../workers-shared/router-worker/src/analytics.ts", "../../../../../workers-shared/router-worker/src/configuration.ts", "../../../../../workers-shared/router-worker/src/index.ts", "../../../../src/workers/assets/router.worker.ts"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,QAAM,iBAAiB,OAAO,UAAU;AASjC,aAAS,QAAQ,KAA4B;AAClD,cAAQ,eAAe,KAAK,GAAG,GAAC;QAC9B,KAAK;QACL,KAAK;QACL,KAAK;AACH,iBAAO;QACT;AACE,iBAAO,aAAa,KAAK,KAAK;MACpC;IACA;AAQA,aAAS,UAAU,KAAc,WAA4B;AAC3D,aAAO,eAAe,KAAK,GAAG,MAAM,WAAW,SAAS;IAC1D;AASO,aAAS,aAAa,KAAuB;AAClD,aAAO,UAAU,KAAK,YAAY;IACpC;AASO,aAAS,WAAW,KAAuB;AAChD,aAAO,UAAU,KAAK,UAAU;IAClC;AASO,aAAS,eAAe,KAAuB;AACpD,aAAO,UAAU,KAAK,cAAc;IACtC;AASO,aAAS,SAAS,KAA6B;AACpD,aAAO,UAAU,KAAK,QAAQ;IAChC;AASO,aAAS,sBAAsB,KAA0C;AAC9E,aACE,OAAO,OAAQ,YACf,QAAQ,QACR,gCAAgC,OAChC,gCAAgC;IAEpC;AASO,aAAS,YAAY,KAAgC;AAC1D,aAAO,QAAQ,QAAQ,sBAAsB,GAAG,KAAM,OAAO,OAAQ,YAAY,OAAO,OAAQ;IAClG;AASO,aAAS,cAAc,KAA8C;AAC1E,aAAO,UAAU,KAAK,QAAQ;IAChC;AASO,aAAS,QAAQ,KAAuC;AAC7D,aAAO,OAAO,QAAU,OAAe,aAAa,KAAK,KAAK;IAChE;AASO,aAAS,UAAU,KAAuB;AAC/C,aAAO,OAAO,UAAY,OAAe,aAAa,KAAK,OAAO;IACpE;AASO,aAAS,SAAS,KAA6B;AACpD,aAAO,UAAU,KAAK,QAAQ;I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,UAAU,mBAAmB,OAAO,UAC3D,KAAK,QAAQ;AAAA,UACZ,eAAe;AAAA,UACf,OAAO;AAAA,UACP;AAAA,QACD,CAAC,GAED,uBAAuB,IAChB,IAAI,YAAY,MAAM,kBAAkB,EAC/C;AAAA,MACF;AAGA,UAAM,cAAc,MAAM,IAAI,aAAa,kBAAkB,OAAO;AACpE,aAAI,OAAO,mBAAmB,CAAC,eAC9B,UAAU,QAAQ,EAAE,oCAAmC,CAAC,GAEjD,MAAM,IAAI,OAAO,UAAU,mBAAmB,OAAO,UAC3D,KAAK,QAAQ;AAAA,QACZ,eAAe,OAAO;AAAA,QACtB,OAAO;AAAA,QACP;AAAA,MACD,CAAC,GAED,uBAAuB,IAChB,IAAI,YAAY,MAAM,kBAAkB,EAC/C,MAIF,UAAU,QAAQ,EAAE,mCAAmC,CAAC,GACjD,MAAM,IAAI,OAAO,UAAU,mBAAmB,OAAO,UAC3D,KAAK,QAAQ;AAAA,QACZ,eAAe,OAAO;AAAA,QACtB,OAAO;AAAA,QACP;AAAA,MACD,CAAC,GAEM,IAAI,aAAa,MAAM,kBAAkB,EAChD;AAAA,IACF,SAAS,KAAK;AACb,YAAI,yBAIO,eAAe,SACzB,UAAU,QAAQ,EAAE,OAAO,IAAI,QAAQ,CAAC,GAIrC,UACH,OAAO,iBAAiB,GAAG,IAEtB;AAAA,IACP,UAAE;AACD,gBAAU,QAAQ,EAAE,aAAa,YAAY,IAAI,IAAI,YAAY,CAAC,GAClE,UAAU,MAAM;AAAA,IACjB;AAAA,EACD;AACD;;;AC9IA,IAAO,wBAAQ;", + "names": ["isVueViewModel", "isString", "isRegExp", "isInstanceOf", "truncate", "input", "SDK_VERSION", "GLOBAL_OBJ", "isString", "GLOBAL_OBJ", "console", "logger", "DEBUG_BUILD", "consoleSandbox", "DEBUG_BUILD", "logger", "DEBUG_BUILD", "logger", "isError", "isEvent", "isInstanceOf", "isElement", "htmlTreeAsString", "truncate", "isPlainObject", "isPrimitive", "DEBUG_BUILD", "logger", "getFunctionName", "addHandler", "maybeInstrument", "GLOBAL_OBJ", "CONSOLE_LEVELS", "fill", "originalConsoleMethods", "triggerHandlers", "GLOBAL_OBJ", "DEBUG_BUILD", "logger", "GLOBAL_OBJ", "_browserPerformanceTimeOriginMode", "addHandler", "maybeInstrument", "supportsNativeFetch", "fill", "GLOBAL_OBJ", "timestampInSeconds", "triggerHandlers", "isError", "addNonEnumerableProperty", "addHandler", "maybeInstrument", "GLOBAL_OBJ", "triggerHandlers", "addHandler", "maybeInstrument", "GLOBAL_OBJ", "triggerHandlers", "isBrowserBundle", "isNodeEnv", "GLOBAL_OBJ", "GLOBAL_OBJ", "snipLine", "addNonEnumerableProperty", "object", "memo", "memoBuilder", "convertToPlainObject", "isVueViewModel", "isSyntheticEvent", "getFunctionName", "States", "isThenable", "rejectedSyncPromise", "SentryError", "SyncPromise", "resolvedSyncPromise", "stripUrlQueryAndFragment", "parseCookie", "isString", "normalize", "isPlainObject", "DEBUG_BUILD", "logger", "UNKNOWN_FUNCTION", "isString", "DEBUG_BUILD", "logger", "baggage", "baggageHeaderToDynamicSamplingContext", "uuid4", "GLOBAL_OBJ", "normalize", "dropUndefinedKeys", "dsn", "dsnToString", "dateTimestampInSeconds", "createEnvelope", "extractExceptionKeysForMessage", "isErrorEvent", "isError", "isPlainObject", "normalizeToSize", "ex", "addExceptionTypeValue", "addExceptionMechanism", "isParameterizedString", "dropUndefinedKeys", "UNKNOWN_FUNCTION", "filenameIsInApp", "_nullishCoalesce", "_asyncOptionalChain", "_optionalChain", "uuid4", "GLOBAL_OBJ", "console", "fetch", "GLOBAL_OBJ", "SDK_VERSION", "timestampInSeconds", "uuid4", "dropUndefinedKeys", "addNonEnumerableProperty", "generatePropagationContext", "_setSpanForScope", "_getSpanForScope", "updateSession", "session", "isPlainObject", "dateTimestampInSeconds", "uuid4", "logger", "getGlobalSingleton", "ScopeClass", "scope", "Scope", "isThenable", "getMainCarrier", "getSentryCarrier", "getDefaultCurrentScope", "getDefaultIsolationScope", "getMainCarrier", "getSentryCarrier", "carrier", "getStackAsyncContextStrategy", "carrier", "getMainCarrier", "getAsyncContextStrategy", "getGlobalSingleton", "ScopeClass", "scope", "dropUndefinedKeys", "dropUndefinedKeys", "generateSentryTraceHeader", "timestampInSeconds", "SEMANTIC_ATTRIBUTE_SENTRY_OP", "SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN", "getMetricSummaryJsonForSpan", "SPAN_STATUS_UNSET", "SPAN_STATUS_OK", "addNonEnumerableProperty", "span", "carrier", "getMainCarrier", "getAsyncContextStrategy", "_getSpanForScope", "getCurrentScope", "updateMetricSummaryOnSpan", "addGlobalErrorInstrumentationHandler", "addGlobalUnhandledRejectionInstrumentationHandler", "getActiveSpan", "getRootSpan", "DEBUG_BUILD", "logger", "SPAN_STATUS_ERROR", "addNonEnumerableProperty", "registerSpanErrorInstrumentation", "getClient", "uuid4", "TRACE_FLAG_NONE", "isThenable", "addNonEnumerableProperty", "dropUndefinedKeys", "DEFAULT_ENVIRONMENT", "getClient", "spanToJSON", "getRootSpan", "SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE", "SEMANTIC_ATTRIBUTE_SENTRY_SOURCE", "spanIsSampled", "dynamicSamplingContextToSentryBaggageHeader", "DEBUG_BUILD", "spanToJSON", "spanIsSampled", "getRootSpan", "op", "description", "logger", "DEBUG_BUILD", "logger", "hasTracingEnabled", "parseSampleRate", "DEBUG_BUILD", "logger", "getSdkMetadataForEnvelopeHeader", "dsnToString", "createEnvelope", "createEventEnvelopeHeaders", "dsc", "getDynamicSamplingContextFromSpan", "spanToJSON", "createSpanEnvelopeItem", "getActiveSpan", "getRootSpan", "SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE", "SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT", "uuid4", "timestampInSeconds", "SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN", "SEMANTIC_ATTRIBUTE_SENTRY_OP", "TRACE_FLAG_SAMPLED", "TRACE_FLAG_NONE", "spanTimeInputToSeconds", "logSpanEnd", "dropUndefinedKeys", "getStatusMessage", "getMetricSummaryJsonForSpan", "SEMANTIC_ATTRIBUTE_PROFILE_ID", "SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME", "timedEventsToMeasurements", "getRootSpan", "DEBUG_BUILD", "logger", "getClient", "createSpanEnvelope", "getCapturedScopesOnSpan", "getCurrentScope", "spanToJSON", "getSpanDescendants", "SEMANTIC_ATTRIBUTE_SENTRY_SOURCE", "spanToTransactionTraceContext", "getDynamicSamplingContextFromSpan", "envelope", "withScope", "SentryNonRecordingSpan", "_setSpanForScope", "handleCallbackErrors", "spanToJSON", "SPAN_STATUS_ERROR", "getCurrentScope", "propagationContextFromHeaders", "generatePropagationContext", "DEBUG_BUILD", "logger", "hasTracingEnabled", "getIsolationScope", "addChildSpanToSpan", "getDynamicSamplingContextFromSpan", "spanIsSampled", "freezeDscOnSpan", "logSpanStart", "setCapturedScopesOnSpan", "spanTimeInputToSeconds", "carrier", "getMainCarrier", "getAsyncContextStrategy", "getClient", "sampleSpan", "SentrySpan", "SEMANTIC_ATTRIBUTE_SENTRY_SOURCE", "SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE", "_getSpanForScope", "getRootSpan", "getClient", "hasTracingEnabled", "SentryNonRecordingSpan", "getCurrentScope", "getActiveSpan", "timestampInSeconds", "spanTimeInputToSeconds", "getSpanDescendants", "span", "spanToJSON", "timestamp", "_setSpanForScope", "SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON", "logger", "SPAN_STATUS_ERROR", "DEBUG_BUILD", "removeChildSpanFromSpan", "startInactiveSpan", "SyncPromise", "DEBUG_BUILD", "logger", "isThenable", "dropUndefinedKeys", "spanToTraceContext", "getDynamicSamplingContextFromSpan", "getRootSpan", "spanToJSON", "arrayify", "scope", "uuid4", "dateTimestampInSeconds", "addExceptionMechanism", "getGlobalScope", "mergeScopeData", "applyScopeDataToEvent", "eventProcessors", "notifyEventProcessors", "DEFAULT_ENVIRONMENT", "truncate", "GLOBAL_OBJ", "normalize", "Scope", "getCurrentScope", "parseEventHintOrCaptureContext", "getIsolationScope", "getClient", "DEBUG_BUILD", "logger", "uuid4", "timestampInSeconds", "withIsolationScope", "isThenable", "DEFAULT_ENVIRONMENT", "GLOBAL_OBJ", "session", "makeSession", "updateSession", "closeSession", "dropUndefinedKeys", "getIsolationScope", "urlEncode", "makeDsn", "dsnToString", "arrayify", "DEBUG_BUILD", "logger", "getClient", "makeDsn", "DEBUG_BUILD", "logger", "getEnvelopeEndpointWithUrlEncodedAuth", "uuid4", "checkOrSetAlreadyCaught", "isParameterizedString", "isPrimitive", "session", "updateSession", "resolvedSyncPromise", "integration", "setupIntegration", "afterSetupIntegrations", "createEventEnvelope", "addItemToEnvelope", "createAttachmentEnvelopeItem", "createSessionEnvelope", "envelope", "setupIntegrations", "SyncPromise", "getIsolationScope", "prepareEvent", "dropUndefinedKeys", "dynamicSamplingContext", "getDynamicSamplingContextFromClient", "parseSampleRate", "rejectedSyncPromise", "SentryError", "isThenable", "isPlainObject", "dsnToString", "dropUndefinedKeys", "createEnvelope", "BaseClient", "registerSpanErrorInstrumentation", "resolvedSyncPromise", "eventFromUnknownInput", "eventFromMessage", "getIsolationScope", "SessionFlusher", "DEBUG_BUILD", "logger", "uuid4", "dynamicSamplingContext", "createCheckInEnvelope", "_getSpanForScope", "getRootSpan", "getDynamicSamplingContextFromSpan", "spanToTraceContext", "getDynamicSamplingContextFromClient", "DEBUG_BUILD", "logger", "consoleSandbox", "getCurrentScope", "makePromiseBuffer", "forEachEnvelopeItem", "envelopeItemTypeToDataCategory", "isRateLimited", "resolvedSyncPromise", "createEnvelope", "serializeEnvelope", "DEBUG_BUILD", "logger", "updateRateLimits", "SentryError", "DEBUG_BUILD", "logger", "retryDelay", "envelopeContainsItemType", "parseRetryAfterHeader", "forEachEnvelopeItem", "createEnvelope", "dsnFromString", "getEnvelopeEndpointWithUrlEncodedAuth", "name", "SDK_VERSION", "getClient", "getIsolationScope", "dateTimestampInSeconds", "consoleSandbox", "getOriginalFunction", "getClient", "defineIntegration", "defineIntegration", "DEBUG_BUILD", "logger", "getEventDescription", "stringMatchesSomePattern", "options", "applyAggregateErrorsToEvent", "exceptionFromError", "defineIntegration", "GLOBAL_OBJ", "forEachEnvelopeItem", "stripMetadataFromStackFrames", "addMetadataToStackFrames", "defineIntegration", "addRequestDataToEvent", "defineIntegration", "CONSOLE_LEVELS", "GLOBAL_OBJ", "addConsoleInstrumentationHandler", "getClient", "defineIntegration", "severityLevelFromString", "withScope", "addExceptionMechanism", "message", "safeJoin", "captureMessage", "captureException", "consoleSandbox", "defineIntegration", "DEBUG_BUILD", "logger", "defineIntegration", "getFramesFromEvent", "defineIntegration", "isError", "normalize", "isPlainObject", "addNonEnumerableProperty", "DEBUG_BUILD", "logger", "rewriteFramesIntegration", "defineIntegration", "GLOBAL_OBJ", "relative", "basename", "timestampInSeconds", "defineIntegration", "isError", "truncate", "defineIntegration", "defineIntegration", "forEachEnvelopeItem", "stripMetadataFromStackFrames", "addMetadataToStackFrames", "getFramesFromEvent", "getGlobalSingleton", "getClient", "getActiveSpan", "getRootSpan", "spanToJSON", "DEBUG_BUILD", "logger", "COUNTER_METRIC_TYPE", "DISTRIBUTION_METRIC_TYPE", "timestampInSeconds", "startSpanManual", "handleCallbackErrors", "SET_METRIC_TYPE", "GAUGE_METRIC_TYPE", "dropUndefinedKeys", "logger", "dsnToString", "createEnvelope", "serializeMetricBuckets", "simpleHash", "COUNTER_METRIC_TYPE", "GAUGE_METRIC_TYPE", "DISTRIBUTION_METRIC_TYPE", "SET_METRIC_TYPE", "DEFAULT_FLUSH_INTERVAL", "timestampInSeconds", "sanitizeMetricKey", "sanitizeTags", "sanitizeUnit", "getBucketKey", "SET_METRIC_TYPE", "METRIC_MAP", "updateMetricSummaryOnActiveSpan", "MAX_WEIGHT", "captureAggregateMetrics", "metricsCore", "MetricsAggregator", "DEFAULT_BROWSER_FLUSH_INTERVAL", "timestampInSeconds", "sanitizeMetricKey", "sanitizeTags", "sanitizeUnit", "getBucketKey", "SET_METRIC_TYPE", "METRIC_MAP", "updateMetricSummaryOnActiveSpan", "captureAggregateMetrics", "hasTracingEnabled", "span", "getCurrentScope", "getClient", "parseUrl", "getActiveSpan", "startInactiveSpan", "SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN", "SEMANTIC_ATTRIBUTE_SENTRY_OP", "SentryNonRecordingSpan", "getIsolationScope", "spanToTraceHeader", "generateSentryTraceHeader", "dynamicSamplingContextToSentryBaggageHeader", "getDynamicSamplingContextFromSpan", "getDynamicSamplingContextFromClient", "isInstanceOf", "BAGGAGE_HEADER_NAME", "setHttpStatus", "SPAN_STATUS_ERROR", "getClient", "normalize", "setContext", "captureException", "startSpanManual", "SEMANTIC_ATTRIBUTE_SENTRY_SOURCE", "SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN", "isThenable", "getCurrentScope", "dropUndefinedKeys", "getClient", "getCurrentScope", "withScope", "getClient", "getIsolationScope", "captureEvent", "addBreadcrumb", "setUser", "setTags", "setTag", "setExtra", "setExtras", "setContext", "startSession", "endSession", "require_cjs", "fetch", "getModule", "Toucan"] +} diff --git a/node_modules/miniflare/dist/src/workers/assets/rpc-proxy.worker.js b/node_modules/miniflare/dist/src/workers/assets/rpc-proxy.worker.js new file mode 100644 index 0000000..37cbc0d --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/assets/rpc-proxy.worker.js @@ -0,0 +1,18 @@ +// src/workers/assets/rpc-proxy.worker.ts +import { WorkerEntrypoint } from "cloudflare:workers"; +var RPCProxyWorker = class extends WorkerEntrypoint { + async fetch(request) { + return this.env.ROUTER_WORKER.fetch(request); + } + constructor(ctx, env) { + return super(ctx, env), new Proxy(this, { + get(target, prop) { + return Reflect.has(target, prop) ? Reflect.get(target, prop) : Reflect.get(target.env.USER_WORKER, prop); + } + }); + } +}; +export { + RPCProxyWorker as default +}; +//# sourceMappingURL=rpc-proxy.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/assets/rpc-proxy.worker.js.map b/node_modules/miniflare/dist/src/workers/assets/rpc-proxy.worker.js.map new file mode 100644 index 0000000..9e56f92 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/assets/rpc-proxy.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../src/workers/assets/rpc-proxy.worker.ts"], + "mappings": ";AAAA,SAAS,wBAAwB;AAmBjC,IAAqB,iBAArB,cAA4C,iBAAsB;AAAA,EACjE,MAAM,MAAM,SAAkB;AAC7B,WAAO,KAAK,IAAI,cAAc,MAAM,OAAO;AAAA,EAC5C;AAAA,EAEA,YAAY,KAAuB,KAAU;AAC5C,iBAAM,KAAK,GAAG,GAOP,IAAI,MAAM,MAAM;AAAA,MACtB,IAAI,QAAQ,MAAM;AAOjB,eAAI,QAAQ,IAAI,QAAQ,IAAI,IACpB,QAAQ,IAAI,QAAQ,IAAI,IAMzB,QAAQ,IAAI,OAAO,IAAI,aAAa,IAAI;AAAA,MAChD;AAAA,IACD,CAAC;AAAA,EACF;AACD;", + "names": [] +} diff --git a/node_modules/miniflare/dist/src/workers/cache/cache-entry-noop.worker.js b/node_modules/miniflare/dist/src/workers/cache/cache-entry-noop.worker.js new file mode 100644 index 0000000..63b0686 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/cache/cache-entry-noop.worker.js @@ -0,0 +1,19 @@ +// src/workers/cache/constants.ts +var CacheHeaders = { + NAMESPACE: "cf-cache-namespace", + STATUS: "cf-cache-status" +}; + +// src/workers/cache/cache-entry-noop.worker.ts +var cache_entry_noop_worker_default = { + async fetch(request) { + return request.method === "GET" ? new Response(null, { + status: 504, + headers: { [CacheHeaders.STATUS]: "MISS" } + }) : request.method === "PUT" ? (await request.body?.pipeTo(new WritableStream()), new Response(null, { status: 204 })) : request.method === "PURGE" ? new Response(null, { status: 404 }) : new Response(null, { status: 405 }); + } +}; +export { + cache_entry_noop_worker_default as default +}; +//# sourceMappingURL=cache-entry-noop.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/cache/cache-entry-noop.worker.js.map b/node_modules/miniflare/dist/src/workers/cache/cache-entry-noop.worker.js.map new file mode 100644 index 0000000..27d36f9 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/cache/cache-entry-noop.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../src/workers/cache/constants.ts", "../../../../src/workers/cache/cache-entry-noop.worker.ts"], + "mappings": ";AAAO,IAAM,eAAe;AAAA,EAC3B,WAAW;AAAA,EACX,QAAQ;AACT;;;ACDA,IAAO,kCAAyB;AAAA,EAC/B,MAAM,MAAM,SAAS;AACpB,WAAI,QAAQ,WAAW,QACf,IAAI,SAAS,MAAM;AAAA,MACzB,QAAQ;AAAA,MACR,SAAS,EAAE,CAAC,aAAa,MAAM,GAAG,OAAO;AAAA,IAC1C,CAAC,IACS,QAAQ,WAAW,SAE7B,MAAM,QAAQ,MAAM,OAAO,IAAI,eAAe,CAAC,GACxC,IAAI,SAAS,MAAM,EAAE,QAAQ,IAAI,CAAC,KAC/B,QAAQ,WAAW,UACtB,IAAI,SAAS,MAAM,EAAE,QAAQ,IAAI,CAAC,IAElC,IAAI,SAAS,MAAM,EAAE,QAAQ,IAAI,CAAC;AAAA,EAE3C;AACD;", + "names": [] +} diff --git a/node_modules/miniflare/dist/src/workers/cache/cache-entry.worker.js b/node_modules/miniflare/dist/src/workers/cache/cache-entry.worker.js new file mode 100644 index 0000000..de45782 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/cache/cache-entry.worker.js @@ -0,0 +1,28 @@ +// src/workers/cache/cache-entry.worker.ts +import { SharedBindings } from "miniflare:shared"; + +// src/workers/cache/constants.ts +var CacheHeaders = { + NAMESPACE: "cf-cache-namespace", + STATUS: "cf-cache-status" +}, CacheBindings = { + MAYBE_JSON_CACHE_WARN_USAGE: "MINIFLARE_CACHE_WARN_USAGE" +}; + +// src/workers/cache/cache-entry.worker.ts +var cache_entry_worker_default = { + async fetch(request, env) { + let namespace = request.headers.get(CacheHeaders.NAMESPACE), name = namespace === null ? "default" : `named:${namespace}`, objectNamespace = env[SharedBindings.DURABLE_OBJECT_NAMESPACE_OBJECT], id = objectNamespace.idFromName(name), stub = objectNamespace.get(id), cf = { + ...request.cf, + miniflare: { + name, + cacheWarnUsage: env[CacheBindings.MAYBE_JSON_CACHE_WARN_USAGE] + } + }; + return await stub.fetch(request, { cf }); + } +}; +export { + cache_entry_worker_default as default +}; +//# sourceMappingURL=cache-entry.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/cache/cache-entry.worker.js.map b/node_modules/miniflare/dist/src/workers/cache/cache-entry.worker.js.map new file mode 100644 index 0000000..3af10b2 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/cache/cache-entry.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../src/workers/cache/cache-entry.worker.ts", "../../../../src/workers/cache/constants.ts"], + "mappings": ";AAAA,SAAmC,sBAAsB;;;ACAlD,IAAM,eAAe;AAAA,EAC3B,WAAW;AAAA,EACX,QAAQ;AACT,GAEa,gBAAgB;AAAA,EAC5B,6BAA6B;AAC9B;;;ADCA,IAAO,6BAA8B;AAAA,EACpC,MAAM,MAAM,SAAS,KAAK;AACzB,QAAM,YAAY,QAAQ,QAAQ,IAAI,aAAa,SAAS,GACtD,OAAO,cAAc,OAAO,YAAY,SAAS,SAAS,IAE1D,kBAAkB,IAAI,eAAe,+BAA+B,GACpE,KAAK,gBAAgB,WAAW,IAAI,GACpC,OAAO,gBAAgB,IAAI,EAAE,GAC7B,KAA+C;AAAA,MACpD,GAAG,QAAQ;AAAA,MACX,WAAW;AAAA,QACV;AAAA,QACA,gBAAgB,IAAI,cAAc,2BAA2B;AAAA,MAC9D;AAAA,IACD;AACA,WAAO,MAAM,KAAK,MAAM,SAAS,EAAE,GAAkC,CAAC;AAAA,EACvE;AACD;", + "names": [] +} diff --git a/node_modules/miniflare/dist/src/workers/cache/cache.worker.js b/node_modules/miniflare/dist/src/workers/cache/cache.worker.js new file mode 100644 index 0000000..3ecf13f --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/cache/cache.worker.js @@ -0,0 +1,645 @@ +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty; +var __commonJS = (cb, mod) => function() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from == "object" || typeof from == "function") + for (let key of __getOwnPropNames(from)) + !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target, + mod +)); +var __decorateClass = (decorators, target, key, kind) => { + for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--) + (decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result); + return kind && result && __defProp(target, key, result), result; +}; + +// ../../node_modules/.pnpm/http-cache-semantics@4.1.1/node_modules/http-cache-semantics/index.js +var require_http_cache_semantics = __commonJS({ + "../../node_modules/.pnpm/http-cache-semantics@4.1.1/node_modules/http-cache-semantics/index.js"(exports, module) { + "use strict"; + var statusCodeCacheableByDefault = /* @__PURE__ */ new Set([ + 200, + 203, + 204, + 206, + 300, + 301, + 308, + 404, + 405, + 410, + 414, + 501 + ]), understoodStatuses = /* @__PURE__ */ new Set([ + 200, + 203, + 204, + 300, + 301, + 302, + 303, + 307, + 308, + 404, + 405, + 410, + 414, + 501 + ]), errorStatusCodes = /* @__PURE__ */ new Set([ + 500, + 502, + 503, + 504 + ]), hopByHopHeaders = { + date: !0, + // included, because we add Age update Date + connection: !0, + "keep-alive": !0, + "proxy-authenticate": !0, + "proxy-authorization": !0, + te: !0, + trailer: !0, + "transfer-encoding": !0, + upgrade: !0 + }, excludedFromRevalidationUpdate = { + // Since the old body is reused, it doesn't make sense to change properties of the body + "content-length": !0, + "content-encoding": !0, + "transfer-encoding": !0, + "content-range": !0 + }; + function toNumberOrZero(s) { + let n = parseInt(s, 10); + return isFinite(n) ? n : 0; + } + function isErrorResponse(response) { + return response ? errorStatusCodes.has(response.status) : !0; + } + function parseCacheControl(header) { + let cc = {}; + if (!header) return cc; + let parts = header.trim().split(/,/); + for (let part of parts) { + let [k, v] = part.split(/=/, 2); + cc[k.trim()] = v === void 0 ? !0 : v.trim().replace(/^"|"$/g, ""); + } + return cc; + } + function formatCacheControl(cc) { + let parts = []; + for (let k in cc) { + let v = cc[k]; + parts.push(v === !0 ? k : k + "=" + v); + } + if (parts.length) + return parts.join(", "); + } + module.exports = class { + constructor(req, res, { + shared, + cacheHeuristic, + immutableMinTimeToLive, + ignoreCargoCult, + _fromObject + } = {}) { + if (_fromObject) { + this._fromObject(_fromObject); + return; + } + if (!res || !res.headers) + throw Error("Response headers missing"); + this._assertRequestHasHeaders(req), this._responseTime = this.now(), this._isShared = shared !== !1, this._cacheHeuristic = cacheHeuristic !== void 0 ? cacheHeuristic : 0.1, this._immutableMinTtl = immutableMinTimeToLive !== void 0 ? immutableMinTimeToLive : 24 * 3600 * 1e3, this._status = "status" in res ? res.status : 200, this._resHeaders = res.headers, this._rescc = parseCacheControl(res.headers["cache-control"]), this._method = "method" in req ? req.method : "GET", this._url = req.url, this._host = req.headers.host, this._noAuthorization = !req.headers.authorization, this._reqHeaders = res.headers.vary ? req.headers : null, this._reqcc = parseCacheControl(req.headers["cache-control"]), ignoreCargoCult && "pre-check" in this._rescc && "post-check" in this._rescc && (delete this._rescc["pre-check"], delete this._rescc["post-check"], delete this._rescc["no-cache"], delete this._rescc["no-store"], delete this._rescc["must-revalidate"], this._resHeaders = Object.assign({}, this._resHeaders, { + "cache-control": formatCacheControl(this._rescc) + }), delete this._resHeaders.expires, delete this._resHeaders.pragma), res.headers["cache-control"] == null && /no-cache/.test(res.headers.pragma) && (this._rescc["no-cache"] = !0); + } + now() { + return Date.now(); + } + storable() { + return !!(!this._reqcc["no-store"] && // A cache MUST NOT store a response to any request, unless: + // The request method is understood by the cache and defined as being cacheable, and + (this._method === "GET" || this._method === "HEAD" || this._method === "POST" && this._hasExplicitExpiration()) && // the response status code is understood by the cache, and + understoodStatuses.has(this._status) && // the "no-store" cache directive does not appear in request or response header fields, and + !this._rescc["no-store"] && // the "private" response directive does not appear in the response, if the cache is shared, and + (!this._isShared || !this._rescc.private) && // the Authorization header field does not appear in the request, if the cache is shared, + (!this._isShared || this._noAuthorization || this._allowsStoringAuthenticated()) && // the response either: + // contains an Expires header field, or + (this._resHeaders.expires || // contains a max-age response directive, or + // contains a s-maxage response directive and the cache is shared, or + // contains a public response directive. + this._rescc["max-age"] || this._isShared && this._rescc["s-maxage"] || this._rescc.public || // has a status code that is defined as cacheable by default + statusCodeCacheableByDefault.has(this._status))); + } + _hasExplicitExpiration() { + return this._isShared && this._rescc["s-maxage"] || this._rescc["max-age"] || this._resHeaders.expires; + } + _assertRequestHasHeaders(req) { + if (!req || !req.headers) + throw Error("Request headers missing"); + } + satisfiesWithoutRevalidation(req) { + this._assertRequestHasHeaders(req); + let requestCC = parseCacheControl(req.headers["cache-control"]); + return requestCC["no-cache"] || /no-cache/.test(req.headers.pragma) || requestCC["max-age"] && this.age() > requestCC["max-age"] || requestCC["min-fresh"] && this.timeToLive() < 1e3 * requestCC["min-fresh"] || this.stale() && !(requestCC["max-stale"] && !this._rescc["must-revalidate"] && (requestCC["max-stale"] === !0 || requestCC["max-stale"] > this.age() - this.maxAge())) ? !1 : this._requestMatches(req, !1); + } + _requestMatches(req, allowHeadMethod) { + return (!this._url || this._url === req.url) && this._host === req.headers.host && // the request method associated with the stored response allows it to be used for the presented request, and + (!req.method || this._method === req.method || allowHeadMethod && req.method === "HEAD") && // selecting header fields nominated by the stored response (if any) match those presented, and + this._varyMatches(req); + } + _allowsStoringAuthenticated() { + return this._rescc["must-revalidate"] || this._rescc.public || this._rescc["s-maxage"]; + } + _varyMatches(req) { + if (!this._resHeaders.vary) + return !0; + if (this._resHeaders.vary === "*") + return !1; + let fields = this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/); + for (let name of fields) + if (req.headers[name] !== this._reqHeaders[name]) return !1; + return !0; + } + _copyWithoutHopByHopHeaders(inHeaders) { + let headers = {}; + for (let name in inHeaders) + hopByHopHeaders[name] || (headers[name] = inHeaders[name]); + if (inHeaders.connection) { + let tokens = inHeaders.connection.trim().split(/\s*,\s*/); + for (let name of tokens) + delete headers[name]; + } + if (headers.warning) { + let warnings = headers.warning.split(/,/).filter((warning) => !/^\s*1[0-9][0-9]/.test(warning)); + warnings.length ? headers.warning = warnings.join(",").trim() : delete headers.warning; + } + return headers; + } + responseHeaders() { + let headers = this._copyWithoutHopByHopHeaders(this._resHeaders), age = this.age(); + return age > 3600 * 24 && !this._hasExplicitExpiration() && this.maxAge() > 3600 * 24 && (headers.warning = (headers.warning ? `${headers.warning}, ` : "") + '113 - "rfc7234 5.5.4"'), headers.age = `${Math.round(age)}`, headers.date = new Date(this.now()).toUTCString(), headers; + } + /** + * Value of the Date response header or current time if Date was invalid + * @return timestamp + */ + date() { + let serverDate = Date.parse(this._resHeaders.date); + return isFinite(serverDate) ? serverDate : this._responseTime; + } + /** + * Value of the Age header, in seconds, updated for the current time. + * May be fractional. + * + * @return Number + */ + age() { + let age = this._ageValue(), residentTime = (this.now() - this._responseTime) / 1e3; + return age + residentTime; + } + _ageValue() { + return toNumberOrZero(this._resHeaders.age); + } + /** + * Value of applicable max-age (or heuristic equivalent) in seconds. This counts since response's `Date`. + * + * For an up-to-date value, see `timeToLive()`. + * + * @return Number + */ + maxAge() { + if (!this.storable() || this._rescc["no-cache"] || this._isShared && this._resHeaders["set-cookie"] && !this._rescc.public && !this._rescc.immutable || this._resHeaders.vary === "*") + return 0; + if (this._isShared) { + if (this._rescc["proxy-revalidate"]) + return 0; + if (this._rescc["s-maxage"]) + return toNumberOrZero(this._rescc["s-maxage"]); + } + if (this._rescc["max-age"]) + return toNumberOrZero(this._rescc["max-age"]); + let defaultMinTtl = this._rescc.immutable ? this._immutableMinTtl : 0, serverDate = this.date(); + if (this._resHeaders.expires) { + let expires = Date.parse(this._resHeaders.expires); + return Number.isNaN(expires) || expires < serverDate ? 0 : Math.max(defaultMinTtl, (expires - serverDate) / 1e3); + } + if (this._resHeaders["last-modified"]) { + let lastModified = Date.parse(this._resHeaders["last-modified"]); + if (isFinite(lastModified) && serverDate > lastModified) + return Math.max( + defaultMinTtl, + (serverDate - lastModified) / 1e3 * this._cacheHeuristic + ); + } + return defaultMinTtl; + } + timeToLive() { + let age = this.maxAge() - this.age(), staleIfErrorAge = age + toNumberOrZero(this._rescc["stale-if-error"]), staleWhileRevalidateAge = age + toNumberOrZero(this._rescc["stale-while-revalidate"]); + return Math.max(0, age, staleIfErrorAge, staleWhileRevalidateAge) * 1e3; + } + stale() { + return this.maxAge() <= this.age(); + } + _useStaleIfError() { + return this.maxAge() + toNumberOrZero(this._rescc["stale-if-error"]) > this.age(); + } + useStaleWhileRevalidate() { + return this.maxAge() + toNumberOrZero(this._rescc["stale-while-revalidate"]) > this.age(); + } + static fromObject(obj) { + return new this(void 0, void 0, { _fromObject: obj }); + } + _fromObject(obj) { + if (this._responseTime) throw Error("Reinitialized"); + if (!obj || obj.v !== 1) throw Error("Invalid serialization"); + this._responseTime = obj.t, this._isShared = obj.sh, this._cacheHeuristic = obj.ch, this._immutableMinTtl = obj.imm !== void 0 ? obj.imm : 24 * 3600 * 1e3, this._status = obj.st, this._resHeaders = obj.resh, this._rescc = obj.rescc, this._method = obj.m, this._url = obj.u, this._host = obj.h, this._noAuthorization = obj.a, this._reqHeaders = obj.reqh, this._reqcc = obj.reqcc; + } + toObject() { + return { + v: 1, + t: this._responseTime, + sh: this._isShared, + ch: this._cacheHeuristic, + imm: this._immutableMinTtl, + st: this._status, + resh: this._resHeaders, + rescc: this._rescc, + m: this._method, + u: this._url, + h: this._host, + a: this._noAuthorization, + reqh: this._reqHeaders, + reqcc: this._reqcc + }; + } + /** + * Headers for sending to the origin server to revalidate stale response. + * Allows server to return 304 to allow reuse of the previous response. + * + * Hop by hop headers are always stripped. + * Revalidation headers may be added or removed, depending on request. + */ + revalidationHeaders(incomingReq) { + this._assertRequestHasHeaders(incomingReq); + let headers = this._copyWithoutHopByHopHeaders(incomingReq.headers); + if (delete headers["if-range"], !this._requestMatches(incomingReq, !0) || !this.storable()) + return delete headers["if-none-match"], delete headers["if-modified-since"], headers; + if (this._resHeaders.etag && (headers["if-none-match"] = headers["if-none-match"] ? `${headers["if-none-match"]}, ${this._resHeaders.etag}` : this._resHeaders.etag), headers["accept-ranges"] || headers["if-match"] || headers["if-unmodified-since"] || this._method && this._method != "GET") { + if (delete headers["if-modified-since"], headers["if-none-match"]) { + let etags = headers["if-none-match"].split(/,/).filter((etag) => !/^\s*W\//.test(etag)); + etags.length ? headers["if-none-match"] = etags.join(",").trim() : delete headers["if-none-match"]; + } + } else this._resHeaders["last-modified"] && !headers["if-modified-since"] && (headers["if-modified-since"] = this._resHeaders["last-modified"]); + return headers; + } + /** + * Creates new CachePolicy with information combined from the previews response, + * and the new revalidation response. + * + * Returns {policy, modified} where modified is a boolean indicating + * whether the response body has been modified, and old cached body can't be used. + * + * @return {Object} {policy: CachePolicy, modified: Boolean} + */ + revalidatedPolicy(request, response) { + if (this._assertRequestHasHeaders(request), this._useStaleIfError() && isErrorResponse(response)) + return { + modified: !1, + matches: !1, + policy: this + }; + if (!response || !response.headers) + throw Error("Response headers missing"); + let matches = !1; + if (response.status !== void 0 && response.status != 304 ? matches = !1 : response.headers.etag && !/^\s*W\//.test(response.headers.etag) ? matches = this._resHeaders.etag && this._resHeaders.etag.replace(/^\s*W\//, "") === response.headers.etag : this._resHeaders.etag && response.headers.etag ? matches = this._resHeaders.etag.replace(/^\s*W\//, "") === response.headers.etag.replace(/^\s*W\//, "") : this._resHeaders["last-modified"] ? matches = this._resHeaders["last-modified"] === response.headers["last-modified"] : !this._resHeaders.etag && !this._resHeaders["last-modified"] && !response.headers.etag && !response.headers["last-modified"] && (matches = !0), !matches) + return { + policy: new this.constructor(request, response), + // Client receiving 304 without body, even if it's invalid/mismatched has no option + // but to reuse a cached body. We don't have a good way to tell clients to do + // error recovery in such case. + modified: response.status != 304, + matches: !1 + }; + let headers = {}; + for (let k in this._resHeaders) + headers[k] = k in response.headers && !excludedFromRevalidationUpdate[k] ? response.headers[k] : this._resHeaders[k]; + let newResponse = Object.assign({}, response, { + status: this._status, + method: this._method, + headers + }); + return { + policy: new this.constructor(request, newResponse, { + shared: this._isShared, + cacheHeuristic: this._cacheHeuristic, + immutableMinTimeToLive: this._immutableMinTtl + }), + modified: !1, + matches: !0 + }; + } + }; + } +}); + +// src/workers/cache/cache.worker.ts +var import_http_cache_semantics = __toESM(require_http_cache_semantics()); +import assert from "node:assert"; +import { Buffer as Buffer2 } from "node:buffer"; +import { + DeferredPromise, + GET, + KeyValueStorage, + LogLevel, + MiniflareDurableObject, + parseRanges, + PURGE, + PUT +} from "miniflare:shared"; + +// src/workers/kv/constants.ts +import { testRegExps } from "miniflare:shared"; +var KVLimits = { + MIN_CACHE_TTL: 60, + MAX_LIST_KEYS: 1e3, + MAX_KEY_SIZE: 512, + MAX_VALUE_SIZE: 25 * 1024 * 1024, + MAX_VALUE_SIZE_TEST: 1024, + MAX_METADATA_SIZE: 1024, + MAX_BULK_SIZE: 25 * 1024 * 1024 +}; +var SITES_NO_CACHE_PREFIX = "$__MINIFLARE_SITES__$/"; +function isSitesRequest(request) { + return new URL(request.url).pathname.startsWith(`/${SITES_NO_CACHE_PREFIX}`); +} + +// src/workers/cache/errors.worker.ts +import { HttpError } from "miniflare:shared"; + +// src/workers/cache/constants.ts +var CacheHeaders = { + NAMESPACE: "cf-cache-namespace", + STATUS: "cf-cache-status" +}; + +// src/workers/cache/errors.worker.ts +var CacheError = class extends HttpError { + constructor(code, message, headers = []) { + super(code, message); + this.headers = headers; + } + toResponse() { + return new Response(null, { + status: this.code, + headers: this.headers + }); + } + context(info) { + return this.message += ` (${info})`, this; + } +}, StorageFailure = class extends CacheError { + constructor() { + super(413, "Cache storage failed"); + } +}, PurgeFailure = class extends CacheError { + constructor() { + super(404, "Couldn't find asset to purge"); + } +}, CacheMiss = class extends CacheError { + constructor() { + super( + // workerd ignores this, but it's the correct status code + 504, + "Asset not found in cache", + [[CacheHeaders.STATUS, "MISS"]] + ); + } +}, RangeNotSatisfiable = class extends CacheError { + constructor(size) { + super(416, "Range not satisfiable", [ + ["Content-Range", `bytes */${size}`], + [CacheHeaders.STATUS, "HIT"] + ]); + } +}; + +// src/workers/cache/cache.worker.ts +function getCacheKey(req) { + return req.cf?.cacheKey ? String(req.cf?.cacheKey) : req.url; +} +function getExpiration(timers, req, res) { + let reqHeaders = normaliseHeaders(req.headers); + delete reqHeaders["cache-control"]; + let resHeaders = normaliseHeaders(res.headers); + resHeaders["cache-control"]?.toLowerCase().includes("private=set-cookie") && (resHeaders["cache-control"] = resHeaders["cache-control"]?.toLowerCase().replace(/private=set-cookie;?/i, ""), delete resHeaders["set-cookie"]); + let cacheReq = { + url: req.url, + // If a request gets to the Cache service, it's method will be GET. See README.md for details + method: "GET", + headers: reqHeaders + }, cacheRes = { + status: res.status, + headers: resHeaders + }, originalNow = import_http_cache_semantics.default.prototype.now; + import_http_cache_semantics.default.prototype.now = timers.now; + try { + let policy = new import_http_cache_semantics.default(cacheReq, cacheRes, { shared: !0 }); + return { + // Check if the request & response is cacheable + storable: policy.storable() && !("set-cookie" in resHeaders), + expiration: policy.timeToLive(), + // Cache Policy Headers is typed as [header: string]: string | string[] | undefined + // It's safe to ignore the undefined here, which is what casting to HeadersInit does + headers: policy.responseHeaders() + }; + } finally { + import_http_cache_semantics.default.prototype.now = originalNow; + } +} +function normaliseHeaders(headers) { + let result = {}; + for (let [key, value] of headers) result[key.toLowerCase()] = value; + return result; +} +var etagRegexp = /^(W\/)?"(.+)"$/; +function parseETag(value) { + return etagRegexp.exec(value.trim())?.[2] ?? void 0; +} +var utcDateRegexp = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), \d\d (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d\d\d\d \d\d:\d\d:\d\d GMT$/; +function parseUTCDate(value) { + return utcDateRegexp.test(value) ? Date.parse(value) : NaN; +} +function getMatchResponse(reqHeaders, res) { + let reqIfNoneMatchHeader = reqHeaders.get("If-None-Match"), resETagHeader = res.headers.get("ETag"); + if (reqIfNoneMatchHeader !== null && resETagHeader !== null) { + let resETag = parseETag(resETagHeader); + if (resETag !== void 0) { + if (reqIfNoneMatchHeader.trim() === "*") + return new Response(null, { status: 304, headers: res.headers }); + for (let reqIfNoneMatch of reqIfNoneMatchHeader.split(",")) + if (resETag === parseETag(reqIfNoneMatch)) + return new Response(null, { status: 304, headers: res.headers }); + } + } + let reqIfModifiedSinceHeader = reqHeaders.get("If-Modified-Since"), resLastModifiedHeader = res.headers.get("Last-Modified"); + if (reqIfModifiedSinceHeader !== null && resLastModifiedHeader !== null) { + let reqIfModifiedSince = parseUTCDate(reqIfModifiedSinceHeader); + if (parseUTCDate(resLastModifiedHeader) <= reqIfModifiedSince) + return new Response(null, { status: 304, headers: res.headers }); + } + if (res.ranges.length > 0) + if (res.status = 206, res.ranges.length > 1) + assert(!(res.body instanceof ReadableStream)), res.headers.set("Content-Type", res.body.multipartContentType); + else { + let { start, end } = res.ranges[0]; + res.headers.set( + "Content-Range", + `bytes ${start}-${end}/${res.totalSize}` + ), res.headers.set("Content-Length", `${end - start + 1}`); + } + return res.body instanceof ReadableStream || (res.body = res.body.body), new Response(res.body, { status: res.status, headers: res.headers }); +} +var CR = 13, LF = 10, STATUS_REGEXP = /^HTTP\/\d(?:\.\d)? (?\d+) (?.*)$/; +async function parseHttpResponse(stream) { + let buffer = Buffer2.alloc(0), blankLineIndex = -1; + for await (let chunk of stream.values({ preventCancel: !0 })) + if (buffer = Buffer2.concat([buffer, chunk]), blankLineIndex = buffer.findIndex( + (_value, index) => buffer[index] === CR && buffer[index + 1] === LF && buffer[index + 2] === CR && buffer[index + 3] === LF + ), blankLineIndex !== -1) break; + assert(blankLineIndex !== -1, "Expected to find blank line in HTTP message"); + let rawStatusHeaders = buffer.subarray(0, blankLineIndex).toString(), [rawStatus, ...rawHeaders] = rawStatusHeaders.split(`\r +`), statusMatch = rawStatus.match(STATUS_REGEXP); + assert( + statusMatch?.groups != null, + `Expected first line ${JSON.stringify(rawStatus)} to be HTTP status line` + ); + let { rawStatusCode, statusText } = statusMatch.groups, statusCode = parseInt(rawStatusCode), headers = rawHeaders.map((rawHeader) => { + let index = rawHeader.indexOf(":"); + return [ + rawHeader.substring(0, index), + rawHeader.substring(index + 1).trim() + ]; + }), prefix = buffer.subarray( + blankLineIndex + 4 + /* "\r\n\r\n" */ + ), { readable, writable } = new IdentityTransformStream(), writer = writable.getWriter(); + return writer.write(prefix).then(() => (writer.releaseLock(), stream.pipeTo(writable))).catch((e) => console.error("Error writing HTTP body:", e)), new Response(readable, { status: statusCode, statusText, headers }); +} +var SizingStream = class extends TransformStream { + size; + constructor() { + let sizePromise = new DeferredPromise(), size = 0; + super({ + transform(chunk, controller) { + size += chunk.byteLength, controller.enqueue(chunk); + }, + flush() { + sizePromise.resolve(size); + } + }), this.size = sizePromise; + } +}, CacheObject = class extends MiniflareDurableObject { + #warnedUsage = !1; + async #maybeWarnUsage(request) { + !this.#warnedUsage && request.cf?.miniflare?.cacheWarnUsage === !0 && (this.#warnedUsage = !0, await this.logWithLevel( + LogLevel.WARN, + "Cache operations will have no impact if you deploy to a workers.dev subdomain!" + )); + } + #storage; + get storage() { + return this.#storage ??= new KeyValueStorage(this); + } + match = async (req) => { + await this.#maybeWarnUsage(req); + let cacheKey = getCacheKey(req); + if (isSitesRequest(req)) throw new CacheMiss(); + let resHeaders, resRanges, cached = await this.storage.get(cacheKey, ({ size, headers }) => { + resHeaders = new Headers(headers); + let contentType = resHeaders.get("Content-Type"), rangeHeader = req.headers.get("Range"); + if (rangeHeader !== null && (resRanges = parseRanges(rangeHeader, size), resRanges === void 0)) + throw new RangeNotSatisfiable(size); + return { + ranges: resRanges, + contentLength: size, + contentType: contentType ?? void 0 + }; + }); + if (cached?.metadata === void 0) throw new CacheMiss(); + return assert(resHeaders !== void 0), resHeaders.set("CF-Cache-Status", "HIT"), resRanges ??= [], getMatchResponse(req.headers, { + status: cached.metadata.status, + headers: resHeaders, + ranges: resRanges, + body: cached.value, + totalSize: cached.metadata.size + }); + }; + put = async (req) => { + await this.#maybeWarnUsage(req); + let cacheKey = getCacheKey(req); + if (isSitesRequest(req)) throw new CacheMiss(); + assert(req.body !== null); + let res = await parseHttpResponse(req.body), body = res.body; + assert(body !== null); + let { storable, expiration, headers } = getExpiration( + this.timers, + req, + res + ); + if (!storable) { + try { + await body.pipeTo(new WritableStream()); + } catch { + } + throw new StorageFailure(); + } + let contentLength = parseInt(res.headers.get("Content-Length")), sizePromise; + if (Number.isNaN(contentLength)) { + let stream = new SizingStream(); + body = body.pipeThrough(stream), sizePromise = stream.size; + } else + sizePromise = Promise.resolve(contentLength); + let metadata = sizePromise.then((size) => ({ + headers: Object.entries(headers), + status: res.status, + size + })); + return await this.storage.put({ + key: cacheKey, + value: body, + expiration: this.timers.now() + expiration, + metadata + }), new Response(null, { status: 204 }); + }; + delete = async (req) => { + await this.#maybeWarnUsage(req); + let cacheKey = getCacheKey(req); + if (!await this.storage.delete(cacheKey)) throw new PurgeFailure(); + return new Response(null); + }; +}; +__decorateClass([ + GET() +], CacheObject.prototype, "match", 2), __decorateClass([ + PUT() +], CacheObject.prototype, "put", 2), __decorateClass([ + PURGE() +], CacheObject.prototype, "delete", 2); +export { + CacheObject, + parseHttpResponse +}; +//# sourceMappingURL=cache.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/cache/cache.worker.js.map b/node_modules/miniflare/dist/src/workers/cache/cache.worker.js.map new file mode 100644 index 0000000..96b5316 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/cache/cache.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../../../node_modules/.pnpm/http-cache-semantics@4.1.1/node_modules/http-cache-semantics/index.js", "../../../../src/workers/cache/cache.worker.ts", "../../../../src/workers/kv/constants.ts", "../../../../src/workers/cache/errors.worker.ts", "../../../../src/workers/cache/constants.ts"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAEA,QAAM,+BAA+B,oBAAI,IAAI;AAAA,MACzC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ,CAAC,GAGK,qBAAqB,oBAAI,IAAI;AAAA,MAC/B;AAAA,MACA;AAAA,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,CAAC,GAEK,mBAAmB,oBAAI,IAAI;AAAA,MAC7B;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ,CAAC,GAEK,kBAAkB;AAAA,MACpB,MAAM;AAAA;AAAA,MACN,YAAY;AAAA,MACZ,cAAc;AAAA,MACd,sBAAsB;AAAA,MACtB,uBAAuB;AAAA,MACvB,IAAI;AAAA,M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AO,IAAI,SAAS,IAAI;AAAA,EACzB;AACD;AA/GC;AAAA,EADC,IAAI;AAAA,GAlBO,YAmBZ,wBA8CA;AAAA,EADC,IAAI;AAAA,GAhEO,YAiEZ,sBAwDA;AAAA,EADC,MAAM;AAAA,GAxHK,YAyHZ;", + "names": ["Buffer", "CachePolicy", "Buffer"] +} diff --git a/node_modules/miniflare/dist/src/workers/core/entry.worker.js b/node_modules/miniflare/dist/src/workers/core/entry.worker.js new file mode 100644 index 0000000..260b5fb --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/core/entry.worker.js @@ -0,0 +1,4333 @@ +// ../../node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/colors.mjs +var FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM, isTTY = !0; +typeof process < "u" && ({ FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM } = process.env || {}, isTTY = process.stdout && process.stdout.isTTY); +var $ = { + enabled: !NODE_DISABLE_COLORS && NO_COLOR == null && TERM !== "dumb" && (FORCE_COLOR != null && FORCE_COLOR !== "0" || isTTY) +}; +function init(x, y) { + let rgx = new RegExp(`\\x1b\\[${y}m`, "g"), open = `\x1B[${x}m`, close = `\x1B[${y}m`; + return function(txt) { + return !$.enabled || txt == null ? txt : open + (~("" + txt).indexOf(close) ? txt.replace(rgx, close + open) : txt) + close; + }; +} +var reset = init(0, 0), bold = init(1, 22), dim = init(2, 22), italic = init(3, 23), underline = init(4, 24), inverse = init(7, 27), hidden = init(8, 28), strikethrough = init(9, 29), black = init(30, 39), red = init(31, 39), green = init(32, 39), yellow = init(33, 39), blue = init(34, 39), magenta = init(35, 39), cyan = init(36, 39), white = init(37, 39), gray = init(90, 39), grey = init(90, 39), bgBlack = init(40, 49), bgRed = init(41, 49), bgGreen = init(42, 49), bgYellow = init(43, 49), bgBlue = init(44, 49), bgMagenta = init(45, 49), bgCyan = init(46, 49), bgWhite = init(47, 49); + +// src/workers/core/entry.worker.ts +import { HttpError, LogLevel as LogLevel2, SharedHeaders as SharedHeaders2 } from "miniflare:shared"; + +// src/shared/mime-types.ts +var compressedByCloudflareFL = /* @__PURE__ */ new Set([ + // list copied from https://developers.cloudflare.com/speed/optimization/content/brotli/content-compression/#:~:text=If%20supported%20by%20visitors%E2%80%99%20web%20browsers%2C%20Cloudflare%20will%20return%20Gzip%20or%20Brotli%2Dencoded%20responses%20for%20the%20following%20content%20types%3A + "text/html", + "text/richtext", + "text/plain", + "text/css", + "text/x-script", + "text/x-component", + "text/x-java-source", + "text/x-markdown", + "application/javascript", + "application/x-javascript", + "text/javascript", + "text/js", + "image/x-icon", + "image/vnd.microsoft.icon", + "application/x-perl", + "application/x-httpd-cgi", + "text/xml", + "application/xml", + "application/rss+xml", + "application/vnd.api+json", + "application/x-protobuf", + "application/json", + "multipart/bag", + "multipart/mixed", + "application/xhtml+xml", + "font/ttf", + "font/otf", + "font/x-woff", + "image/svg+xml", + "application/vnd.ms-fontobject", + "application/ttf", + "application/x-ttf", + "application/otf", + "application/x-otf", + "application/truetype", + "application/opentype", + "application/x-opentype", + "application/font-woff", + "application/eot", + "application/font", + "application/font-sfnt", + "application/wasm", + "application/javascript-binast", + "application/manifest+json", + "application/ld+json", + "application/graphql+json", + "application/geo+json" +]); +function isCompressedByCloudflareFL(contentTypeHeader) { + if (!contentTypeHeader) return !0; + let [contentType] = contentTypeHeader.split(";"); + return compressedByCloudflareFL.has(contentType); +} + +// src/workers/core/constants.ts +var CoreHeaders = { + CUSTOM_SERVICE: "MF-Custom-Service", + ORIGINAL_URL: "MF-Original-URL", + PROXY_SHARED_SECRET: "MF-Proxy-Shared-Secret", + DISABLE_PRETTY_ERROR: "MF-Disable-Pretty-Error", + ERROR_STACK: "MF-Experimental-Error-Stack", + ROUTE_OVERRIDE: "MF-Route-Override", + CF_BLOB: "MF-CF-Blob", + // API Proxy + OP_SECRET: "MF-Op-Secret", + OP: "MF-Op", + OP_TARGET: "MF-Op-Target", + OP_KEY: "MF-Op-Key", + OP_SYNC: "MF-Op-Sync", + OP_STRINGIFIED_SIZE: "MF-Op-Stringified-Size", + OP_RESULT_TYPE: "MF-Op-Result-Type" +}, CoreBindings = { + SERVICE_LOOPBACK: "MINIFLARE_LOOPBACK", + SERVICE_USER_ROUTE_PREFIX: "MINIFLARE_USER_ROUTE_", + SERVICE_USER_FALLBACK: "MINIFLARE_USER_FALLBACK", + TEXT_CUSTOM_SERVICE: "MINIFLARE_CUSTOM_SERVICE", + IMAGES_SERVICE: "MINIFLARE_IMAGES_SERVICE", + TEXT_UPSTREAM_URL: "MINIFLARE_UPSTREAM_URL", + JSON_CF_BLOB: "CF_BLOB", + JSON_ROUTES: "MINIFLARE_ROUTES", + JSON_LOG_LEVEL: "MINIFLARE_LOG_LEVEL", + DATA_LIVE_RELOAD_SCRIPT: "MINIFLARE_LIVE_RELOAD_SCRIPT", + DURABLE_OBJECT_NAMESPACE_PROXY: "MINIFLARE_PROXY", + DATA_PROXY_SECRET: "MINIFLARE_PROXY_SECRET", + DATA_PROXY_SHARED_SECRET: "MINIFLARE_PROXY_SHARED_SECRET", + TRIGGER_HANDLERS: "TRIGGER_HANDLERS", + LOG_REQUESTS: "LOG_REQUESTS" +}, ProxyOps = { + // Get the target or a property of the target + GET: "GET", + // Get the descriptor for a property of the target + GET_OWN_DESCRIPTOR: "GET_OWN_DESCRIPTOR", + // Get the target's own property names + GET_OWN_KEYS: "GET_OWN_KEYS", + // Call a method on the target + CALL: "CALL", + // Remove the strong reference to the target on the "heap", allowing it to be + // garbage collected + FREE: "FREE" +}, ProxyAddresses = { + GLOBAL: 0, + // globalThis + ENV: 1, + // env + USER_START: 2 +}; +function isFetcherFetch(targetName, key) { + return (targetName === "Fetcher" || targetName === "DurableObject" || targetName === "WorkerRpc") && key === "fetch"; +} +function isR2ObjectWriteHttpMetadata(targetName, key) { + return (targetName === "HeadResult" || targetName === "GetResult") && key === "writeHttpMetadata"; +} + +// src/workers/core/email.ts +import assert from "node:assert"; +import { LogLevel, SharedHeaders } from "miniflare:shared"; + +// ../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/decode-strings.js +var textEncoder = new TextEncoder(), base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", base64Lookup = new Uint8Array(256); +for (i = 0; i < base64Chars.length; i++) + base64Lookup[base64Chars.charCodeAt(i)] = i; +var i; +function decodeBase64(base64) { + let bufferLength = Math.ceil(base64.length / 4) * 3, len = base64.length, p = 0; + base64.length % 4 === 3 ? bufferLength-- : base64.length % 4 === 2 ? bufferLength -= 2 : base64[base64.length - 1] === "=" && (bufferLength--, base64[base64.length - 2] === "=" && bufferLength--); + let arrayBuffer = new ArrayBuffer(bufferLength), bytes = new Uint8Array(arrayBuffer); + for (let i = 0; i < len; i += 4) { + let encoded1 = base64Lookup[base64.charCodeAt(i)], encoded2 = base64Lookup[base64.charCodeAt(i + 1)], encoded3 = base64Lookup[base64.charCodeAt(i + 2)], encoded4 = base64Lookup[base64.charCodeAt(i + 3)]; + bytes[p++] = encoded1 << 2 | encoded2 >> 4, bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2, bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63; + } + return arrayBuffer; +} +function getDecoder(charset) { + return charset = charset || "utf8", new TextDecoder(charset); +} +async function blobToArrayBuffer(blob) { + if ("arrayBuffer" in blob) + return await blob.arrayBuffer(); + let fr = new FileReader(); + return new Promise((resolve, reject) => { + fr.onload = function(e) { + resolve(e.target.result); + }, fr.onerror = function(e) { + reject(fr.error); + }, fr.readAsArrayBuffer(blob); + }); +} +function getHex(c) { + return c >= 48 && c <= 57 || c >= 97 && c <= 102 || c >= 65 && c <= 70 ? String.fromCharCode(c) : !1; +} +function decodeWord(charset, encoding, str) { + let splitPos = charset.indexOf("*"); + splitPos >= 0 && (charset = charset.substr(0, splitPos)), encoding = encoding.toUpperCase(); + let byteStr; + if (encoding === "Q") { + str = str.replace(/=\s+([0-9a-fA-F])/g, "=$1").replace(/[_\s]/g, " "); + let buf = textEncoder.encode(str), encodedBytes = []; + for (let i = 0, len = buf.length; i < len; i++) { + let c = buf[i]; + if (i <= len - 2 && c === 61) { + let c1 = getHex(buf[i + 1]), c2 = getHex(buf[i + 2]); + if (c1 && c2) { + let c3 = parseInt(c1 + c2, 16); + encodedBytes.push(c3), i += 2; + continue; + } + } + encodedBytes.push(c); + } + byteStr = new ArrayBuffer(encodedBytes.length); + let dataView = new DataView(byteStr); + for (let i = 0, len = encodedBytes.length; i < len; i++) + dataView.setUint8(i, encodedBytes[i]); + } else encoding === "B" ? byteStr = decodeBase64(str.replace(/[^a-zA-Z0-9\+\/=]+/g, "")) : byteStr = textEncoder.encode(str); + return getDecoder(charset).decode(byteStr); +} +function decodeWords(str) { + let joinString = !0, done = !1; + for (; !done; ) { + let result = (str || "").toString().replace(/(=\?([^?]+)\?[Bb]\?([^?]*)\?=)\s*(?==\?([^?]+)\?[Bb]\?[^?]*\?=)/g, (match, left, chLeft, encodedLeftStr, chRight) => joinString && chLeft === chRight && encodedLeftStr.length % 4 === 0 && !/=$/.test(encodedLeftStr) ? left + "__\0JOIN\0__" : match).replace(/(=\?([^?]+)\?[Qq]\?[^?]*\?=)\s*(?==\?([^?]+)\?[Qq]\?[^?]*\?=)/g, (match, left, chLeft, chRight) => joinString && chLeft === chRight ? left + "__\0JOIN\0__" : match).replace(/(\?=)?__\x00JOIN\x00__(=\?([^?]+)\?[QqBb]\?)?/g, "").replace(/(=\?[^?]+\?[QqBb]\?[^?]*\?=)\s+(?==\?[^?]+\?[QqBb]\?[^?]*\?=)/g, "$1").replace(/=\?([\w_\-*]+)\?([QqBb])\?([^?]*)\?=/g, (m, charset, encoding, text) => decodeWord(charset, encoding, text)); + if (joinString && result.indexOf("\uFFFD") >= 0) + joinString = !1; + else + return result; + } +} +function decodeURIComponentWithCharset(encodedStr, charset) { + charset = charset || "utf-8"; + let encodedBytes = []; + for (let i = 0; i < encodedStr.length; i++) { + let c = encodedStr.charAt(i); + if (c === "%" && /^[a-f0-9]{2}/i.test(encodedStr.substr(i + 1, 2))) { + let byte = encodedStr.substr(i + 1, 2); + i += 2, encodedBytes.push(parseInt(byte, 16)); + } else if (c.charCodeAt(0) > 126) { + c = textEncoder.encode(c); + for (let j = 0; j < c.length; j++) + encodedBytes.push(c[j]); + } else + encodedBytes.push(c.charCodeAt(0)); + } + let byteStr = new ArrayBuffer(encodedBytes.length), dataView = new DataView(byteStr); + for (let i = 0, len = encodedBytes.length; i < len; i++) + dataView.setUint8(i, encodedBytes[i]); + return getDecoder(charset).decode(byteStr); +} +function decodeParameterValueContinuations(header) { + let paramKeys = /* @__PURE__ */ new Map(); + Object.keys(header.params).forEach((key) => { + let match = key.match(/\*((\d+)\*?)?$/); + if (!match) + return; + let actualKey = key.substr(0, match.index).toLowerCase(), nr = Number(match[2]) || 0, paramVal; + paramKeys.has(actualKey) ? paramVal = paramKeys.get(actualKey) : (paramVal = { + charset: !1, + values: [] + }, paramKeys.set(actualKey, paramVal)); + let value = header.params[key]; + nr === 0 && match[0].charAt(match[0].length - 1) === "*" && (match = value.match(/^([^']*)'[^']*'(.*)$/)) && (paramVal.charset = match[1] || "utf-8", value = match[2]), paramVal.values.push({ nr, value }), delete header.params[key]; + }), paramKeys.forEach((paramVal, key) => { + header.params[key] = decodeURIComponentWithCharset( + paramVal.values.sort((a, b) => a.nr - b.nr).map((a) => a.value).join(""), + paramVal.charset + ); + }); +} + +// ../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/pass-through-decoder.js +var PassThroughDecoder = class { + constructor() { + this.chunks = []; + } + update(line) { + this.chunks.push(line), this.chunks.push(` +`); + } + finalize() { + return blobToArrayBuffer(new Blob(this.chunks, { type: "application/octet-stream" })); + } +}; + +// ../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/base64-decoder.js +var Base64Decoder = class { + constructor(opts) { + opts = opts || {}, this.decoder = opts.decoder || new TextDecoder(), this.maxChunkSize = 100 * 1024, this.chunks = [], this.remainder = ""; + } + update(buffer) { + let str = this.decoder.decode(buffer); + if (/[^a-zA-Z0-9+\/]/.test(str) && (str = str.replace(/[^a-zA-Z0-9+\/]+/g, "")), this.remainder += str, this.remainder.length >= this.maxChunkSize) { + let allowedBytes = Math.floor(this.remainder.length / 4) * 4, base64Str; + allowedBytes === this.remainder.length ? (base64Str = this.remainder, this.remainder = "") : (base64Str = this.remainder.substr(0, allowedBytes), this.remainder = this.remainder.substr(allowedBytes)), base64Str.length && this.chunks.push(decodeBase64(base64Str)); + } + } + finalize() { + return this.remainder && !/^=+$/.test(this.remainder) && this.chunks.push(decodeBase64(this.remainder)), blobToArrayBuffer(new Blob(this.chunks, { type: "application/octet-stream" })); + } +}; + +// ../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/qp-decoder.js +var QPDecoder = class { + constructor(opts) { + opts = opts || {}, this.decoder = opts.decoder || new TextDecoder(), this.maxChunkSize = 100 * 1024, this.remainder = "", this.chunks = []; + } + decodeQPBytes(encodedBytes) { + let buf = new ArrayBuffer(encodedBytes.length), dataView = new DataView(buf); + for (let i = 0, len = encodedBytes.length; i < len; i++) + dataView.setUint8(i, parseInt(encodedBytes[i], 16)); + return buf; + } + decodeChunks(str) { + str = str.replace(/=\r?\n/g, ""); + let list = str.split(/(?==)/), encodedBytes = []; + for (let part of list) { + if (part.charAt(0) !== "=") { + encodedBytes.length && (this.chunks.push(this.decodeQPBytes(encodedBytes)), encodedBytes = []), this.chunks.push(part); + continue; + } + if (part.length === 3) { + encodedBytes.push(part.substr(1)); + continue; + } + part.length > 3 && (encodedBytes.push(part.substr(1, 2)), this.chunks.push(this.decodeQPBytes(encodedBytes)), encodedBytes = [], part = part.substr(3), this.chunks.push(part)); + } + encodedBytes.length && (this.chunks.push(this.decodeQPBytes(encodedBytes)), encodedBytes = []); + } + update(buffer) { + let str = this.decoder.decode(buffer) + ` +`; + if (str = this.remainder + str, str.length < this.maxChunkSize) { + this.remainder = str; + return; + } + this.remainder = ""; + let partialEnding = str.match(/=[a-fA-F0-9]?$/); + if (partialEnding) { + if (partialEnding.index === 0) { + this.remainder = str; + return; + } + this.remainder = str.substr(partialEnding.index), str = str.substr(0, partialEnding.index); + } + this.decodeChunks(str); + } + finalize() { + return this.remainder.length && (this.decodeChunks(this.remainder), this.remainder = ""), blobToArrayBuffer(new Blob(this.chunks, { type: "application/octet-stream" })); + } +}; + +// ../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/mime-node.js +var MimeNode = class { + constructor(opts) { + opts = opts || {}, this.postalMime = opts.postalMime, this.root = !!opts.parentNode, this.childNodes = [], opts.parentNode && opts.parentNode.childNodes.push(this), this.state = "header", this.headerLines = [], this.contentType = { + value: "text/plain", + default: !0 + }, this.contentTransferEncoding = { + value: "8bit" + }, this.contentDisposition = { + value: "" + }, this.headers = [], this.contentDecoder = !1; + } + setupContentDecoder(transferEncoding) { + /base64/i.test(transferEncoding) ? this.contentDecoder = new Base64Decoder() : /quoted-printable/i.test(transferEncoding) ? this.contentDecoder = new QPDecoder({ decoder: getDecoder(this.contentType.parsed.params.charset) }) : this.contentDecoder = new PassThroughDecoder(); + } + async finalize() { + if (this.state === "finished") + return; + this.state === "header" && this.processHeaders(); + let boundaries = this.postalMime.boundaries; + for (let i = boundaries.length - 1; i >= 0; i--) + if (boundaries[i].node === this) { + boundaries.splice(i, 1); + break; + } + await this.finalizeChildNodes(), this.content = this.contentDecoder ? await this.contentDecoder.finalize() : null, this.state = "finished"; + } + async finalizeChildNodes() { + for (let childNode of this.childNodes) + await childNode.finalize(); + } + parseStructuredHeader(str) { + let response = { + value: !1, + params: {} + }, key = !1, value = "", stage = "value", quote = !1, escaped2 = !1, chr; + for (let i = 0, len = str.length; i < len; i++) + switch (chr = str.charAt(i), stage) { + case "key": + if (chr === "=") { + key = value.trim().toLowerCase(), stage = "value", value = ""; + break; + } + value += chr; + break; + case "value": + if (escaped2) + value += chr; + else if (chr === "\\") { + escaped2 = !0; + continue; + } else quote && chr === quote ? quote = !1 : !quote && chr === '"' ? quote = chr : !quote && chr === ";" ? (key === !1 ? response.value = value.trim() : response.params[key] = value.trim(), stage = "key", value = "") : value += chr; + escaped2 = !1; + break; + } + return value = value.trim(), stage === "value" ? key === !1 ? response.value = value : response.params[key] = value : value && (response.params[value.toLowerCase()] = ""), response.value && (response.value = response.value.toLowerCase()), decodeParameterValueContinuations(response), response; + } + decodeFlowedText(str, delSp) { + return str.split(/\r?\n/).reduce((previousValue, currentValue) => / $/.test(previousValue) && !/(^|\n)-- $/.test(previousValue) ? delSp ? previousValue.slice(0, -1) + currentValue : previousValue + currentValue : previousValue + ` +` + currentValue).replace(/^ /gm, ""); + } + getTextContent() { + if (!this.content) + return ""; + let str = getDecoder(this.contentType.parsed.params.charset).decode(this.content); + return /^flowed$/i.test(this.contentType.parsed.params.format) && (str = this.decodeFlowedText(str, /^yes$/i.test(this.contentType.parsed.params.delsp))), str; + } + processHeaders() { + for (let i = this.headerLines.length - 1; i >= 0; i--) { + let line = this.headerLines[i]; + if (i && /^\s/.test(line)) + this.headerLines[i - 1] += ` +` + line, this.headerLines.splice(i, 1); + else { + line = line.replace(/\s+/g, " "); + let sep = line.indexOf(":"), key = sep < 0 ? line.trim() : line.substr(0, sep).trim(), value = sep < 0 ? "" : line.substr(sep + 1).trim(); + switch (this.headers.push({ key: key.toLowerCase(), originalKey: key, value }), key.toLowerCase()) { + case "content-type": + this.contentType.default && (this.contentType = { value, parsed: {} }); + break; + case "content-transfer-encoding": + this.contentTransferEncoding = { value, parsed: {} }; + break; + case "content-disposition": + this.contentDisposition = { value, parsed: {} }; + break; + case "content-id": + this.contentId = value; + break; + case "content-description": + this.contentDescription = value; + break; + } + } + } + this.contentType.parsed = this.parseStructuredHeader(this.contentType.value), this.contentType.multipart = /^multipart\//i.test(this.contentType.parsed.value) ? this.contentType.parsed.value.substr(this.contentType.parsed.value.indexOf("/") + 1) : !1, this.contentType.multipart && this.contentType.parsed.params.boundary && this.postalMime.boundaries.push({ + value: textEncoder.encode(this.contentType.parsed.params.boundary), + node: this + }), this.contentDisposition.parsed = this.parseStructuredHeader(this.contentDisposition.value), this.contentTransferEncoding.encoding = this.contentTransferEncoding.value.toLowerCase().split(/[^\w-]/).shift(), this.setupContentDecoder(this.contentTransferEncoding.encoding); + } + feed(line) { + switch (this.state) { + case "header": + if (!line.length) + return this.state = "body", this.processHeaders(); + this.headerLines.push(getDecoder().decode(line)); + break; + case "body": + this.contentDecoder.update(line); + } + } +}; + +// ../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/html-entities.js +var htmlEntities = { + "Æ": "\xC6", + "Æ": "\xC6", + "&": "&", + "&": "&", + "Á": "\xC1", + "Á": "\xC1", + "Ă": "\u0102", + "Â": "\xC2", + "Â": "\xC2", + "А": "\u0410", + "𝔄": "\u{1D504}", + "À": "\xC0", + "À": "\xC0", + "Α": "\u0391", + "Ā": "\u0100", + "⩓": "\u2A53", + "Ą": "\u0104", + "𝔸": "\u{1D538}", + "⁡": "\u2061", + "Å": "\xC5", + "Å": "\xC5", + "𝒜": "\u{1D49C}", + "≔": "\u2254", + "Ã": "\xC3", + "Ã": "\xC3", + "Ä": "\xC4", + "Ä": "\xC4", + "∖": "\u2216", + "⫧": "\u2AE7", + "⌆": "\u2306", + "Б": "\u0411", + "∵": "\u2235", + "ℬ": "\u212C", + "Β": "\u0392", + "𝔅": "\u{1D505}", + "𝔹": "\u{1D539}", + "˘": "\u02D8", + "ℬ": "\u212C", + "≎": "\u224E", + "Ч": "\u0427", + "©": "\xA9", + "©": "\xA9", + "Ć": "\u0106", + "⋒": "\u22D2", + "ⅅ": "\u2145", + "ℭ": "\u212D", + "Č": "\u010C", + "Ç": "\xC7", + "Ç": "\xC7", + "Ĉ": "\u0108", + "∰": "\u2230", + "Ċ": "\u010A", + "¸": "\xB8", + "·": "\xB7", + "ℭ": "\u212D", + "Χ": "\u03A7", + "⊙": "\u2299", + "⊖": "\u2296", + "⊕": "\u2295", + "⊗": "\u2297", + "∲": "\u2232", + "”": "\u201D", + "’": "\u2019", + "∷": "\u2237", + "⩴": "\u2A74", + "≡": "\u2261", + "∯": "\u222F", + "∮": "\u222E", + "ℂ": "\u2102", + "∐": "\u2210", + "∳": "\u2233", + "⨯": "\u2A2F", + "𝒞": "\u{1D49E}", + "⋓": "\u22D3", + "≍": "\u224D", + "ⅅ": "\u2145", + "⤑": "\u2911", + "Ђ": "\u0402", + "Ѕ": "\u0405", + "Џ": "\u040F", + "‡": "\u2021", + "↡": "\u21A1", + "⫤": "\u2AE4", + "Ď": "\u010E", + "Д": "\u0414", + "∇": "\u2207", + "Δ": "\u0394", + "𝔇": "\u{1D507}", + "´": "\xB4", + "˙": "\u02D9", + "˝": "\u02DD", + "`": "`", + "˜": "\u02DC", + "⋄": "\u22C4", + "ⅆ": "\u2146", + "𝔻": "\u{1D53B}", + "¨": "\xA8", + "⃜": "\u20DC", + "≐": "\u2250", + "∯": "\u222F", + "¨": "\xA8", + "⇓": "\u21D3", + "⇐": "\u21D0", + "⇔": "\u21D4", + "⫤": "\u2AE4", + "⟸": "\u27F8", + "⟺": "\u27FA", + "⟹": "\u27F9", + "⇒": "\u21D2", + "⊨": "\u22A8", + "⇑": "\u21D1", + "⇕": "\u21D5", + "∥": "\u2225", + "↓": "\u2193", + "⤓": "\u2913", + "⇵": "\u21F5", + "̑": "\u0311", + "⥐": "\u2950", + "⥞": "\u295E", + "↽": "\u21BD", + "⥖": "\u2956", + "⥟": "\u295F", + "⇁": "\u21C1", + "⥗": "\u2957", + "⊤": "\u22A4", + "↧": "\u21A7", + "⇓": "\u21D3", + "𝒟": "\u{1D49F}", + "Đ": "\u0110", + "Ŋ": "\u014A", + "Ð": "\xD0", + "Ð": "\xD0", + "É": "\xC9", + "É": "\xC9", + "Ě": "\u011A", + "Ê": "\xCA", + "Ê": "\xCA", + "Э": "\u042D", + "Ė": "\u0116", + "𝔈": "\u{1D508}", + "È": "\xC8", + "È": "\xC8", + "∈": "\u2208", + "Ē": "\u0112", + "◻": "\u25FB", + "▫": "\u25AB", + "Ę": "\u0118", + "𝔼": "\u{1D53C}", + "Ε": "\u0395", + "⩵": "\u2A75", + "≂": "\u2242", + "⇌": "\u21CC", + "ℰ": "\u2130", + "⩳": "\u2A73", + "Η": "\u0397", + "Ë": "\xCB", + "Ë": "\xCB", + "∃": "\u2203", + "ⅇ": "\u2147", + "Ф": "\u0424", + "𝔉": "\u{1D509}", + "◼": "\u25FC", + "▪": "\u25AA", + "𝔽": "\u{1D53D}", + "∀": "\u2200", + "ℱ": "\u2131", + "ℱ": "\u2131", + "Ѓ": "\u0403", + ">": ">", + ">": ">", + "Γ": "\u0393", + "Ϝ": "\u03DC", + "Ğ": "\u011E", + "Ģ": "\u0122", + "Ĝ": "\u011C", + "Г": "\u0413", + "Ġ": "\u0120", + "𝔊": "\u{1D50A}", + "⋙": "\u22D9", + "𝔾": "\u{1D53E}", + "≥": "\u2265", + "⋛": "\u22DB", + "≧": "\u2267", + "⪢": "\u2AA2", + "≷": "\u2277", + "⩾": "\u2A7E", + "≳": "\u2273", + "𝒢": "\u{1D4A2}", + "≫": "\u226B", + "Ъ": "\u042A", + "ˇ": "\u02C7", + "^": "^", + "Ĥ": "\u0124", + "ℌ": "\u210C", + "ℋ": "\u210B", + "ℍ": "\u210D", + "─": "\u2500", + "ℋ": "\u210B", + "Ħ": "\u0126", + "≎": "\u224E", + "≏": "\u224F", + "Е": "\u0415", + "IJ": "\u0132", + "Ё": "\u0401", + "Í": "\xCD", + "Í": "\xCD", + "Î": "\xCE", + "Î": "\xCE", + "И": "\u0418", + "İ": "\u0130", + "ℑ": "\u2111", + "Ì": "\xCC", + "Ì": "\xCC", + "ℑ": "\u2111", + "Ī": "\u012A", + "ⅈ": "\u2148", + "⇒": "\u21D2", + "∬": "\u222C", + "∫": "\u222B", + "⋂": "\u22C2", + "⁣": "\u2063", + "⁢": "\u2062", + "Į": "\u012E", + "𝕀": "\u{1D540}", + "Ι": "\u0399", + "ℐ": "\u2110", + "Ĩ": "\u0128", + "І": "\u0406", + "Ï": "\xCF", + "Ï": "\xCF", + "Ĵ": "\u0134", + "Й": "\u0419", + "𝔍": "\u{1D50D}", + "𝕁": "\u{1D541}", + "𝒥": "\u{1D4A5}", + "Ј": "\u0408", + "Є": "\u0404", + "Х": "\u0425", + "Ќ": "\u040C", + "Κ": "\u039A", + "Ķ": "\u0136", + "К": "\u041A", + "𝔎": "\u{1D50E}", + "𝕂": "\u{1D542}", + "𝒦": "\u{1D4A6}", + "Љ": "\u0409", + "<": "<", + "<": "<", + "Ĺ": "\u0139", + "Λ": "\u039B", + "⟪": "\u27EA", + "ℒ": "\u2112", + "↞": "\u219E", + "Ľ": "\u013D", + "Ļ": "\u013B", + "Л": "\u041B", + "⟨": "\u27E8", + "←": "\u2190", + "⇤": "\u21E4", + "⇆": "\u21C6", + "⌈": "\u2308", + "⟦": "\u27E6", + "⥡": "\u2961", + "⇃": "\u21C3", + "⥙": "\u2959", + "⌊": "\u230A", + "↔": "\u2194", + "⥎": "\u294E", + "⊣": "\u22A3", + "↤": "\u21A4", + "⥚": "\u295A", + "⊲": "\u22B2", + "⧏": "\u29CF", + "⊴": "\u22B4", + "⥑": "\u2951", + "⥠": "\u2960", + "↿": "\u21BF", + "⥘": "\u2958", + "↼": "\u21BC", + "⥒": "\u2952", + "⇐": "\u21D0", + "⇔": "\u21D4", + "⋚": "\u22DA", + "≦": "\u2266", + "≶": "\u2276", + "⪡": "\u2AA1", + "⩽": "\u2A7D", + "≲": "\u2272", + "𝔏": "\u{1D50F}", + "⋘": "\u22D8", + "⇚": "\u21DA", + "Ŀ": "\u013F", + "⟵": "\u27F5", + "⟷": "\u27F7", + "⟶": "\u27F6", + "⟸": "\u27F8", + "⟺": "\u27FA", + "⟹": "\u27F9", + "𝕃": "\u{1D543}", + "↙": "\u2199", + "↘": "\u2198", + "ℒ": "\u2112", + "↰": "\u21B0", + "Ł": "\u0141", + "≪": "\u226A", + "⤅": "\u2905", + "М": "\u041C", + " ": "\u205F", + "ℳ": "\u2133", + "𝔐": "\u{1D510}", + "∓": "\u2213", + "𝕄": "\u{1D544}", + "ℳ": "\u2133", + "Μ": "\u039C", + "Њ": "\u040A", + "Ń": "\u0143", + "Ň": "\u0147", + "Ņ": "\u0145", + "Н": "\u041D", + "​": "\u200B", + "​": "\u200B", + "​": "\u200B", + "​": "\u200B", + "≫": "\u226B", + "≪": "\u226A", + " ": ` +`, + "𝔑": "\u{1D511}", + "⁠": "\u2060", + " ": "\xA0", + "ℕ": "\u2115", + "⫬": "\u2AEC", + "≢": "\u2262", + "≭": "\u226D", + "∦": "\u2226", + "∉": "\u2209", + "≠": "\u2260", + "≂̸": "\u2242\u0338", + "∄": "\u2204", + "≯": "\u226F", + "≱": "\u2271", + "≧̸": "\u2267\u0338", + "≫̸": "\u226B\u0338", + "≹": "\u2279", + "⩾̸": "\u2A7E\u0338", + "≵": "\u2275", + "≎̸": "\u224E\u0338", + "≏̸": "\u224F\u0338", + "⋪": "\u22EA", + "⧏̸": "\u29CF\u0338", + "⋬": "\u22EC", + "≮": "\u226E", + "≰": "\u2270", + "≸": "\u2278", + "≪̸": "\u226A\u0338", + "⩽̸": "\u2A7D\u0338", + "≴": "\u2274", + "⪢̸": "\u2AA2\u0338", + "⪡̸": "\u2AA1\u0338", + "⊀": "\u2280", + "⪯̸": "\u2AAF\u0338", + "⋠": "\u22E0", + "∌": "\u220C", + "⋫": "\u22EB", + "⧐̸": "\u29D0\u0338", + "⋭": "\u22ED", + "⊏̸": "\u228F\u0338", + "⋢": "\u22E2", + "⊐̸": "\u2290\u0338", + "⋣": "\u22E3", + "⊂⃒": "\u2282\u20D2", + "⊈": "\u2288", + "⊁": "\u2281", + "⪰̸": "\u2AB0\u0338", + "⋡": "\u22E1", + "≿̸": "\u227F\u0338", + "⊃⃒": "\u2283\u20D2", + "⊉": "\u2289", + "≁": "\u2241", + "≄": "\u2244", + "≇": "\u2247", + "≉": "\u2249", + "∤": "\u2224", + "𝒩": "\u{1D4A9}", + "Ñ": "\xD1", + "Ñ": "\xD1", + "Ν": "\u039D", + "Œ": "\u0152", + "Ó": "\xD3", + "Ó": "\xD3", + "Ô": "\xD4", + "Ô": "\xD4", + "О": "\u041E", + "Ő": "\u0150", + "𝔒": "\u{1D512}", + "Ò": "\xD2", + "Ò": "\xD2", + "Ō": "\u014C", + "Ω": "\u03A9", + "Ο": "\u039F", + "𝕆": "\u{1D546}", + "“": "\u201C", + "‘": "\u2018", + "⩔": "\u2A54", + "𝒪": "\u{1D4AA}", + "Ø": "\xD8", + "Ø": "\xD8", + "Õ": "\xD5", + "Õ": "\xD5", + "⨷": "\u2A37", + "Ö": "\xD6", + "Ö": "\xD6", + "‾": "\u203E", + "⏞": "\u23DE", + "⎴": "\u23B4", + "⏜": "\u23DC", + "∂": "\u2202", + "П": "\u041F", + "𝔓": "\u{1D513}", + "Φ": "\u03A6", + "Π": "\u03A0", + "±": "\xB1", + "ℌ": "\u210C", + "ℙ": "\u2119", + "⪻": "\u2ABB", + "≺": "\u227A", + "⪯": "\u2AAF", + "≼": "\u227C", + "≾": "\u227E", + "″": "\u2033", + "∏": "\u220F", + "∷": "\u2237", + "∝": "\u221D", + "𝒫": "\u{1D4AB}", + "Ψ": "\u03A8", + """: '"', + """: '"', + "𝔔": "\u{1D514}", + "ℚ": "\u211A", + "𝒬": "\u{1D4AC}", + "⤐": "\u2910", + "®": "\xAE", + "®": "\xAE", + "Ŕ": "\u0154", + "⟫": "\u27EB", + "↠": "\u21A0", + "⤖": "\u2916", + "Ř": "\u0158", + "Ŗ": "\u0156", + "Р": "\u0420", + "ℜ": "\u211C", + "∋": "\u220B", + "⇋": "\u21CB", + "⥯": "\u296F", + "ℜ": "\u211C", + "Ρ": "\u03A1", + "⟩": "\u27E9", + "→": "\u2192", + "⇥": "\u21E5", + "⇄": "\u21C4", + "⌉": "\u2309", + "⟧": "\u27E7", + "⥝": "\u295D", + "⇂": "\u21C2", + "⥕": "\u2955", + "⌋": "\u230B", + "⊢": "\u22A2", + "↦": "\u21A6", + "⥛": "\u295B", + "⊳": "\u22B3", + "⧐": "\u29D0", + "⊵": "\u22B5", + "⥏": "\u294F", + "⥜": "\u295C", + "↾": "\u21BE", + "⥔": "\u2954", + "⇀": "\u21C0", + "⥓": "\u2953", + "⇒": "\u21D2", + "ℝ": "\u211D", + "⥰": "\u2970", + "⇛": "\u21DB", + "ℛ": "\u211B", + "↱": "\u21B1", + "⧴": "\u29F4", + "Щ": "\u0429", + "Ш": "\u0428", + "Ь": "\u042C", + "Ś": "\u015A", + "⪼": "\u2ABC", + "Š": "\u0160", + "Ş": "\u015E", + "Ŝ": "\u015C", + "С": "\u0421", + "𝔖": "\u{1D516}", + "↓": "\u2193", + "←": "\u2190", + "→": "\u2192", + "↑": "\u2191", + "Σ": "\u03A3", + "∘": "\u2218", + "𝕊": "\u{1D54A}", + "√": "\u221A", + "□": "\u25A1", + "⊓": "\u2293", + "⊏": "\u228F", + "⊑": "\u2291", + "⊐": "\u2290", + "⊒": "\u2292", + "⊔": "\u2294", + "𝒮": "\u{1D4AE}", + "⋆": "\u22C6", + "⋐": "\u22D0", + "⋐": "\u22D0", + "⊆": "\u2286", + "≻": "\u227B", + "⪰": "\u2AB0", + "≽": "\u227D", + "≿": "\u227F", + "∋": "\u220B", + "∑": "\u2211", + "⋑": "\u22D1", + "⊃": "\u2283", + "⊇": "\u2287", + "⋑": "\u22D1", + "Þ": "\xDE", + "Þ": "\xDE", + "™": "\u2122", + "Ћ": "\u040B", + "Ц": "\u0426", + " ": " ", + "Τ": "\u03A4", + "Ť": "\u0164", + "Ţ": "\u0162", + "Т": "\u0422", + "𝔗": "\u{1D517}", + "∴": "\u2234", + "Θ": "\u0398", + "  ": "\u205F\u200A", + " ": "\u2009", + "∼": "\u223C", + "≃": "\u2243", + "≅": "\u2245", + "≈": "\u2248", + "𝕋": "\u{1D54B}", + "⃛": "\u20DB", + "𝒯": "\u{1D4AF}", + "Ŧ": "\u0166", + "Ú": "\xDA", + "Ú": "\xDA", + "↟": "\u219F", + "⥉": "\u2949", + "Ў": "\u040E", + "Ŭ": "\u016C", + "Û": "\xDB", + "Û": "\xDB", + "У": "\u0423", + "Ű": "\u0170", + "𝔘": "\u{1D518}", + "Ù": "\xD9", + "Ù": "\xD9", + "Ū": "\u016A", + "_": "_", + "⏟": "\u23DF", + "⎵": "\u23B5", + "⏝": "\u23DD", + "⋃": "\u22C3", + "⊎": "\u228E", + "Ų": "\u0172", + "𝕌": "\u{1D54C}", + "↑": "\u2191", + "⤒": "\u2912", + "⇅": "\u21C5", + "↕": "\u2195", + "⥮": "\u296E", + "⊥": "\u22A5", + "↥": "\u21A5", + "⇑": "\u21D1", + "⇕": "\u21D5", + "↖": "\u2196", + "↗": "\u2197", + "ϒ": "\u03D2", + "Υ": "\u03A5", + "Ů": "\u016E", + "𝒰": "\u{1D4B0}", + "Ũ": "\u0168", + "Ü": "\xDC", + "Ü": "\xDC", + "⊫": "\u22AB", + "⫫": "\u2AEB", + "В": "\u0412", + "⊩": "\u22A9", + "⫦": "\u2AE6", + "⋁": "\u22C1", + "‖": "\u2016", + "‖": "\u2016", + "∣": "\u2223", + "|": "|", + "❘": "\u2758", + "≀": "\u2240", + " ": "\u200A", + "𝔙": "\u{1D519}", + "𝕍": "\u{1D54D}", + "𝒱": "\u{1D4B1}", + "⊪": "\u22AA", + "Ŵ": "\u0174", + "⋀": "\u22C0", + "𝔚": "\u{1D51A}", + "𝕎": "\u{1D54E}", + "𝒲": "\u{1D4B2}", + "𝔛": "\u{1D51B}", + "Ξ": "\u039E", + "𝕏": "\u{1D54F}", + "𝒳": "\u{1D4B3}", + "Я": "\u042F", + "Ї": "\u0407", + "Ю": "\u042E", + "Ý": "\xDD", + "Ý": "\xDD", + "Ŷ": "\u0176", + "Ы": "\u042B", + "𝔜": "\u{1D51C}", + "𝕐": "\u{1D550}", + "𝒴": "\u{1D4B4}", + "Ÿ": "\u0178", + "Ж": "\u0416", + "Ź": "\u0179", + "Ž": "\u017D", + "З": "\u0417", + "Ż": "\u017B", + "​": "\u200B", + "Ζ": "\u0396", + "ℨ": "\u2128", + "ℤ": "\u2124", + "𝒵": "\u{1D4B5}", + "á": "\xE1", + "á": "\xE1", + "ă": "\u0103", + "∾": "\u223E", + "∾̳": "\u223E\u0333", + "∿": "\u223F", + "â": "\xE2", + "â": "\xE2", + "´": "\xB4", + "´": "\xB4", + "а": "\u0430", + "æ": "\xE6", + "æ": "\xE6", + "⁡": "\u2061", + "𝔞": "\u{1D51E}", + "à": "\xE0", + "à": "\xE0", + "ℵ": "\u2135", + "ℵ": "\u2135", + "α": "\u03B1", + "ā": "\u0101", + "⨿": "\u2A3F", + "&": "&", + "&": "&", + "∧": "\u2227", + "⩕": "\u2A55", + "⩜": "\u2A5C", + "⩘": "\u2A58", + "⩚": "\u2A5A", + "∠": "\u2220", + "⦤": "\u29A4", + "∠": "\u2220", + "∡": "\u2221", + "⦨": "\u29A8", + "⦩": "\u29A9", + "⦪": "\u29AA", + "⦫": "\u29AB", + "⦬": "\u29AC", + "⦭": "\u29AD", + "⦮": "\u29AE", + "⦯": "\u29AF", + "∟": "\u221F", + "⊾": "\u22BE", + "⦝": "\u299D", + "∢": "\u2222", + "Å": "\xC5", + "⍼": "\u237C", + "ą": "\u0105", + "𝕒": "\u{1D552}", + "≈": "\u2248", + "⩰": "\u2A70", + "⩯": "\u2A6F", + "≊": "\u224A", + "≋": "\u224B", + "'": "'", + "≈": "\u2248", + "≊": "\u224A", + "å": "\xE5", + "å": "\xE5", + "𝒶": "\u{1D4B6}", + "*": "*", + "≈": "\u2248", + "≍": "\u224D", + "ã": "\xE3", + "ã": "\xE3", + "ä": "\xE4", + "ä": "\xE4", + "∳": "\u2233", + "⨑": "\u2A11", + "⫭": "\u2AED", + "≌": "\u224C", + "϶": "\u03F6", + "‵": "\u2035", + "∽": "\u223D", + "⋍": "\u22CD", + "⊽": "\u22BD", + "⌅": "\u2305", + "⌅": "\u2305", + "⎵": "\u23B5", + "⎶": "\u23B6", + "≌": "\u224C", + "б": "\u0431", + "„": "\u201E", + "∵": "\u2235", + "∵": "\u2235", + "⦰": "\u29B0", + "϶": "\u03F6", + "ℬ": "\u212C", + "β": "\u03B2", + "ℶ": "\u2136", + "≬": "\u226C", + "𝔟": "\u{1D51F}", + "⋂": "\u22C2", + "◯": "\u25EF", + "⋃": "\u22C3", + "⨀": "\u2A00", + "⨁": "\u2A01", + "⨂": "\u2A02", + "⨆": "\u2A06", + "★": "\u2605", + "▽": "\u25BD", + "△": "\u25B3", + "⨄": "\u2A04", + "⋁": "\u22C1", + "⋀": "\u22C0", + "⤍": "\u290D", + "⧫": "\u29EB", + "▪": "\u25AA", + "▴": "\u25B4", + "▾": "\u25BE", + "◂": "\u25C2", + "▸": "\u25B8", + "␣": "\u2423", + "▒": "\u2592", + "░": "\u2591", + "▓": "\u2593", + "█": "\u2588", + "=⃥": "=\u20E5", + "≡⃥": "\u2261\u20E5", + "⌐": "\u2310", + "𝕓": "\u{1D553}", + "⊥": "\u22A5", + "⊥": "\u22A5", + "⋈": "\u22C8", + "╗": "\u2557", + "╔": "\u2554", + "╖": "\u2556", + "╓": "\u2553", + "═": "\u2550", + "╦": "\u2566", + "╩": "\u2569", + "╤": "\u2564", + "╧": "\u2567", + "╝": "\u255D", + "╚": "\u255A", + "╜": "\u255C", + "╙": "\u2559", + "║": "\u2551", + "╬": "\u256C", + "╣": "\u2563", + "╠": "\u2560", + "╫": "\u256B", + "╢": "\u2562", + "╟": "\u255F", + "⧉": "\u29C9", + "╕": "\u2555", + "╒": "\u2552", + "┐": "\u2510", + "┌": "\u250C", + "─": "\u2500", + "╥": "\u2565", + "╨": "\u2568", + "┬": "\u252C", + "┴": "\u2534", + "⊟": "\u229F", + "⊞": "\u229E", + "⊠": "\u22A0", + "╛": "\u255B", + "╘": "\u2558", + "┘": "\u2518", + "└": "\u2514", + "│": "\u2502", + "╪": "\u256A", + "╡": "\u2561", + "╞": "\u255E", + "┼": "\u253C", + "┤": "\u2524", + "├": "\u251C", + "‵": "\u2035", + "˘": "\u02D8", + "¦": "\xA6", + "¦": "\xA6", + "𝒷": "\u{1D4B7}", + "⁏": "\u204F", + "∽": "\u223D", + "⋍": "\u22CD", + "\": "\\", + "⧅": "\u29C5", + "⟈": "\u27C8", + "•": "\u2022", + "•": "\u2022", + "≎": "\u224E", + "⪮": "\u2AAE", + "≏": "\u224F", + "≏": "\u224F", + "ć": "\u0107", + "∩": "\u2229", + "⩄": "\u2A44", + "⩉": "\u2A49", + "⩋": "\u2A4B", + "⩇": "\u2A47", + "⩀": "\u2A40", + "∩︀": "\u2229\uFE00", + "⁁": "\u2041", + "ˇ": "\u02C7", + "⩍": "\u2A4D", + "č": "\u010D", + "ç": "\xE7", + "ç": "\xE7", + "ĉ": "\u0109", + "⩌": "\u2A4C", + "⩐": "\u2A50", + "ċ": "\u010B", + "¸": "\xB8", + "¸": "\xB8", + "⦲": "\u29B2", + "¢": "\xA2", + "¢": "\xA2", + "·": "\xB7", + "𝔠": "\u{1D520}", + "ч": "\u0447", + "✓": "\u2713", + "✓": "\u2713", + "χ": "\u03C7", + "○": "\u25CB", + "⧃": "\u29C3", + "ˆ": "\u02C6", + "≗": "\u2257", + "↺": "\u21BA", + "↻": "\u21BB", + "®": "\xAE", + "Ⓢ": "\u24C8", + "⊛": "\u229B", + "⊚": "\u229A", + "⊝": "\u229D", + "≗": "\u2257", + "⨐": "\u2A10", + "⫯": "\u2AEF", + "⧂": "\u29C2", + "♣": "\u2663", + "♣": "\u2663", + ":": ":", + "≔": "\u2254", + "≔": "\u2254", + ",": ",", + "@": "@", + "∁": "\u2201", + "∘": "\u2218", + "∁": "\u2201", + "ℂ": "\u2102", + "≅": "\u2245", + "⩭": "\u2A6D", + "∮": "\u222E", + "𝕔": "\u{1D554}", + "∐": "\u2210", + "©": "\xA9", + "©": "\xA9", + "℗": "\u2117", + "↵": "\u21B5", + "✗": "\u2717", + "𝒸": "\u{1D4B8}", + "⫏": "\u2ACF", + "⫑": "\u2AD1", + "⫐": "\u2AD0", + "⫒": "\u2AD2", + "⋯": "\u22EF", + "⤸": "\u2938", + "⤵": "\u2935", + "⋞": "\u22DE", + "⋟": "\u22DF", + "↶": "\u21B6", + "⤽": "\u293D", + "∪": "\u222A", + "⩈": "\u2A48", + "⩆": "\u2A46", + "⩊": "\u2A4A", + "⊍": "\u228D", + "⩅": "\u2A45", + "∪︀": "\u222A\uFE00", + "↷": "\u21B7", + "⤼": "\u293C", + "⋞": "\u22DE", + "⋟": "\u22DF", + "⋎": "\u22CE", + "⋏": "\u22CF", + "¤": "\xA4", + "¤": "\xA4", + "↶": "\u21B6", + "↷": "\u21B7", + "⋎": "\u22CE", + "⋏": "\u22CF", + "∲": "\u2232", + "∱": "\u2231", + "⌭": "\u232D", + "⇓": "\u21D3", + "⥥": "\u2965", + "†": "\u2020", + "ℸ": "\u2138", + "↓": "\u2193", + "‐": "\u2010", + "⊣": "\u22A3", + "⤏": "\u290F", + "˝": "\u02DD", + "ď": "\u010F", + "д": "\u0434", + "ⅆ": "\u2146", + "‡": "\u2021", + "⇊": "\u21CA", + "⩷": "\u2A77", + "°": "\xB0", + "°": "\xB0", + "δ": "\u03B4", + "⦱": "\u29B1", + "⥿": "\u297F", + "𝔡": "\u{1D521}", + "⇃": "\u21C3", + "⇂": "\u21C2", + "⋄": "\u22C4", + "⋄": "\u22C4", + "♦": "\u2666", + "♦": "\u2666", + "¨": "\xA8", + "ϝ": "\u03DD", + "⋲": "\u22F2", + "÷": "\xF7", + "÷": "\xF7", + "÷": "\xF7", + "⋇": "\u22C7", + "⋇": "\u22C7", + "ђ": "\u0452", + "⌞": "\u231E", + "⌍": "\u230D", + "$": "$", + "𝕕": "\u{1D555}", + "˙": "\u02D9", + "≐": "\u2250", + "≑": "\u2251", + "∸": "\u2238", + "∔": "\u2214", + "⊡": "\u22A1", + "⌆": "\u2306", + "↓": "\u2193", + "⇊": "\u21CA", + "⇃": "\u21C3", + "⇂": "\u21C2", + "⤐": "\u2910", + "⌟": "\u231F", + "⌌": "\u230C", + "𝒹": "\u{1D4B9}", + "ѕ": "\u0455", + "⧶": "\u29F6", + "đ": "\u0111", + "⋱": "\u22F1", + "▿": "\u25BF", + "▾": "\u25BE", + "⇵": "\u21F5", + "⥯": "\u296F", + "⦦": "\u29A6", + "џ": "\u045F", + "⟿": "\u27FF", + "⩷": "\u2A77", + "≑": "\u2251", + "é": "\xE9", + "é": "\xE9", + "⩮": "\u2A6E", + "ě": "\u011B", + "≖": "\u2256", + "ê": "\xEA", + "ê": "\xEA", + "≕": "\u2255", + "э": "\u044D", + "ė": "\u0117", + "ⅇ": "\u2147", + "≒": "\u2252", + "𝔢": "\u{1D522}", + "⪚": "\u2A9A", + "è": "\xE8", + "è": "\xE8", + "⪖": "\u2A96", + "⪘": "\u2A98", + "⪙": "\u2A99", + "⏧": "\u23E7", + "ℓ": "\u2113", + "⪕": "\u2A95", + "⪗": "\u2A97", + "ē": "\u0113", + "∅": "\u2205", + "∅": "\u2205", + "∅": "\u2205", + " ": "\u2004", + " ": "\u2005", + " ": "\u2003", + "ŋ": "\u014B", + " ": "\u2002", + "ę": "\u0119", + "𝕖": "\u{1D556}", + "⋕": "\u22D5", + "⧣": "\u29E3", + "⩱": "\u2A71", + "ε": "\u03B5", + "ε": "\u03B5", + "ϵ": "\u03F5", + "≖": "\u2256", + "≕": "\u2255", + "≂": "\u2242", + "⪖": "\u2A96", + "⪕": "\u2A95", + "=": "=", + "≟": "\u225F", + "≡": "\u2261", + "⩸": "\u2A78", + "⧥": "\u29E5", + "≓": "\u2253", + "⥱": "\u2971", + "ℯ": "\u212F", + "≐": "\u2250", + "≂": "\u2242", + "η": "\u03B7", + "ð": "\xF0", + "ð": "\xF0", + "ë": "\xEB", + "ë": "\xEB", + "€": "\u20AC", + "!": "!", + "∃": "\u2203", + "ℰ": "\u2130", + "ⅇ": "\u2147", + "≒": "\u2252", + "ф": "\u0444", + "♀": "\u2640", + "ffi": "\uFB03", + "ff": "\uFB00", + "ffl": "\uFB04", + "𝔣": "\u{1D523}", + "fi": "\uFB01", + "fj": "fj", + "♭": "\u266D", + "fl": "\uFB02", + "▱": "\u25B1", + "ƒ": "\u0192", + "𝕗": "\u{1D557}", + "∀": "\u2200", + "⋔": "\u22D4", + "⫙": "\u2AD9", + "⨍": "\u2A0D", + "½": "\xBD", + "½": "\xBD", + "⅓": "\u2153", + "¼": "\xBC", + "¼": "\xBC", + "⅕": "\u2155", + "⅙": "\u2159", + "⅛": "\u215B", + "⅔": "\u2154", + "⅖": "\u2156", + "¾": "\xBE", + "¾": "\xBE", + "⅗": "\u2157", + "⅜": "\u215C", + "⅘": "\u2158", + "⅚": "\u215A", + "⅝": "\u215D", + "⅞": "\u215E", + "⁄": "\u2044", + "⌢": "\u2322", + "𝒻": "\u{1D4BB}", + "≧": "\u2267", + "⪌": "\u2A8C", + "ǵ": "\u01F5", + "γ": "\u03B3", + "ϝ": "\u03DD", + "⪆": "\u2A86", + "ğ": "\u011F", + "ĝ": "\u011D", + "г": "\u0433", + "ġ": "\u0121", + "≥": "\u2265", + "⋛": "\u22DB", + "≥": "\u2265", + "≧": "\u2267", + "⩾": "\u2A7E", + "⩾": "\u2A7E", + "⪩": "\u2AA9", + "⪀": "\u2A80", + "⪂": "\u2A82", + "⪄": "\u2A84", + "⋛︀": "\u22DB\uFE00", + "⪔": "\u2A94", + "𝔤": "\u{1D524}", + "≫": "\u226B", + "⋙": "\u22D9", + "ℷ": "\u2137", + "ѓ": "\u0453", + "≷": "\u2277", + "⪒": "\u2A92", + "⪥": "\u2AA5", + "⪤": "\u2AA4", + "≩": "\u2269", + "⪊": "\u2A8A", + "⪊": "\u2A8A", + "⪈": "\u2A88", + "⪈": "\u2A88", + "≩": "\u2269", + "⋧": "\u22E7", + "𝕘": "\u{1D558}", + "`": "`", + "ℊ": "\u210A", + "≳": "\u2273", + "⪎": "\u2A8E", + "⪐": "\u2A90", + ">": ">", + ">": ">", + "⪧": "\u2AA7", + "⩺": "\u2A7A", + "⋗": "\u22D7", + "⦕": "\u2995", + "⩼": "\u2A7C", + "⪆": "\u2A86", + "⥸": "\u2978", + "⋗": "\u22D7", + "⋛": "\u22DB", + "⪌": "\u2A8C", + "≷": "\u2277", + "≳": "\u2273", + "≩︀": "\u2269\uFE00", + "≩︀": "\u2269\uFE00", + "⇔": "\u21D4", + " ": "\u200A", + "½": "\xBD", + "ℋ": "\u210B", + "ъ": "\u044A", + "↔": "\u2194", + "⥈": "\u2948", + "↭": "\u21AD", + "ℏ": "\u210F", + "ĥ": "\u0125", + "♥": "\u2665", + "♥": "\u2665", + "…": "\u2026", + "⊹": "\u22B9", + "𝔥": "\u{1D525}", + "⤥": "\u2925", + "⤦": "\u2926", + "⇿": "\u21FF", + "∻": "\u223B", + "↩": "\u21A9", + "↪": "\u21AA", + "𝕙": "\u{1D559}", + "―": "\u2015", + "𝒽": "\u{1D4BD}", + "ℏ": "\u210F", + "ħ": "\u0127", + "⁃": "\u2043", + "‐": "\u2010", + "í": "\xED", + "í": "\xED", + "⁣": "\u2063", + "î": "\xEE", + "î": "\xEE", + "и": "\u0438", + "е": "\u0435", + "¡": "\xA1", + "¡": "\xA1", + "⇔": "\u21D4", + "𝔦": "\u{1D526}", + "ì": "\xEC", + "ì": "\xEC", + "ⅈ": "\u2148", + "⨌": "\u2A0C", + "∭": "\u222D", + "⧜": "\u29DC", + "℩": "\u2129", + "ij": "\u0133", + "ī": "\u012B", + "ℑ": "\u2111", + "ℐ": "\u2110", + "ℑ": "\u2111", + "ı": "\u0131", + "⊷": "\u22B7", + "Ƶ": "\u01B5", + "∈": "\u2208", + "℅": "\u2105", + "∞": "\u221E", + "⧝": "\u29DD", + "ı": "\u0131", + "∫": "\u222B", + "⊺": "\u22BA", + "ℤ": "\u2124", + "⊺": "\u22BA", + "⨗": "\u2A17", + "⨼": "\u2A3C", + "ё": "\u0451", + "į": "\u012F", + "𝕚": "\u{1D55A}", + "ι": "\u03B9", + "⨼": "\u2A3C", + "¿": "\xBF", + "¿": "\xBF", + "𝒾": "\u{1D4BE}", + "∈": "\u2208", + "⋹": "\u22F9", + "⋵": "\u22F5", + "⋴": "\u22F4", + "⋳": "\u22F3", + "∈": "\u2208", + "⁢": "\u2062", + "ĩ": "\u0129", + "і": "\u0456", + "ï": "\xEF", + "ï": "\xEF", + "ĵ": "\u0135", + "й": "\u0439", + "𝔧": "\u{1D527}", + "ȷ": "\u0237", + "𝕛": "\u{1D55B}", + "𝒿": "\u{1D4BF}", + "ј": "\u0458", + "є": "\u0454", + "κ": "\u03BA", + "ϰ": "\u03F0", + "ķ": "\u0137", + "к": "\u043A", + "𝔨": "\u{1D528}", + "ĸ": "\u0138", + "х": "\u0445", + "ќ": "\u045C", + "𝕜": "\u{1D55C}", + "𝓀": "\u{1D4C0}", + "⇚": "\u21DA", + "⇐": "\u21D0", + "⤛": "\u291B", + "⤎": "\u290E", + "≦": "\u2266", + "⪋": "\u2A8B", + "⥢": "\u2962", + "ĺ": "\u013A", + "⦴": "\u29B4", + "ℒ": "\u2112", + "λ": "\u03BB", + "⟨": "\u27E8", + "⦑": "\u2991", + "⟨": "\u27E8", + "⪅": "\u2A85", + "«": "\xAB", + "«": "\xAB", + "←": "\u2190", + "⇤": "\u21E4", + "⤟": "\u291F", + "⤝": "\u291D", + "↩": "\u21A9", + "↫": "\u21AB", + "⤹": "\u2939", + "⥳": "\u2973", + "↢": "\u21A2", + "⪫": "\u2AAB", + "⤙": "\u2919", + "⪭": "\u2AAD", + "⪭︀": "\u2AAD\uFE00", + "⤌": "\u290C", + "❲": "\u2772", + "{": "{", + "[": "[", + "⦋": "\u298B", + "⦏": "\u298F", + "⦍": "\u298D", + "ľ": "\u013E", + "ļ": "\u013C", + "⌈": "\u2308", + "{": "{", + "л": "\u043B", + "⤶": "\u2936", + "“": "\u201C", + "„": "\u201E", + "⥧": "\u2967", + "⥋": "\u294B", + "↲": "\u21B2", + "≤": "\u2264", + "←": "\u2190", + "↢": "\u21A2", + "↽": "\u21BD", + "↼": "\u21BC", + "⇇": "\u21C7", + "↔": "\u2194", + "⇆": "\u21C6", + "⇋": "\u21CB", + "↭": "\u21AD", + "⋋": "\u22CB", + "⋚": "\u22DA", + "≤": "\u2264", + "≦": "\u2266", + "⩽": "\u2A7D", + "⩽": "\u2A7D", + "⪨": "\u2AA8", + "⩿": "\u2A7F", + "⪁": "\u2A81", + "⪃": "\u2A83", + "⋚︀": "\u22DA\uFE00", + "⪓": "\u2A93", + "⪅": "\u2A85", + "⋖": "\u22D6", + "⋚": "\u22DA", + "⪋": "\u2A8B", + "≶": "\u2276", + "≲": "\u2272", + "⥼": "\u297C", + "⌊": "\u230A", + "𝔩": "\u{1D529}", + "≶": "\u2276", + "⪑": "\u2A91", + "↽": "\u21BD", + "↼": "\u21BC", + "⥪": "\u296A", + "▄": "\u2584", + "љ": "\u0459", + "≪": "\u226A", + "⇇": "\u21C7", + "⌞": "\u231E", + "⥫": "\u296B", + "◺": "\u25FA", + "ŀ": "\u0140", + "⎰": "\u23B0", + "⎰": "\u23B0", + "≨": "\u2268", + "⪉": "\u2A89", + "⪉": "\u2A89", + "⪇": "\u2A87", + "⪇": "\u2A87", + "≨": "\u2268", + "⋦": "\u22E6", + "⟬": "\u27EC", + "⇽": "\u21FD", + "⟦": "\u27E6", + "⟵": "\u27F5", + "⟷": "\u27F7", + "⟼": "\u27FC", + "⟶": "\u27F6", + "↫": "\u21AB", + "↬": "\u21AC", + "⦅": "\u2985", + "𝕝": "\u{1D55D}", + "⨭": "\u2A2D", + "⨴": "\u2A34", + "∗": "\u2217", + "_": "_", + "◊": "\u25CA", + "◊": "\u25CA", + "⧫": "\u29EB", + "(": "(", + "⦓": "\u2993", + "⇆": "\u21C6", + "⌟": "\u231F", + "⇋": "\u21CB", + "⥭": "\u296D", + "‎": "\u200E", + "⊿": "\u22BF", + "‹": "\u2039", + "𝓁": "\u{1D4C1}", + "↰": "\u21B0", + "≲": "\u2272", + "⪍": "\u2A8D", + "⪏": "\u2A8F", + "[": "[", + "‘": "\u2018", + "‚": "\u201A", + "ł": "\u0142", + "<": "<", + "<": "<", + "⪦": "\u2AA6", + "⩹": "\u2A79", + "⋖": "\u22D6", + "⋋": "\u22CB", + "⋉": "\u22C9", + "⥶": "\u2976", + "⩻": "\u2A7B", + "⦖": "\u2996", + "◃": "\u25C3", + "⊴": "\u22B4", + "◂": "\u25C2", + "⥊": "\u294A", + "⥦": "\u2966", + "≨︀": "\u2268\uFE00", + "≨︀": "\u2268\uFE00", + "∺": "\u223A", + "¯": "\xAF", + "¯": "\xAF", + "♂": "\u2642", + "✠": "\u2720", + "✠": "\u2720", + "↦": "\u21A6", + "↦": "\u21A6", + "↧": "\u21A7", + "↤": "\u21A4", + "↥": "\u21A5", + "▮": "\u25AE", + "⨩": "\u2A29", + "м": "\u043C", + "—": "\u2014", + "∡": "\u2221", + "𝔪": "\u{1D52A}", + "℧": "\u2127", + "µ": "\xB5", + "µ": "\xB5", + "∣": "\u2223", + "*": "*", + "⫰": "\u2AF0", + "·": "\xB7", + "·": "\xB7", + "−": "\u2212", + "⊟": "\u229F", + "∸": "\u2238", + "⨪": "\u2A2A", + "⫛": "\u2ADB", + "…": "\u2026", + "∓": "\u2213", + "⊧": "\u22A7", + "𝕞": "\u{1D55E}", + "∓": "\u2213", + "𝓂": "\u{1D4C2}", + "∾": "\u223E", + "μ": "\u03BC", + "⊸": "\u22B8", + "⊸": "\u22B8", + "⋙̸": "\u22D9\u0338", + "≫⃒": "\u226B\u20D2", + "≫̸": "\u226B\u0338", + "⇍": "\u21CD", + "⇎": "\u21CE", + "⋘̸": "\u22D8\u0338", + "≪⃒": "\u226A\u20D2", + "≪̸": "\u226A\u0338", + "⇏": "\u21CF", + "⊯": "\u22AF", + "⊮": "\u22AE", + "∇": "\u2207", + "ń": "\u0144", + "∠⃒": "\u2220\u20D2", + "≉": "\u2249", + "⩰̸": "\u2A70\u0338", + "≋̸": "\u224B\u0338", + "ʼn": "\u0149", + "≉": "\u2249", + "♮": "\u266E", + "♮": "\u266E", + "ℕ": "\u2115", + " ": "\xA0", + " ": "\xA0", + "≎̸": "\u224E\u0338", + "≏̸": "\u224F\u0338", + "⩃": "\u2A43", + "ň": "\u0148", + "ņ": "\u0146", + "≇": "\u2247", + "⩭̸": "\u2A6D\u0338", + "⩂": "\u2A42", + "н": "\u043D", + "–": "\u2013", + "≠": "\u2260", + "⇗": "\u21D7", + "⤤": "\u2924", + "↗": "\u2197", + "↗": "\u2197", + "≐̸": "\u2250\u0338", + "≢": "\u2262", + "⤨": "\u2928", + "≂̸": "\u2242\u0338", + "∄": "\u2204", + "∄": "\u2204", + "𝔫": "\u{1D52B}", + "≧̸": "\u2267\u0338", + "≱": "\u2271", + "≱": "\u2271", + "≧̸": "\u2267\u0338", + "⩾̸": "\u2A7E\u0338", + "⩾̸": "\u2A7E\u0338", + "≵": "\u2275", + "≯": "\u226F", + "≯": "\u226F", + "⇎": "\u21CE", + "↮": "\u21AE", + "⫲": "\u2AF2", + "∋": "\u220B", + "⋼": "\u22FC", + "⋺": "\u22FA", + "∋": "\u220B", + "њ": "\u045A", + "⇍": "\u21CD", + "≦̸": "\u2266\u0338", + "↚": "\u219A", + "‥": "\u2025", + "≰": "\u2270", + "↚": "\u219A", + "↮": "\u21AE", + "≰": "\u2270", + "≦̸": "\u2266\u0338", + "⩽̸": "\u2A7D\u0338", + "⩽̸": "\u2A7D\u0338", + "≮": "\u226E", + "≴": "\u2274", + "≮": "\u226E", + "⋪": "\u22EA", + "⋬": "\u22EC", + "∤": "\u2224", + "𝕟": "\u{1D55F}", + "¬": "\xAC", + "¬": "\xAC", + "∉": "\u2209", + "⋹̸": "\u22F9\u0338", + "⋵̸": "\u22F5\u0338", + "∉": "\u2209", + "⋷": "\u22F7", + "⋶": "\u22F6", + "∌": "\u220C", + "∌": "\u220C", + "⋾": "\u22FE", + "⋽": "\u22FD", + "∦": "\u2226", + "∦": "\u2226", + "⫽⃥": "\u2AFD\u20E5", + "∂̸": "\u2202\u0338", + "⨔": "\u2A14", + "⊀": "\u2280", + "⋠": "\u22E0", + "⪯̸": "\u2AAF\u0338", + "⊀": "\u2280", + "⪯̸": "\u2AAF\u0338", + "⇏": "\u21CF", + "↛": "\u219B", + "⤳̸": "\u2933\u0338", + "↝̸": "\u219D\u0338", + "↛": "\u219B", + "⋫": "\u22EB", + "⋭": "\u22ED", + "⊁": "\u2281", + "⋡": "\u22E1", + "⪰̸": "\u2AB0\u0338", + "𝓃": "\u{1D4C3}", + "∤": "\u2224", + "∦": "\u2226", + "≁": "\u2241", + "≄": "\u2244", + "≄": "\u2244", + "∤": "\u2224", + "∦": "\u2226", + "⋢": "\u22E2", + "⋣": "\u22E3", + "⊄": "\u2284", + "⫅̸": "\u2AC5\u0338", + "⊈": "\u2288", + "⊂⃒": "\u2282\u20D2", + "⊈": "\u2288", + "⫅̸": "\u2AC5\u0338", + "⊁": "\u2281", + "⪰̸": "\u2AB0\u0338", + "⊅": "\u2285", + "⫆̸": "\u2AC6\u0338", + "⊉": "\u2289", + "⊃⃒": "\u2283\u20D2", + "⊉": "\u2289", + "⫆̸": "\u2AC6\u0338", + "≹": "\u2279", + "ñ": "\xF1", + "ñ": "\xF1", + "≸": "\u2278", + "⋪": "\u22EA", + "⋬": "\u22EC", + "⋫": "\u22EB", + "⋭": "\u22ED", + "ν": "\u03BD", + "#": "#", + "№": "\u2116", + " ": "\u2007", + "⊭": "\u22AD", + "⤄": "\u2904", + "≍⃒": "\u224D\u20D2", + "⊬": "\u22AC", + "≥⃒": "\u2265\u20D2", + ">⃒": ">\u20D2", + "⧞": "\u29DE", + "⤂": "\u2902", + "≤⃒": "\u2264\u20D2", + "<⃒": "<\u20D2", + "⊴⃒": "\u22B4\u20D2", + "⤃": "\u2903", + "⊵⃒": "\u22B5\u20D2", + "∼⃒": "\u223C\u20D2", + "⇖": "\u21D6", + "⤣": "\u2923", + "↖": "\u2196", + "↖": "\u2196", + "⤧": "\u2927", + "Ⓢ": "\u24C8", + "ó": "\xF3", + "ó": "\xF3", + "⊛": "\u229B", + "⊚": "\u229A", + "ô": "\xF4", + "ô": "\xF4", + "о": "\u043E", + "⊝": "\u229D", + "ő": "\u0151", + "⨸": "\u2A38", + "⊙": "\u2299", + "⦼": "\u29BC", + "œ": "\u0153", + "⦿": "\u29BF", + "𝔬": "\u{1D52C}", + "˛": "\u02DB", + "ò": "\xF2", + "ò": "\xF2", + "⧁": "\u29C1", + "⦵": "\u29B5", + "Ω": "\u03A9", + "∮": "\u222E", + "↺": "\u21BA", + "⦾": "\u29BE", + "⦻": "\u29BB", + "‾": "\u203E", + "⧀": "\u29C0", + "ō": "\u014D", + "ω": "\u03C9", + "ο": "\u03BF", + "⦶": "\u29B6", + "⊖": "\u2296", + "𝕠": "\u{1D560}", + "⦷": "\u29B7", + "⦹": "\u29B9", + "⊕": "\u2295", + "∨": "\u2228", + "↻": "\u21BB", + "⩝": "\u2A5D", + "ℴ": "\u2134", + "ℴ": "\u2134", + "ª": "\xAA", + "ª": "\xAA", + "º": "\xBA", + "º": "\xBA", + "⊶": "\u22B6", + "⩖": "\u2A56", + "⩗": "\u2A57", + "⩛": "\u2A5B", + "ℴ": "\u2134", + "ø": "\xF8", + "ø": "\xF8", + "⊘": "\u2298", + "õ": "\xF5", + "õ": "\xF5", + "⊗": "\u2297", + "⨶": "\u2A36", + "ö": "\xF6", + "ö": "\xF6", + "⌽": "\u233D", + "∥": "\u2225", + "¶": "\xB6", + "¶": "\xB6", + "∥": "\u2225", + "⫳": "\u2AF3", + "⫽": "\u2AFD", + "∂": "\u2202", + "п": "\u043F", + "%": "%", + ".": ".", + "‰": "\u2030", + "⊥": "\u22A5", + "‱": "\u2031", + "𝔭": "\u{1D52D}", + "φ": "\u03C6", + "ϕ": "\u03D5", + "ℳ": "\u2133", + "☎": "\u260E", + "π": "\u03C0", + "⋔": "\u22D4", + "ϖ": "\u03D6", + "ℏ": "\u210F", + "ℎ": "\u210E", + "ℏ": "\u210F", + "+": "+", + "⨣": "\u2A23", + "⊞": "\u229E", + "⨢": "\u2A22", + "∔": "\u2214", + "⨥": "\u2A25", + "⩲": "\u2A72", + "±": "\xB1", + "±": "\xB1", + "⨦": "\u2A26", + "⨧": "\u2A27", + "±": "\xB1", + "⨕": "\u2A15", + "𝕡": "\u{1D561}", + "£": "\xA3", + "£": "\xA3", + "≺": "\u227A", + "⪳": "\u2AB3", + "⪷": "\u2AB7", + "≼": "\u227C", + "⪯": "\u2AAF", + "≺": "\u227A", + "⪷": "\u2AB7", + "≼": "\u227C", + "⪯": "\u2AAF", + "⪹": "\u2AB9", + "⪵": "\u2AB5", + "⋨": "\u22E8", + "≾": "\u227E", + "′": "\u2032", + "ℙ": "\u2119", + "⪵": "\u2AB5", + "⪹": "\u2AB9", + "⋨": "\u22E8", + "∏": "\u220F", + "⌮": "\u232E", + "⌒": "\u2312", + "⌓": "\u2313", + "∝": "\u221D", + "∝": "\u221D", + "≾": "\u227E", + "⊰": "\u22B0", + "𝓅": "\u{1D4C5}", + "ψ": "\u03C8", + " ": "\u2008", + "𝔮": "\u{1D52E}", + "⨌": "\u2A0C", + "𝕢": "\u{1D562}", + "⁗": "\u2057", + "𝓆": "\u{1D4C6}", + "ℍ": "\u210D", + "⨖": "\u2A16", + "?": "?", + "≟": "\u225F", + """: '"', + """: '"', + "⇛": "\u21DB", + "⇒": "\u21D2", + "⤜": "\u291C", + "⤏": "\u290F", + "⥤": "\u2964", + "∽̱": "\u223D\u0331", + "ŕ": "\u0155", + "√": "\u221A", + "⦳": "\u29B3", + "⟩": "\u27E9", + "⦒": "\u2992", + "⦥": "\u29A5", + "⟩": "\u27E9", + "»": "\xBB", + "»": "\xBB", + "→": "\u2192", + "⥵": "\u2975", + "⇥": "\u21E5", + "⤠": "\u2920", + "⤳": "\u2933", + "⤞": "\u291E", + "↪": "\u21AA", + "↬": "\u21AC", + "⥅": "\u2945", + "⥴": "\u2974", + "↣": "\u21A3", + "↝": "\u219D", + "⤚": "\u291A", + "∶": "\u2236", + "ℚ": "\u211A", + "⤍": "\u290D", + "❳": "\u2773", + "}": "}", + "]": "]", + "⦌": "\u298C", + "⦎": "\u298E", + "⦐": "\u2990", + "ř": "\u0159", + "ŗ": "\u0157", + "⌉": "\u2309", + "}": "}", + "р": "\u0440", + "⤷": "\u2937", + "⥩": "\u2969", + "”": "\u201D", + "”": "\u201D", + "↳": "\u21B3", + "ℜ": "\u211C", + "ℛ": "\u211B", + "ℜ": "\u211C", + "ℝ": "\u211D", + "▭": "\u25AD", + "®": "\xAE", + "®": "\xAE", + "⥽": "\u297D", + "⌋": "\u230B", + "𝔯": "\u{1D52F}", + "⇁": "\u21C1", + "⇀": "\u21C0", + "⥬": "\u296C", + "ρ": "\u03C1", + "ϱ": "\u03F1", + "→": "\u2192", + "↣": "\u21A3", + "⇁": "\u21C1", + "⇀": "\u21C0", + "⇄": "\u21C4", + "⇌": "\u21CC", + "⇉": "\u21C9", + "↝": "\u219D", + "⋌": "\u22CC", + "˚": "\u02DA", + "≓": "\u2253", + "⇄": "\u21C4", + "⇌": "\u21CC", + "‏": "\u200F", + "⎱": "\u23B1", + "⎱": "\u23B1", + "⫮": "\u2AEE", + "⟭": "\u27ED", + "⇾": "\u21FE", + "⟧": "\u27E7", + "⦆": "\u2986", + "𝕣": "\u{1D563}", + "⨮": "\u2A2E", + "⨵": "\u2A35", + ")": ")", + "⦔": "\u2994", + "⨒": "\u2A12", + "⇉": "\u21C9", + "›": "\u203A", + "𝓇": "\u{1D4C7}", + "↱": "\u21B1", + "]": "]", + "’": "\u2019", + "’": "\u2019", + "⋌": "\u22CC", + "⋊": "\u22CA", + "▹": "\u25B9", + "⊵": "\u22B5", + "▸": "\u25B8", + "⧎": "\u29CE", + "⥨": "\u2968", + "℞": "\u211E", + "ś": "\u015B", + "‚": "\u201A", + "≻": "\u227B", + "⪴": "\u2AB4", + "⪸": "\u2AB8", + "š": "\u0161", + "≽": "\u227D", + "⪰": "\u2AB0", + "ş": "\u015F", + "ŝ": "\u015D", + "⪶": "\u2AB6", + "⪺": "\u2ABA", + "⋩": "\u22E9", + "⨓": "\u2A13", + "≿": "\u227F", + "с": "\u0441", + "⋅": "\u22C5", + "⊡": "\u22A1", + "⩦": "\u2A66", + "⇘": "\u21D8", + "⤥": "\u2925", + "↘": "\u2198", + "↘": "\u2198", + "§": "\xA7", + "§": "\xA7", + ";": ";", + "⤩": "\u2929", + "∖": "\u2216", + "∖": "\u2216", + "✶": "\u2736", + "𝔰": "\u{1D530}", + "⌢": "\u2322", + "♯": "\u266F", + "щ": "\u0449", + "ш": "\u0448", + "∣": "\u2223", + "∥": "\u2225", + "­": "\xAD", + "­": "\xAD", + "σ": "\u03C3", + "ς": "\u03C2", + "ς": "\u03C2", + "∼": "\u223C", + "⩪": "\u2A6A", + "≃": "\u2243", + "≃": "\u2243", + "⪞": "\u2A9E", + "⪠": "\u2AA0", + "⪝": "\u2A9D", + "⪟": "\u2A9F", + "≆": "\u2246", + "⨤": "\u2A24", + "⥲": "\u2972", + "←": "\u2190", + "∖": "\u2216", + "⨳": "\u2A33", + "⧤": "\u29E4", + "∣": "\u2223", + "⌣": "\u2323", + "⪪": "\u2AAA", + "⪬": "\u2AAC", + "⪬︀": "\u2AAC\uFE00", + "ь": "\u044C", + "/": "/", + "⧄": "\u29C4", + "⌿": "\u233F", + "𝕤": "\u{1D564}", + "♠": "\u2660", + "♠": "\u2660", + "∥": "\u2225", + "⊓": "\u2293", + "⊓︀": "\u2293\uFE00", + "⊔": "\u2294", + "⊔︀": "\u2294\uFE00", + "⊏": "\u228F", + "⊑": "\u2291", + "⊏": "\u228F", + "⊑": "\u2291", + "⊐": "\u2290", + "⊒": "\u2292", + "⊐": "\u2290", + "⊒": "\u2292", + "□": "\u25A1", + "□": "\u25A1", + "▪": "\u25AA", + "▪": "\u25AA", + "→": "\u2192", + "𝓈": "\u{1D4C8}", + "∖": "\u2216", + "⌣": "\u2323", + "⋆": "\u22C6", + "☆": "\u2606", + "★": "\u2605", + "ϵ": "\u03F5", + "ϕ": "\u03D5", + "¯": "\xAF", + "⊂": "\u2282", + "⫅": "\u2AC5", + "⪽": "\u2ABD", + "⊆": "\u2286", + "⫃": "\u2AC3", + "⫁": "\u2AC1", + "⫋": "\u2ACB", + "⊊": "\u228A", + "⪿": "\u2ABF", + "⥹": "\u2979", + "⊂": "\u2282", + "⊆": "\u2286", + "⫅": "\u2AC5", + "⊊": "\u228A", + "⫋": "\u2ACB", + "⫇": "\u2AC7", + "⫕": "\u2AD5", + "⫓": "\u2AD3", + "≻": "\u227B", + "⪸": "\u2AB8", + "≽": "\u227D", + "⪰": "\u2AB0", + "⪺": "\u2ABA", + "⪶": "\u2AB6", + "⋩": "\u22E9", + "≿": "\u227F", + "∑": "\u2211", + "♪": "\u266A", + "¹": "\xB9", + "¹": "\xB9", + "²": "\xB2", + "²": "\xB2", + "³": "\xB3", + "³": "\xB3", + "⊃": "\u2283", + "⫆": "\u2AC6", + "⪾": "\u2ABE", + "⫘": "\u2AD8", + "⊇": "\u2287", + "⫄": "\u2AC4", + "⟉": "\u27C9", + "⫗": "\u2AD7", + "⥻": "\u297B", + "⫂": "\u2AC2", + "⫌": "\u2ACC", + "⊋": "\u228B", + "⫀": "\u2AC0", + "⊃": "\u2283", + "⊇": "\u2287", + "⫆": "\u2AC6", + "⊋": "\u228B", + "⫌": "\u2ACC", + "⫈": "\u2AC8", + "⫔": "\u2AD4", + "⫖": "\u2AD6", + "⇙": "\u21D9", + "⤦": "\u2926", + "↙": "\u2199", + "↙": "\u2199", + "⤪": "\u292A", + "ß": "\xDF", + "ß": "\xDF", + "⌖": "\u2316", + "τ": "\u03C4", + "⎴": "\u23B4", + "ť": "\u0165", + "ţ": "\u0163", + "т": "\u0442", + "⃛": "\u20DB", + "⌕": "\u2315", + "𝔱": "\u{1D531}", + "∴": "\u2234", + "∴": "\u2234", + "θ": "\u03B8", + "ϑ": "\u03D1", + "ϑ": "\u03D1", + "≈": "\u2248", + "∼": "\u223C", + " ": "\u2009", + "≈": "\u2248", + "∼": "\u223C", + "þ": "\xFE", + "þ": "\xFE", + "˜": "\u02DC", + "×": "\xD7", + "×": "\xD7", + "⊠": "\u22A0", + "⨱": "\u2A31", + "⨰": "\u2A30", + "∭": "\u222D", + "⤨": "\u2928", + "⊤": "\u22A4", + "⌶": "\u2336", + "⫱": "\u2AF1", + "𝕥": "\u{1D565}", + "⫚": "\u2ADA", + "⤩": "\u2929", + "‴": "\u2034", + "™": "\u2122", + "▵": "\u25B5", + "▿": "\u25BF", + "◃": "\u25C3", + "⊴": "\u22B4", + "≜": "\u225C", + "▹": "\u25B9", + "⊵": "\u22B5", + "◬": "\u25EC", + "≜": "\u225C", + "⨺": "\u2A3A", + "⨹": "\u2A39", + "⧍": "\u29CD", + "⨻": "\u2A3B", + "⏢": "\u23E2", + "𝓉": "\u{1D4C9}", + "ц": "\u0446", + "ћ": "\u045B", + "ŧ": "\u0167", + "≬": "\u226C", + "↞": "\u219E", + "↠": "\u21A0", + "⇑": "\u21D1", + "⥣": "\u2963", + "ú": "\xFA", + "ú": "\xFA", + "↑": "\u2191", + "ў": "\u045E", + "ŭ": "\u016D", + "û": "\xFB", + "û": "\xFB", + "у": "\u0443", + "⇅": "\u21C5", + "ű": "\u0171", + "⥮": "\u296E", + "⥾": "\u297E", + "𝔲": "\u{1D532}", + "ù": "\xF9", + "ù": "\xF9", + "↿": "\u21BF", + "↾": "\u21BE", + "▀": "\u2580", + "⌜": "\u231C", + "⌜": "\u231C", + "⌏": "\u230F", + "◸": "\u25F8", + "ū": "\u016B", + "¨": "\xA8", + "¨": "\xA8", + "ų": "\u0173", + "𝕦": "\u{1D566}", + "↑": "\u2191", + "↕": "\u2195", + "↿": "\u21BF", + "↾": "\u21BE", + "⊎": "\u228E", + "υ": "\u03C5", + "ϒ": "\u03D2", + "υ": "\u03C5", + "⇈": "\u21C8", + "⌝": "\u231D", + "⌝": "\u231D", + "⌎": "\u230E", + "ů": "\u016F", + "◹": "\u25F9", + "𝓊": "\u{1D4CA}", + "⋰": "\u22F0", + "ũ": "\u0169", + "▵": "\u25B5", + "▴": "\u25B4", + "⇈": "\u21C8", + "ü": "\xFC", + "ü": "\xFC", + "⦧": "\u29A7", + "⇕": "\u21D5", + "⫨": "\u2AE8", + "⫩": "\u2AE9", + "⊨": "\u22A8", + "⦜": "\u299C", + "ϵ": "\u03F5", + "ϰ": "\u03F0", + "∅": "\u2205", + "ϕ": "\u03D5", + "ϖ": "\u03D6", + "∝": "\u221D", + "↕": "\u2195", + "ϱ": "\u03F1", + "ς": "\u03C2", + "⊊︀": "\u228A\uFE00", + "⫋︀": "\u2ACB\uFE00", + "⊋︀": "\u228B\uFE00", + "⫌︀": "\u2ACC\uFE00", + "ϑ": "\u03D1", + "⊲": "\u22B2", + "⊳": "\u22B3", + "в": "\u0432", + "⊢": "\u22A2", + "∨": "\u2228", + "⊻": "\u22BB", + "≚": "\u225A", + "⋮": "\u22EE", + "|": "|", + "|": "|", + "𝔳": "\u{1D533}", + "⊲": "\u22B2", + "⊂⃒": "\u2282\u20D2", + "⊃⃒": "\u2283\u20D2", + "𝕧": "\u{1D567}", + "∝": "\u221D", + "⊳": "\u22B3", + "𝓋": "\u{1D4CB}", + "⫋︀": "\u2ACB\uFE00", + "⊊︀": "\u228A\uFE00", + "⫌︀": "\u2ACC\uFE00", + "⊋︀": "\u228B\uFE00", + "⦚": "\u299A", + "ŵ": "\u0175", + "⩟": "\u2A5F", + "∧": "\u2227", + "≙": "\u2259", + "℘": "\u2118", + "𝔴": "\u{1D534}", + "𝕨": "\u{1D568}", + "℘": "\u2118", + "≀": "\u2240", + "≀": "\u2240", + "𝓌": "\u{1D4CC}", + "⋂": "\u22C2", + "◯": "\u25EF", + "⋃": "\u22C3", + "▽": "\u25BD", + "𝔵": "\u{1D535}", + "⟺": "\u27FA", + "⟷": "\u27F7", + "ξ": "\u03BE", + "⟸": "\u27F8", + "⟵": "\u27F5", + "⟼": "\u27FC", + "⋻": "\u22FB", + "⨀": "\u2A00", + "𝕩": "\u{1D569}", + "⨁": "\u2A01", + "⨂": "\u2A02", + "⟹": "\u27F9", + "⟶": "\u27F6", + "𝓍": "\u{1D4CD}", + "⨆": "\u2A06", + "⨄": "\u2A04", + "△": "\u25B3", + "⋁": "\u22C1", + "⋀": "\u22C0", + "ý": "\xFD", + "ý": "\xFD", + "я": "\u044F", + "ŷ": "\u0177", + "ы": "\u044B", + "¥": "\xA5", + "¥": "\xA5", + "𝔶": "\u{1D536}", + "ї": "\u0457", + "𝕪": "\u{1D56A}", + "𝓎": "\u{1D4CE}", + "ю": "\u044E", + "ÿ": "\xFF", + "ÿ": "\xFF", + "ź": "\u017A", + "ž": "\u017E", + "з": "\u0437", + "ż": "\u017C", + "ℨ": "\u2128", + "ζ": "\u03B6", + "𝔷": "\u{1D537}", + "ж": "\u0436", + "⇝": "\u21DD", + "𝕫": "\u{1D56B}", + "𝓏": "\u{1D4CF}", + "‍": "\u200D", + "‌": "\u200C" +}, html_entities_default = htmlEntities; + +// ../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/text-format.js +function decodeHTMLEntities(str) { + return str.replace(/&(#\d+|#x[a-f0-9]+|[a-z]+\d*);?/gi, (match, entity) => { + if (typeof html_entities_default[match] == "string") + return html_entities_default[match]; + if (entity.charAt(0) !== "#" || match.charAt(match.length - 1) !== ";") + return match; + let codePoint; + entity.charAt(1) === "x" ? codePoint = parseInt(entity.substr(2), 16) : codePoint = parseInt(entity.substr(1), 10); + var output = ""; + return codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111 ? "\uFFFD" : (codePoint > 65535 && (codePoint -= 65536, output += String.fromCharCode(codePoint >>> 10 & 1023 | 55296), codePoint = 56320 | codePoint & 1023), output += String.fromCharCode(codePoint), output); + }); +} +function escapeHtml(str) { + return str.trim().replace(/[<>"'?&]/g, (c) => { + let hex = c.charCodeAt(0).toString(16); + return hex.length < 2 && (hex = "0" + hex), "&#x" + hex.toUpperCase() + ";"; + }); +} +function textToHtml(str) { + return "

" + escapeHtml(str).replace(/\n/g, "
") + "
"; +} +function htmlToText(str) { + return str = str.replace(/\r?\n/g, "").replace(/<\!\-\-.*?\-\->/gi, " ").replace(/]*>/gi, ` +`).replace(/<\/?(p|div|table|tr|td|th)\b[^>]*>/gi, ` + +`).replace(/]*>.*?<\/script\b[^>]*>/gi, " ").replace(/^.*]*>/i, "").replace(/^.*<\/head\b[^>]*>/i, "").replace(/^.*<\!doctype\b[^>]*>/i, "").replace(/<\/body\b[^>]*>.*$/i, "").replace(/<\/html\b[^>]*>.*$/i, "").replace(/]*href\s*=\s*["']?([^\s"']+)[^>]*>/gi, " ($1) ").replace(/<\/?(span|em|i|strong|b|u|a)\b[^>]*>/gi, "").replace(/]*>[\n\u0001\s]*/gi, "* ").replace(/]*>/g, ` +------------- +`).replace(/<[^>]*>/g, " ").replace(/\u0001/g, ` +`).replace(/[ \t]+/g, " ").replace(/^\s+$/gm, "").replace(/\n\n+/g, ` + +`).replace(/^\n+/, ` +`).replace(/\n+$/, ` +`), str = decodeHTMLEntities(str), str; +} +function formatTextAddress(address) { + return [].concat(address.name || []).concat(address.name ? `<${address.address}>` : address.address).join(" "); +} +function formatTextAddresses(addresses) { + let parts = [], processAddress = (address, partCounter) => { + if (partCounter && parts.push(", "), address.group) { + let groupStart = `${address.name}:`, groupEnd = ";"; + parts.push(groupStart), address.group.forEach(processAddress), parts.push(groupEnd); + } else + parts.push(formatTextAddress(address)); + }; + return addresses.forEach(processAddress), parts.join(""); +} +function formatHtmlAddress(address) { + return ``; +} +function formatHtmlAddresses(addresses) { + let parts = [], processAddress = (address, partCounter) => { + if (partCounter && parts.push(''), address.group) { + let groupStart = ``, groupEnd = ''; + parts.push(groupStart), address.group.forEach(processAddress), parts.push(groupEnd); + } else + parts.push(formatHtmlAddress(address)); + }; + return addresses.forEach(processAddress), parts.join(" "); +} +function foldLines(str, lineLength, afterSpace) { + str = (str || "").toString(), lineLength = lineLength || 76; + let pos = 0, len = str.length, result = "", line, match; + for (; pos < len; ) { + if (line = str.substr(pos, lineLength), line.length < lineLength) { + result += line; + break; + } + if (match = line.match(/^[^\n\r]*(\r?\n|\r)/)) { + line = match[0], result += line, pos += line.length; + continue; + } else (match = line.match(/(\s+)[^\s]*$/)) && match[0].length - (afterSpace ? (match[1] || "").length : 0) < line.length ? line = line.substr(0, line.length - (match[0].length - (afterSpace ? (match[1] || "").length : 0))) : (match = str.substr(pos + line.length).match(/^[^\s]+(\s*)/)) && (line = line + match[0].substr(0, match[0].length - (afterSpace ? 0 : (match[1] || "").length))); + result += line, pos += line.length, pos < len && (result += `\r +`); + } + return result; +} +function formatTextHeader(message) { + let rows = []; + if (message.from && rows.push({ key: "From", val: formatTextAddress(message.from) }), message.subject && rows.push({ key: "Subject", val: message.subject }), message.date) { + let dateOptions = { + year: "numeric", + month: "numeric", + day: "numeric", + hour: "numeric", + minute: "numeric", + second: "numeric", + hour12: !1 + }, dateStr = typeof Intl > "u" ? message.date : new Intl.DateTimeFormat("default", dateOptions).format(new Date(message.date)); + rows.push({ key: "Date", val: dateStr }); + } + message.to && message.to.length && rows.push({ key: "To", val: formatTextAddresses(message.to) }), message.cc && message.cc.length && rows.push({ key: "Cc", val: formatTextAddresses(message.cc) }), message.bcc && message.bcc.length && rows.push({ key: "Bcc", val: formatTextAddresses(message.bcc) }); + let maxKeyLength = rows.map((r) => r.key.length).reduce((acc, cur) => cur > acc ? cur : acc, 0); + rows = rows.flatMap((row) => { + let sepLen = maxKeyLength - row.key.length, prefix = `${row.key}: ${" ".repeat(sepLen)}`, emptyPrefix = `${" ".repeat(row.key.length + 1)} ${" ".repeat(sepLen)}`; + return foldLines(row.val, 80, !0).split(/\r?\n/).map((line) => line.trim()).map((line, i) => `${i ? emptyPrefix : prefix}${line}`); + }); + let maxLineLength = rows.map((r) => r.length).reduce((acc, cur) => cur > acc ? cur : acc, 0), lineMarker = "-".repeat(maxLineLength); + return ` +${lineMarker} +${rows.join(` +`)} +${lineMarker} +`; +} +function formatHtmlHeader(message) { + let rows = []; + if (message.from && rows.push(``), message.subject && rows.push( + `` + ), message.date) { + let dateOptions = { + year: "numeric", + month: "numeric", + day: "numeric", + hour: "numeric", + minute: "numeric", + second: "numeric", + hour12: !1 + }, dateStr = typeof Intl > "u" ? message.date : new Intl.DateTimeFormat("default", dateOptions).format(new Date(message.date)); + rows.push( + `` + ); + } + return message.to && message.to.length && rows.push(``), message.cc && message.cc.length && rows.push(``), message.bcc && message.bcc.length && rows.push(``), ``; +} + +// ../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/address-parser.js +function _handleAddress(tokens) { + let token, isGroup = !1, state = "text", address, addresses = [], data = { + address: [], + comment: [], + group: [], + text: [] + }, i, len; + for (i = 0, len = tokens.length; i < len; i++) + if (token = tokens[i], token.type === "operator") + switch (token.value) { + case "<": + state = "address"; + break; + case "(": + state = "comment"; + break; + case ":": + state = "group", isGroup = !0; + break; + default: + state = "text"; + } + else token.value && (state === "address" && (token.value = token.value.replace(/^[^<]*<\s*/, "")), data[state].push(token.value)); + if (!data.text.length && data.comment.length && (data.text = data.comment, data.comment = []), isGroup) + data.text = data.text.join(" "), addresses.push({ + name: decodeWords(data.text || address && address.name), + group: data.group.length ? addressParser(data.group.join(",")) : [] + }); + else { + if (!data.address.length && data.text.length) { + for (i = data.text.length - 1; i >= 0; i--) + if (data.text[i].match(/^[^@\s]+@[^@\s]+$/)) { + data.address = data.text.splice(i, 1); + break; + } + let _regexHandler = function(address2) { + return data.address.length ? address2 : (data.address = [address2.trim()], " "); + }; + if (!data.address.length) + for (i = data.text.length - 1; i >= 0 && (data.text[i] = data.text[i].replace(/\s*\b[^@\s]+@[^\s]+\b\s*/, _regexHandler).trim(), !data.address.length); i--) + ; + } + if (!data.text.length && data.comment.length && (data.text = data.comment, data.comment = []), data.address.length > 1 && (data.text = data.text.concat(data.address.splice(1))), data.text = data.text.join(" "), data.address = data.address.join(" "), !data.address && /^=\?[^=]+?=$/.test(data.text.trim())) { + let parsedSubAddresses = addressParser(decodeWords(data.text)); + if (parsedSubAddresses && parsedSubAddresses.length) + return parsedSubAddresses; + } + if (!data.address && isGroup) + return []; + address = { + address: data.address || data.text || "", + name: decodeWords(data.text || data.address || "") + }, address.address === address.name && ((address.address || "").match(/@/) ? address.name = "" : address.address = ""), addresses.push(address); + } + return addresses; +} +var Tokenizer = class { + constructor(str) { + this.str = (str || "").toString(), this.operatorCurrent = "", this.operatorExpecting = "", this.node = null, this.escaped = !1, this.list = [], this.operators = { + '"': '"', + "(": ")", + "<": ">", + ",": "", + ":": ";", + // Semicolons are not a legal delimiter per the RFC2822 grammar other + // than for terminating a group, but they are also not valid for any + // other use in this context. Given that some mail clients have + // historically allowed the semicolon as a delimiter equivalent to the + // comma in their UI, it makes sense to treat them the same as a comma + // when used outside of a group. + ";": "" + }; + } + /** + * Tokenizes the original input string + * + * @return {Array} An array of operator|text tokens + */ + tokenize() { + let chr, list = []; + for (let i = 0, len = this.str.length; i < len; i++) + chr = this.str.charAt(i), this.checkChar(chr); + return this.list.forEach((node) => { + node.value = (node.value || "").toString().trim(), node.value && list.push(node); + }), list; + } + /** + * Checks if a character is an operator or text and acts accordingly + * + * @param {String} chr Character from the address field + */ + checkChar(chr) { + if (!this.escaped) { + if (chr === this.operatorExpecting) { + this.node = { + type: "operator", + value: chr + }, this.list.push(this.node), this.node = null, this.operatorExpecting = "", this.escaped = !1; + return; + } else if (!this.operatorExpecting && chr in this.operators) { + this.node = { + type: "operator", + value: chr + }, this.list.push(this.node), this.node = null, this.operatorExpecting = this.operators[chr], this.escaped = !1; + return; + } else if (['"', "'"].includes(this.operatorExpecting) && chr === "\\") { + this.escaped = !0; + return; + } + } + this.node || (this.node = { + type: "text", + value: "" + }, this.list.push(this.node)), chr === ` +` && (chr = " "), (chr.charCodeAt(0) >= 33 || [" ", " "].includes(chr)) && (this.node.value += chr), this.escaped = !1; + } +}; +function addressParser(str, options) { + options = options || {}; + let tokens = new Tokenizer(str).tokenize(), addresses = [], address = [], parsedAddresses = []; + if (tokens.forEach((token) => { + token.type === "operator" && (token.value === "," || token.value === ";") ? (address.length && addresses.push(address), address = []) : address.push(token); + }), address.length && addresses.push(address), addresses.forEach((address2) => { + address2 = _handleAddress(address2), address2.length && (parsedAddresses = parsedAddresses.concat(address2)); + }), options.flatten) { + let addresses2 = [], walkAddressList = (list) => { + list.forEach((address2) => { + if (address2.group) + return walkAddressList(address2.group); + addresses2.push(address2); + }); + }; + return walkAddressList(parsedAddresses), addresses2; + } + return parsedAddresses; +} +var address_parser_default = addressParser; + +// ../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/base64-encoder.js +function base64ArrayBuffer(arrayBuffer) { + for (var base64 = "", encodings = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", bytes = new Uint8Array(arrayBuffer), byteLength = bytes.byteLength, byteRemainder = byteLength % 3, mainLength = byteLength - byteRemainder, a, b, c, d, chunk, i = 0; i < mainLength; i = i + 3) + chunk = bytes[i] << 16 | bytes[i + 1] << 8 | bytes[i + 2], a = (chunk & 16515072) >> 18, b = (chunk & 258048) >> 12, c = (chunk & 4032) >> 6, d = chunk & 63, base64 += encodings[a] + encodings[b] + encodings[c] + encodings[d]; + return byteRemainder == 1 ? (chunk = bytes[mainLength], a = (chunk & 252) >> 2, b = (chunk & 3) << 4, base64 += encodings[a] + encodings[b] + "==") : byteRemainder == 2 && (chunk = bytes[mainLength] << 8 | bytes[mainLength + 1], a = (chunk & 64512) >> 10, b = (chunk & 1008) >> 4, c = (chunk & 15) << 2, base64 += encodings[a] + encodings[b] + encodings[c] + "="), base64; +} + +// ../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/postal-mime.js +var PostalMime = class _PostalMime { + static parse(buf, options) { + return new _PostalMime(options).parse(buf); + } + constructor(options) { + this.options = options || {}, this.root = this.currentNode = new MimeNode({ + postalMime: this + }), this.boundaries = [], this.textContent = {}, this.attachments = [], this.attachmentEncoding = (this.options.attachmentEncoding || "").toString().replace(/[-_\s]/g, "").trim().toLowerCase() || "arraybuffer", this.started = !1; + } + async finalize() { + await this.root.finalize(); + } + async processLine(line, isFinal) { + let boundaries = this.boundaries; + if (boundaries.length && line.length > 2 && line[0] === 45 && line[1] === 45) + for (let i = boundaries.length - 1; i >= 0; i--) { + let boundary = boundaries[i]; + if (line.length !== boundary.value.length + 2 && line.length !== boundary.value.length + 4) + continue; + let isTerminator = line.length === boundary.value.length + 4; + if (isTerminator && (line[line.length - 2] !== 45 || line[line.length - 1] !== 45)) + continue; + let boudaryMatches = !0; + for (let i2 = 0; i2 < boundary.value.length; i2++) + if (line[i2 + 2] !== boundary.value[i2]) { + boudaryMatches = !1; + break; + } + if (boudaryMatches) + return isTerminator ? (await boundary.node.finalize(), this.currentNode = boundary.node.parentNode || this.root) : (await boundary.node.finalizeChildNodes(), this.currentNode = new MimeNode({ + postalMime: this, + parentNode: boundary.node + })), isFinal ? this.finalize() : void 0; + } + if (this.currentNode.feed(line), isFinal) + return this.finalize(); + } + readLine() { + let startPos = this.readPos, endPos = this.readPos, res = () => ({ + bytes: new Uint8Array(this.buf, startPos, endPos - startPos), + done: this.readPos >= this.av.length + }); + for (; this.readPos < this.av.length; ) { + let c = this.av[this.readPos++]; + if (c !== 13 && c !== 10 && (endPos = this.readPos), c === 10) + return res(); + } + return res(); + } + async processNodeTree() { + let textContent = {}, textTypes = /* @__PURE__ */ new Set(), textMap = this.textMap = /* @__PURE__ */ new Map(), forceRfc822Attachments = this.forceRfc822Attachments(), walk = async (node, alternative, related) => { + if (alternative = alternative || !1, related = related || !1, node.contentType.multipart) + node.contentType.multipart === "alternative" ? alternative = node : node.contentType.multipart === "related" && (related = node); + else if (this.isInlineMessageRfc822(node) && !forceRfc822Attachments) { + let subParser = new _PostalMime(); + node.subMessage = await subParser.parse(node.content), textMap.has(node) || textMap.set(node, {}); + let textEntry = textMap.get(node); + (node.subMessage.text || !node.subMessage.html) && (textEntry.plain = textEntry.plain || [], textEntry.plain.push({ type: "subMessage", value: node.subMessage }), textTypes.add("plain")), node.subMessage.html && (textEntry.html = textEntry.html || [], textEntry.html.push({ type: "subMessage", value: node.subMessage }), textTypes.add("html")), subParser.textMap && subParser.textMap.forEach((subTextEntry, subTextNode) => { + textMap.set(subTextNode, subTextEntry); + }); + for (let attachment of node.subMessage.attachments || []) + this.attachments.push(attachment); + } else if (this.isInlineTextNode(node)) { + let textType = node.contentType.parsed.value.substr(node.contentType.parsed.value.indexOf("/") + 1), selectorNode = alternative || node; + textMap.has(selectorNode) || textMap.set(selectorNode, {}); + let textEntry = textMap.get(selectorNode); + textEntry[textType] = textEntry[textType] || [], textEntry[textType].push({ type: "text", value: node.getTextContent() }), textTypes.add(textType); + } else if (node.content) { + let filename = node.contentDisposition.parsed.params.filename || node.contentType.parsed.params.name || null, attachment = { + filename: filename ? decodeWords(filename) : null, + mimeType: node.contentType.parsed.value, + disposition: node.contentDisposition.parsed.value || null + }; + switch (related && node.contentId && (attachment.related = !0), node.contentDescription && (attachment.description = node.contentDescription), node.contentId && (attachment.contentId = node.contentId), node.contentType.parsed.value) { + // Special handling for calendar events + case "text/calendar": + case "application/ics": { + node.contentType.parsed.params.method && (attachment.method = node.contentType.parsed.params.method.toString().toUpperCase().trim()); + let decodedText = node.getTextContent().replace(/\r?\n/g, ` +`).replace(/\n*$/, ` +`); + attachment.content = textEncoder.encode(decodedText); + break; + } + // Regular attachments + default: + attachment.content = node.content; + } + this.attachments.push(attachment); + } + for (let childNode of node.childNodes) + await walk(childNode, alternative, related); + }; + await walk(this.root, !1, []), textMap.forEach((mapEntry) => { + textTypes.forEach((textType) => { + if (textContent[textType] || (textContent[textType] = []), mapEntry[textType]) + mapEntry[textType].forEach((textEntry) => { + switch (textEntry.type) { + case "text": + textContent[textType].push(textEntry.value); + break; + case "subMessage": + switch (textType) { + case "html": + textContent[textType].push(formatHtmlHeader(textEntry.value)); + break; + case "plain": + textContent[textType].push(formatTextHeader(textEntry.value)); + break; + } + break; + } + }); + else { + let alternativeType; + switch (textType) { + case "html": + alternativeType = "plain"; + break; + case "plain": + alternativeType = "html"; + break; + } + (mapEntry[alternativeType] || []).forEach((textEntry) => { + switch (textEntry.type) { + case "text": + switch (textType) { + case "html": + textContent[textType].push(textToHtml(textEntry.value)); + break; + case "plain": + textContent[textType].push(htmlToText(textEntry.value)); + break; + } + break; + case "subMessage": + switch (textType) { + case "html": + textContent[textType].push(formatHtmlHeader(textEntry.value)); + break; + case "plain": + textContent[textType].push(formatTextHeader(textEntry.value)); + break; + } + break; + } + }); + } + }); + }), Object.keys(textContent).forEach((textType) => { + textContent[textType] = textContent[textType].join(` +`); + }), this.textContent = textContent; + } + isInlineTextNode(node) { + if (node.contentDisposition.parsed.value === "attachment") + return !1; + switch (node.contentType.parsed.value) { + case "text/html": + case "text/plain": + return !0; + case "text/calendar": + case "text/csv": + default: + return !1; + } + } + isInlineMessageRfc822(node) { + return node.contentType.parsed.value !== "message/rfc822" ? !1 : (node.contentDisposition.parsed.value || (this.options.rfc822Attachments ? "attachment" : "inline")) === "inline"; + } + // Check if this is a specially crafted report email where message/rfc822 content should not be inlined + forceRfc822Attachments() { + if (this.options.forceRfc822Attachments) + return !0; + let forceRfc822Attachments = !1, walk = (node) => { + node.contentType.multipart || ["message/delivery-status", "message/feedback-report"].includes(node.contentType.parsed.value) && (forceRfc822Attachments = !0); + for (let childNode of node.childNodes) + walk(childNode); + }; + return walk(this.root), forceRfc822Attachments; + } + async resolveStream(stream) { + let chunkLen = 0, chunks = [], reader = stream.getReader(); + for (; ; ) { + let { done, value } = await reader.read(); + if (done) + break; + chunks.push(value), chunkLen += value.length; + } + let result = new Uint8Array(chunkLen), chunkPointer = 0; + for (let chunk of chunks) + result.set(chunk, chunkPointer), chunkPointer += chunk.length; + return result; + } + async parse(buf) { + if (this.started) + throw new Error("Can not reuse parser, create a new PostalMime object"); + for (this.started = !0, buf && typeof buf.getReader == "function" && (buf = await this.resolveStream(buf)), buf = buf || new ArrayBuffer(0), typeof buf == "string" && (buf = textEncoder.encode(buf)), (buf instanceof Blob || Object.prototype.toString.call(buf) === "[object Blob]") && (buf = await blobToArrayBuffer(buf)), buf.buffer instanceof ArrayBuffer && (buf = new Uint8Array(buf).buffer), this.buf = buf, this.av = new Uint8Array(buf), this.readPos = 0; this.readPos < this.av.length; ) { + let line = this.readLine(); + await this.processLine(line.bytes, line.done); + } + await this.processNodeTree(); + let message = { + headers: this.root.headers.map((entry) => ({ key: entry.key, value: entry.value })).reverse() + }; + for (let key of ["from", "sender"]) { + let addressHeader = this.root.headers.find((line) => line.key === key); + if (addressHeader && addressHeader.value) { + let addresses = address_parser_default(addressHeader.value); + addresses && addresses.length && (message[key] = addresses[0]); + } + } + for (let key of ["delivered-to", "return-path"]) { + let addressHeader = this.root.headers.find((line) => line.key === key); + if (addressHeader && addressHeader.value) { + let addresses = address_parser_default(addressHeader.value); + if (addresses && addresses.length && addresses[0].address) { + let camelKey = key.replace(/\-(.)/g, (o, c) => c.toUpperCase()); + message[camelKey] = addresses[0].address; + } + } + } + for (let key of ["to", "cc", "bcc", "reply-to"]) { + let addressHeaders = this.root.headers.filter((line) => line.key === key), addresses = []; + if (addressHeaders.filter((entry) => entry && entry.value).map((entry) => address_parser_default(entry.value)).forEach((parsed) => addresses = addresses.concat(parsed || [])), addresses && addresses.length) { + let camelKey = key.replace(/\-(.)/g, (o, c) => c.toUpperCase()); + message[camelKey] = addresses; + } + } + for (let key of ["subject", "message-id", "in-reply-to", "references"]) { + let header = this.root.headers.find((line) => line.key === key); + if (header && header.value) { + let camelKey = key.replace(/\-(.)/g, (o, c) => c.toUpperCase()); + message[camelKey] = decodeWords(header.value); + } + } + let dateHeader = this.root.headers.find((line) => line.key === "date"); + if (dateHeader) { + let date = new Date(dateHeader.value); + !date || date.toString() === "Invalid Date" ? date = dateHeader.value : date = date.toISOString(), message.date = date; + } + switch (this.textContent?.html && (message.html = this.textContent.html), this.textContent?.plain && (message.text = this.textContent.plain), message.attachments = this.attachments, this.attachmentEncoding) { + case "arraybuffer": + break; + case "base64": + for (let attachment of message.attachments || []) + attachment?.content && (attachment.content = base64ArrayBuffer(attachment.content), attachment.encoding = "base64"); + break; + case "utf8": + let attachmentDecoder = new TextDecoder("utf8"); + for (let attachment of message.attachments || []) + attachment?.content && (attachment.content = attachmentDecoder.decode(attachment.content), attachment.encoding = "utf8"); + break; + default: + throw new Error("Unknwon attachment encoding"); + } + return message; + } +}; + +// src/workers/email/constants.ts +var RAW_EMAIL = "EmailMessage::raw"; + +// src/workers/email/validate.ts +async function isEmailReplyable(email, incomingEmailHeaders, log) { + let autoResponseSuppress = incomingEmailHeaders.get("x-auto-response-suppress")?.toLowerCase(); + if (autoResponseSuppress !== void 0 && autoResponseSuppress !== "none") + return !1; + let autoSubmittedValue = incomingEmailHeaders.get("auto-submitted")?.toLowerCase(); + return autoSubmittedValue !== void 0 && autoSubmittedValue !== "no" ? !1 : email.inReplyTo === void 0 && email.references === void 0 ? !0 : email.inReplyTo !== void 0 && email.references !== void 0 ? (email.references.match(/@/g)?.length ?? 0) >= 100 ? (await log( + red( + `The incoming email's "References" header has more than 100 entries. As such, your Worker cannot respond to this email. Refer to https://developers.cloudflare.com/email-routing/email-workers/reply-email-workers/.` + ) + ), !1) : !0 : !1; +} +async function validateReply(incomingMessage, replyMessage) { + let rawEmail = replyMessage[RAW_EMAIL], rawEmailBuffer = new Uint8Array( + await new Response(rawEmail).arrayBuffer() + ), parsedReply; + try { + parsedReply = await PostalMime.parse(rawEmailBuffer); + } catch (e) { + let error = e; + throw new Error(`could not parse email: ${error.message}`); + } + if (parsedReply.from?.address !== replyMessage.from) + throw new Error("From: header does not match mail from"); + if (parsedReply.messageId === void 0) + throw new Error("invalid message-id"); + if (new Headers( + parsedReply.headers.map((header) => [header.key, header.value]) + ).get("received") !== null) + throw new Error("invalid headers set"); + if (parsedReply.inReplyTo === void 0) + throw new Error("no In-Reply-To header found in reply message"); + if (parsedReply.inReplyTo !== incomingMessage.messageId) + throw new Error("In-Reply-To does not match original Message-ID"); + let incomingReferences = incomingMessage.references ?? ""; + if (parsedReply.references !== void 0) { + if (!(parsedReply.references.includes(incomingMessage.messageId) && parsedReply.references.includes(incomingReferences))) + throw new Error("provided References header is invalid"); + } else { + let replyReferences = `References: ${incomingMessage.messageId}${incomingReferences.length > 0 ? " " : ""}${incomingReferences}\r +`, encodedReferences = new TextEncoder().encode(replyReferences), finalReplyEmail = new Uint8Array( + encodedReferences.byteLength + rawEmailBuffer.byteLength + ); + return finalReplyEmail.set(encodedReferences, 0), finalReplyEmail.set(rawEmailBuffer, encodedReferences.byteLength), finalReplyEmail; + } + return rawEmailBuffer; +} + +// src/workers/core/email.ts +$.enabled = !0; +function renderEmailHeaders(headers) { + return headers ? ` + headers: +${[...headers.entries()].map(([k, v]) => ` ${k}: ${v}`).join(` +`)}` : ""; +} +async function handleEmail(params, request, service, env, ctx) { + let from = params.get("from"), to = params.get("to"); + if (!request.body || !from || !to) + return new Response( + "Invalid email. Your request must include URL parameters specifying the `from` and `to` addresses, as well as an email in the body", + { + status: 400 + } + ); + let clonedRequest = request.clone(); + assert(clonedRequest.body !== null, "Cloned request body is null"); + let incomingEmailRaw = new Uint8Array(await request.arrayBuffer()); + if (incomingEmailRaw.byteLength > 25 * 1024 * 1024) + return new Response( + "Email message size is bigger than the production size limit of 25MiB. Local development has a lower limit of 1Mib.", + { + status: 400 + } + ); + if (incomingEmailRaw.byteLength > 1024 * 1024) + return new Response( + "Email message size is within the production size limit of 25MiB, but exceeds the lower 1Mib limit for testing locally.", + { + status: 400 + } + ); + let parsedIncomingEmail; + try { + parsedIncomingEmail = await PostalMime.parse(incomingEmailRaw); + } catch (e) { + let error = e; + return new Response( + `Email could not be parsed: ${error.name}: ${error.message}`, + { status: 400 } + ); + } + if (parsedIncomingEmail.messageId === void 0) + return new Response( + "Email could not be parsed: invalid or no message id provided", + { status: 400 } + ); + from !== parsedIncomingEmail.from.address && await env[CoreBindings.SERVICE_LOOPBACK].fetch( + "http://localhost/core/log", + { + method: "POST", + headers: { [SharedHeaders.LOG_LEVEL]: LogLevel.WARN.toString() }, + body: `${yellow(`Provided MAIL FROM address doesn't match the email message's "From" header`)}: + MAIL FROM: ${from} + "From" header: ${parsedIncomingEmail.from.address}` + } + ), parsedIncomingEmail.to?.map((addr) => addr.address).includes(to) || await env[CoreBindings.SERVICE_LOOPBACK].fetch( + "http://localhost/core/log", + { + method: "POST", + headers: { [SharedHeaders.LOG_LEVEL]: LogLevel.WARN.toString() }, + body: `${yellow(`Provided RCPT TO address doesn't match any "To" header in the email message`)}: + RCPT TO: ${to} + "To" header: ${parsedIncomingEmail.to?.map((addr) => addr.address).join(", ")}` + } + ); + let incomingEmailHeaders = new Headers( + parsedIncomingEmail.headers.map((header) => [header.key, header.value]) + ), maybeClientError; + return await service.email( + // Construct a ForwardableEmailMessage-like object. We need + // - ForwardableEmailMessage to be able to be passed across JSRPC (to support e.g. userWorker.email(ForwardableEmailMessage)) + // - ForwardableEmailMessage properties to be synchronously available (to match production). This rules out a class extending `RpcStub` + // However, unlike EmailMessage (see email.worker.ts) it doesn't need to be user-constructable, and so we can just use an object with `satisfies` + { + from, + to, + raw: clonedRequest.body, + rawSize: incomingEmailRaw.byteLength, + headers: incomingEmailHeaders, + setReject: (reason) => { + ctx.waitUntil( + env[CoreBindings.SERVICE_LOOPBACK].fetch( + "http://localhost/core/log", + { + method: "POST", + headers: { [SharedHeaders.LOG_LEVEL]: LogLevel.ERROR.toString() }, + body: `${red("Email handler rejected message")}${reset(` with the following reason: "${reason}"`)}` + } + ) + ), maybeClientError = reason; + }, + forward: async (rcptTo, headers) => { + await env[CoreBindings.SERVICE_LOOPBACK].fetch( + "http://localhost/core/log", + { + method: "POST", + headers: { [SharedHeaders.LOG_LEVEL]: LogLevel.INFO.toString() }, + body: `${blue("Email handler forwarded message")}${reset(` with + rcptTo: ${rcptTo}${renderEmailHeaders(headers)}`)}` + } + ); + }, + reply: async (replyMessage) => { + if (!await isEmailReplyable( + parsedIncomingEmail, + incomingEmailHeaders, + async (msg) => void await env[CoreBindings.SERVICE_LOOPBACK].fetch( + "http://localhost/core/log", + { + method: "POST", + headers: { + [SharedHeaders.LOG_LEVEL]: LogLevel.ERROR.toString() + }, + body: msg + } + ) + )) + throw new Error("Original email is not replyable"); + let finalReply = await validateReply( + parsedIncomingEmail, + replyMessage + ), file = await (await env[CoreBindings.SERVICE_LOOPBACK].fetch( + "http://localhost/core/store-temp-file?extension=eml&prefix=email", + { + method: "POST", + body: finalReply + } + )).text(); + await env[CoreBindings.SERVICE_LOOPBACK].fetch( + "http://localhost/core/log", + { + method: "POST", + headers: { [SharedHeaders.LOG_LEVEL]: LogLevel.INFO.toString() }, + body: `${blue("Email handler replied to sender")}${reset(` with the following message: + ${file}`)}` + } + ); + } + } + ), maybeClientError !== void 0 ? new Response( + `Worker rejected email with the following reason: ${maybeClientError}`, + { status: 400 } + ) : new Response("Worker successfully processed email", { + status: 200 + }); +} + +// src/workers/core/http.ts +var STATUS_CODES = { + 100: "Continue", + 101: "Switching Protocols", + 102: "Processing", + 103: "Early Hints", + 200: "OK", + 201: "Created", + 202: "Accepted", + 203: "Non-Authoritative Information", + 204: "No Content", + 205: "Reset Content", + 206: "Partial Content", + 207: "Multi-Status", + 208: "Already Reported", + 226: "IM Used", + 300: "Multiple Choices", + 301: "Moved Permanently", + 302: "Found", + 303: "See Other", + 304: "Not Modified", + 305: "Use Proxy", + 307: "Temporary Redirect", + 308: "Permanent Redirect", + 400: "Bad Request", + 401: "Unauthorized", + 402: "Payment Required", + 403: "Forbidden", + 404: "Not Found", + 405: "Method Not Allowed", + 406: "Not Acceptable", + 407: "Proxy Authentication Required", + 408: "Request Timeout", + 409: "Conflict", + 410: "Gone", + 411: "Length Required", + 412: "Precondition Failed", + 413: "Payload Too Large", + 414: "URI Too Long", + 415: "Unsupported Media Type", + 416: "Range Not Satisfiable", + 417: "Expectation Failed", + 418: "I'm a Teapot", + 421: "Misdirected Request", + 422: "Unprocessable Entity", + 423: "Locked", + 424: "Failed Dependency", + 425: "Too Early", + 426: "Upgrade Required", + 428: "Precondition Required", + 429: "Too Many Requests", + 431: "Request Header Fields Too Large", + 451: "Unavailable For Legal Reasons", + 500: "Internal Server Error", + 501: "Not Implemented", + 502: "Bad Gateway", + 503: "Service Unavailable", + 504: "Gateway Timeout", + 505: "HTTP Version Not Supported", + 506: "Variant Also Negotiates", + 507: "Insufficient Storage", + 508: "Loop Detected", + 509: "Bandwidth Limit Exceeded", + 510: "Not Extended", + 511: "Network Authentication Required" +}; + +// src/workers/core/routing.ts +function matchRoutes(routes, url) { + for (let route of routes) { + if (route.protocol && route.protocol !== url.protocol) continue; + if (route.allowHostnamePrefix) { + if (!url.hostname.endsWith(route.hostname)) continue; + } else if (url.hostname !== route.hostname) continue; + let path = url.pathname + url.search; + if (route.allowPathSuffix) { + if (!path.startsWith(route.path)) continue; + } else if (path !== route.path) continue; + return route.target; + } + return null; +} + +// src/workers/core/scheduled.ts +async function handleScheduled(params, service) { + let time = params.get("time"), scheduledTime = time ? new Date(parseInt(time)) : void 0, cron = params.get("cron") ?? void 0, result = await service.scheduled({ + scheduledTime, + cron + }); + return new Response(result.outcome, { + status: result.outcome === "ok" ? 200 : 500 + }); +} + +// src/workers/core/proxy.worker.ts +import assert3 from "node:assert"; +import { Buffer as Buffer2 } from "node:buffer"; + +// ../../node_modules/.pnpm/devalue@4.3.2/node_modules/devalue/src/utils.js +var DevalueError = class extends Error { + /** + * @param {string} message + * @param {string[]} keys + */ + constructor(message, keys) { + super(message), this.name = "DevalueError", this.path = keys.join(""); + } +}; +function is_primitive(thing) { + return Object(thing) !== thing; +} +var object_proto_names = /* @__PURE__ */ Object.getOwnPropertyNames( + Object.prototype +).sort().join("\0"); +function is_plain_object(thing) { + let proto = Object.getPrototypeOf(thing); + return proto === Object.prototype || proto === null || Object.getOwnPropertyNames(proto).sort().join("\0") === object_proto_names; +} +function get_type(thing) { + return Object.prototype.toString.call(thing).slice(8, -1); +} +function get_escaped_char(char) { + switch (char) { + case '"': + return '\\"'; + case "<": + return "\\u003C"; + case "\\": + return "\\\\"; + case ` +`: + return "\\n"; + case "\r": + return "\\r"; + case " ": + return "\\t"; + case "\b": + return "\\b"; + case "\f": + return "\\f"; + case "\u2028": + return "\\u2028"; + case "\u2029": + return "\\u2029"; + default: + return char < " " ? `\\u${char.charCodeAt(0).toString(16).padStart(4, "0")}` : ""; + } +} +function stringify_string(str) { + let result = "", last_pos = 0, len = str.length; + for (let i = 0; i < len; i += 1) { + let char = str[i], replacement = get_escaped_char(char); + replacement && (result += str.slice(last_pos, i) + replacement, last_pos = i + 1); + } + return `"${last_pos === 0 ? str : result + str.slice(last_pos)}"`; +} + +// ../../node_modules/.pnpm/devalue@4.3.2/node_modules/devalue/src/parse.js +function parse(serialized, revivers) { + return unflatten(JSON.parse(serialized), revivers); +} +function unflatten(parsed, revivers) { + if (typeof parsed == "number") return hydrate(parsed, !0); + if (!Array.isArray(parsed) || parsed.length === 0) + throw new Error("Invalid input"); + let values = ( + /** @type {any[]} */ + parsed + ), hydrated = Array(values.length); + function hydrate(index, standalone = !1) { + if (index === -1) return; + if (index === -3) return NaN; + if (index === -4) return 1 / 0; + if (index === -5) return -1 / 0; + if (index === -6) return -0; + if (standalone) throw new Error("Invalid input"); + if (index in hydrated) return hydrated[index]; + let value = values[index]; + if (!value || typeof value != "object") + hydrated[index] = value; + else if (Array.isArray(value)) + if (typeof value[0] == "string") { + let type = value[0], reviver = revivers?.[type]; + if (reviver) + return hydrated[index] = reviver(hydrate(value[1])); + switch (type) { + case "Date": + hydrated[index] = new Date(value[1]); + break; + case "Set": + let set = /* @__PURE__ */ new Set(); + hydrated[index] = set; + for (let i = 1; i < value.length; i += 1) + set.add(hydrate(value[i])); + break; + case "Map": + let map = /* @__PURE__ */ new Map(); + hydrated[index] = map; + for (let i = 1; i < value.length; i += 2) + map.set(hydrate(value[i]), hydrate(value[i + 1])); + break; + case "RegExp": + hydrated[index] = new RegExp(value[1], value[2]); + break; + case "Object": + hydrated[index] = Object(value[1]); + break; + case "BigInt": + hydrated[index] = BigInt(value[1]); + break; + case "null": + let obj = /* @__PURE__ */ Object.create(null); + hydrated[index] = obj; + for (let i = 1; i < value.length; i += 2) + obj[value[i]] = hydrate(value[i + 1]); + break; + default: + throw new Error(`Unknown type ${type}`); + } + } else { + let array = new Array(value.length); + hydrated[index] = array; + for (let i = 0; i < value.length; i += 1) { + let n = value[i]; + n !== -2 && (array[i] = hydrate(n)); + } + } + else { + let object = {}; + hydrated[index] = object; + for (let key in value) { + let n = value[key]; + object[key] = hydrate(n); + } + } + return hydrated[index]; + } + return hydrate(0); +} + +// ../../node_modules/.pnpm/devalue@4.3.2/node_modules/devalue/src/stringify.js +function stringify(value, reducers) { + let stringified = [], indexes = /* @__PURE__ */ new Map(), custom = []; + for (let key in reducers) + custom.push({ key, fn: reducers[key] }); + let keys = [], p = 0; + function flatten(thing) { + if (typeof thing == "function") + throw new DevalueError("Cannot stringify a function", keys); + if (indexes.has(thing)) return indexes.get(thing); + if (thing === void 0) return -1; + if (Number.isNaN(thing)) return -3; + if (thing === 1 / 0) return -4; + if (thing === -1 / 0) return -5; + if (thing === 0 && 1 / thing < 0) return -6; + let index2 = p++; + indexes.set(thing, index2); + for (let { key, fn } of custom) { + let value2 = fn(thing); + if (value2) + return stringified[index2] = `["${key}",${flatten(value2)}]`, index2; + } + let str = ""; + if (is_primitive(thing)) + str = stringify_primitive(thing); + else + switch (get_type(thing)) { + case "Number": + case "String": + case "Boolean": + str = `["Object",${stringify_primitive(thing)}]`; + break; + case "BigInt": + str = `["BigInt",${thing}]`; + break; + case "Date": + str = `["Date","${thing.toISOString()}"]`; + break; + case "RegExp": + let { source, flags } = thing; + str = flags ? `["RegExp",${stringify_string(source)},"${flags}"]` : `["RegExp",${stringify_string(source)}]`; + break; + case "Array": + str = "["; + for (let i = 0; i < thing.length; i += 1) + i > 0 && (str += ","), i in thing ? (keys.push(`[${i}]`), str += flatten(thing[i]), keys.pop()) : str += -2; + str += "]"; + break; + case "Set": + str = '["Set"'; + for (let value2 of thing) + str += `,${flatten(value2)}`; + str += "]"; + break; + case "Map": + str = '["Map"'; + for (let [key, value2] of thing) + keys.push( + `.get(${is_primitive(key) ? stringify_primitive(key) : "..."})` + ), str += `,${flatten(key)},${flatten(value2)}`; + str += "]"; + break; + default: + if (!is_plain_object(thing)) + throw new DevalueError( + "Cannot stringify arbitrary non-POJOs", + keys + ); + if (Object.getOwnPropertySymbols(thing).length > 0) + throw new DevalueError( + "Cannot stringify POJOs with symbolic keys", + keys + ); + if (Object.getPrototypeOf(thing) === null) { + str = '["null"'; + for (let key in thing) + keys.push(`.${key}`), str += `,${stringify_string(key)},${flatten(thing[key])}`, keys.pop(); + str += "]"; + } else { + str = "{"; + let started = !1; + for (let key in thing) + started && (str += ","), started = !0, keys.push(`.${key}`), str += `${stringify_string(key)}:${flatten(thing[key])}`, keys.pop(); + str += "}"; + } + } + return stringified[index2] = str, index2; + } + let index = flatten(value); + return index < 0 ? `${index}` : `[${stringified.join(",")}]`; +} +function stringify_primitive(thing) { + let type = typeof thing; + return type === "string" ? stringify_string(thing) : thing instanceof String ? stringify_string(thing.toString()) : thing === void 0 ? (-1).toString() : thing === 0 && 1 / thing < 0 ? (-6).toString() : type === "bigint" ? `["BigInt","${thing}"]` : String(thing); +} + +// src/workers/core/proxy.worker.ts +import { readPrefix, reduceError } from "miniflare:shared"; + +// src/workers/core/devalue.ts +import assert2 from "node:assert"; +import { Buffer } from "node:buffer"; +var ALLOWED_ARRAY_BUFFER_VIEW_CONSTRUCTORS = [ + DataView, + Int8Array, + Uint8Array, + Uint8ClampedArray, + Int16Array, + Uint16Array, + Int32Array, + Uint32Array, + Float32Array, + Float64Array, + BigInt64Array, + BigUint64Array +], ALLOWED_ERROR_CONSTRUCTORS = [ + EvalError, + RangeError, + ReferenceError, + SyntaxError, + TypeError, + URIError, + Error + // `Error` last so more specific error subclasses preferred +], structuredSerializableReducers = { + ArrayBuffer(value) { + if (value instanceof ArrayBuffer) + return [Buffer.from(value).toString("base64")]; + }, + ArrayBufferView(value) { + if (ArrayBuffer.isView(value)) + return [ + value.constructor.name, + value.buffer, + value.byteOffset, + value.byteLength + ]; + }, + Error(value) { + for (let ctor of ALLOWED_ERROR_CONSTRUCTORS) + if (value instanceof ctor && value.name === ctor.name) + return [value.name, value.message, value.stack, value.cause]; + if (value instanceof Error) + return ["Error", value.message, value.stack, value.cause]; + } +}, structuredSerializableRevivers = { + ArrayBuffer(value) { + assert2(Array.isArray(value)); + let [encoded] = value; + assert2(typeof encoded == "string"); + let view = Buffer.from(encoded, "base64"); + return view.buffer.slice( + view.byteOffset, + view.byteOffset + view.byteLength + ); + }, + ArrayBufferView(value) { + assert2(Array.isArray(value)); + let [name, buffer, byteOffset, byteLength] = value; + assert2(typeof name == "string"), assert2(buffer instanceof ArrayBuffer), assert2(typeof byteOffset == "number"), assert2(typeof byteLength == "number"); + let ctor = globalThis[name]; + assert2(ALLOWED_ARRAY_BUFFER_VIEW_CONSTRUCTORS.includes(ctor)); + let length = byteLength; + return "BYTES_PER_ELEMENT" in ctor && (length /= ctor.BYTES_PER_ELEMENT), new ctor(buffer, byteOffset, length); + }, + Error(value) { + assert2(Array.isArray(value)); + let [name, message, stack, cause] = value; + assert2(typeof name == "string"), assert2(typeof message == "string"), assert2(stack === void 0 || typeof stack == "string"); + let ctor = globalThis[name]; + assert2(ALLOWED_ERROR_CONSTRUCTORS.includes(ctor)); + let error = new ctor(message, { cause }); + return error.stack = stack, error; + } +}; +function createHTTPReducers(impl) { + return { + Headers(val) { + if (val instanceof impl.Headers) return Object.fromEntries(val); + }, + Request(val) { + if (val instanceof impl.Request) + return [val.method, val.url, val.headers, val.cf, val.body]; + }, + Response(val) { + if (val instanceof impl.Response) + return [val.status, val.statusText, val.headers, val.cf, val.body]; + } + }; +} +function createHTTPRevivers(impl) { + return { + Headers(value) { + return assert2(typeof value == "object" && value !== null), new impl.Headers(value); + }, + Request(value) { + assert2(Array.isArray(value)); + let [method, url, headers, cf, body] = value; + return assert2(typeof method == "string"), assert2(typeof url == "string"), assert2(headers instanceof impl.Headers), assert2(body === null || impl.isReadableStream(body)), new impl.Request(url, { + method, + headers, + cf, + // @ts-expect-error `duplex` is not required by `workerd` yet + duplex: body === null ? void 0 : "half", + body + }); + }, + Response(value) { + assert2(Array.isArray(value)); + let [status, statusText, headers, cf, body] = value; + return assert2(typeof status == "number"), assert2(typeof statusText == "string"), assert2(headers instanceof impl.Headers), assert2(body === null || impl.isReadableStream(body)), new impl.Response(body, { + status, + statusText, + headers, + cf + }); + } + }; +} +function stringifyWithStreams(impl, value, reducers, allowUnbufferedStream) { + let unbufferedStream, bufferPromises = [], streamReducers = { + ReadableStream(value2) { + if (impl.isReadableStream(value2)) + return allowUnbufferedStream && unbufferedStream === void 0 ? unbufferedStream = value2 : bufferPromises.push(impl.bufferReadableStream(value2)), !0; + }, + Blob(value2) { + if (value2 instanceof impl.Blob) + return bufferPromises.push(value2.arrayBuffer()), !0; + }, + ...reducers + }; + typeof value == "function" && (value = new __MiniflareFunctionWrapper( + value + )); + let stringifiedValue = stringify(value, streamReducers); + return bufferPromises.length === 0 ? { value: stringifiedValue, unbufferedStream } : Promise.all(bufferPromises).then((streamBuffers) => (streamReducers.ReadableStream = function(value2) { + if (impl.isReadableStream(value2)) + return value2 === unbufferedStream ? !0 : streamBuffers.shift(); + }, streamReducers.Blob = function(value2) { + if (value2 instanceof impl.Blob) { + let array = [streamBuffers.shift(), value2.type]; + return value2 instanceof impl.File && array.push(value2.name, value2.lastModified), array; + } + }, { value: stringify(value, streamReducers), unbufferedStream })); +} +var __MiniflareFunctionWrapper = class { + constructor(fnWithProps) { + return new Proxy(this, { + get: (_, key) => key === "__miniflareWrappedFunction" ? fnWithProps : fnWithProps[key] + }); + } +}; +function parseWithReadableStreams(impl, stringified, revivers) { + let streamRevivers = { + ReadableStream(value) { + return value === !0 ? (assert2(stringified.unbufferedStream !== void 0), stringified.unbufferedStream) : (assert2(value instanceof ArrayBuffer), impl.unbufferReadableStream(value)); + }, + Blob(value) { + if (assert2(Array.isArray(value)), value.length === 2) { + let [buffer, type] = value; + assert2(buffer instanceof ArrayBuffer), assert2(typeof type == "string"); + let opts = {}; + return type !== "" && (opts.type = type), new impl.Blob([buffer], opts); + } else { + assert2(value.length === 4); + let [buffer, type, name, lastModified] = value; + assert2(buffer instanceof ArrayBuffer), assert2(typeof type == "string"), assert2(typeof name == "string"), assert2(typeof lastModified == "number"); + let opts = { lastModified }; + return type !== "" && (opts.type = type), new impl.File([buffer], name, opts); + } + }, + ...revivers + }; + return parse(stringified.value, streamRevivers); +} + +// src/workers/core/proxy.worker.ts +var ENCODER = new TextEncoder(), DECODER = new TextDecoder(), ALLOWED_HOSTNAMES = ["127.0.0.1", "[::1]", "localhost"], WORKERS_PLATFORM_IMPL = { + Blob, + File, + Headers, + Request, + Response, + isReadableStream(value) { + return value instanceof ReadableStream; + }, + bufferReadableStream(stream) { + return new Response(stream).arrayBuffer(); + }, + unbufferReadableStream(buffer) { + let body = new Response(buffer).body; + return assert3(body !== null), body; + } +}, objectProtoNames = Object.getOwnPropertyNames(Object.prototype).sort().join("\0"); +function isPlainObject(value) { + let proto = Object.getPrototypeOf(value); + return value?.constructor?.name === "RpcStub" || isObject(value) && objectContainsFunctions(value) ? !1 : proto === Object.prototype || proto === null || Object.getOwnPropertyNames(proto).sort().join("\0") === objectProtoNames; +} +function objectContainsFunctions(obj) { + let propertyNames = Object.getOwnPropertyNames(obj), propertySymbols = Object.getOwnPropertySymbols(obj), properties = [...propertyNames, ...propertySymbols]; + for (let property of properties) { + let entry = obj[property]; + if (typeof entry == "function" || isObject(entry) && objectContainsFunctions(entry)) + return !0; + } + return !1; +} +function isObject(value) { + return !!value && typeof value == "object"; +} +function getType(value) { + return Object.prototype.toString.call(value).slice(8, -1); +} +function isInternal(value) { + return isObject(value) && value[Symbol.for("cloudflare:internal-class")]; +} +var ProxyServer = class { + constructor(_state, env) { + this.env = env; + this.heap.set(ProxyAddresses.GLOBAL, globalThis), this.heap.set(ProxyAddresses.ENV, env); + } + nextHeapAddress = ProxyAddresses.USER_START; + heap = /* @__PURE__ */ new Map(); + reducers = { + ...structuredSerializableReducers, + ...createHTTPReducers(WORKERS_PLATFORM_IMPL), + // Corresponding revivers in `ProxyClient` + // `Native` reducer *MUST* be applied last + Native: (value) => { + let type = getType(value); + if ((type === "Object" || isInternal(value)) && !isPlainObject(value) || type === "Promise") { + let address = this.nextHeapAddress++; + this.heap.set(address, value), assert3(value !== null); + let name = value?.constructor.name, isFunction = value instanceof __MiniflareFunctionWrapper; + return [address, name, isFunction]; + } + } + }; + revivers = { + ...structuredSerializableRevivers, + ...createHTTPRevivers(WORKERS_PLATFORM_IMPL), + // Corresponding reducers in `ProxyClient` + Native: (value) => { + assert3(Array.isArray(value)); + let [address] = value; + assert3(typeof address == "number"); + let heapValue = this.heap.get(address); + return assert3(heapValue !== void 0), heapValue instanceof Promise && this.heap.delete(address), heapValue; + } + }; + nativeReviver = { Native: this.revivers.Native }; + async fetch(request) { + try { + return await this.#fetch(request); + } catch (e) { + let error = reduceError(e); + return Response.json(error, { + status: 500, + headers: { [CoreHeaders.ERROR_STACK]: "true" } + }); + } + } + async #fetch(request) { + let hostHeader = request.headers.get("Host"); + if (hostHeader == null) return new Response(null, { status: 400 }); + try { + let host = new URL(`http://${hostHeader}`); + if (!ALLOWED_HOSTNAMES.includes(host.hostname)) + return new Response(null, { status: 401 }); + } catch { + return new Response(null, { status: 400 }); + } + let secretHex = request.headers.get(CoreHeaders.OP_SECRET); + if (secretHex == null) return new Response(null, { status: 401 }); + let expectedSecret = this.env[CoreBindings.DATA_PROXY_SECRET], secretBuffer = Buffer2.from(secretHex, "hex"); + if (secretBuffer.byteLength !== expectedSecret.byteLength || !crypto.subtle.timingSafeEqual(secretBuffer, expectedSecret)) + return new Response(null, { status: 401 }); + let opHeader = request.headers.get(CoreHeaders.OP), targetHeader = request.headers.get(CoreHeaders.OP_TARGET), keyHeader = request.headers.get(CoreHeaders.OP_KEY), allowAsync = request.headers.get(CoreHeaders.OP_SYNC) === null, argsSizeHeader = request.headers.get(CoreHeaders.OP_STRINGIFIED_SIZE), contentLengthHeader = request.headers.get("Content-Length"); + if (targetHeader === null) return new Response(null, { status: 400 }); + if (opHeader === ProxyOps.FREE) { + for (let targetValue of targetHeader.split(",")) { + let targetAddress = parseInt(targetValue); + assert3(!Number.isNaN(targetAddress)), this.heap.delete(targetAddress); + } + return new Response(null, { status: 204 }); + } + let target = parse( + targetHeader, + this.nativeReviver + ), targetName = target.constructor.name, status = 200, result, unbufferedRest; + if (opHeader === ProxyOps.GET) { + if (result = keyHeader === null ? target : target[keyHeader], result?.constructor.name === "RpcProperty" && (result = await result), typeof result == "function") + return new Response(null, { + status: 204, + headers: { [CoreHeaders.OP_RESULT_TYPE]: "Function" } + }); + } else if (opHeader === ProxyOps.GET_OWN_DESCRIPTOR) { + if (keyHeader === null) return new Response(null, { status: 400 }); + let descriptor = Object.getOwnPropertyDescriptor(target, keyHeader); + descriptor !== void 0 && (result = { + configurable: descriptor.configurable, + enumerable: descriptor.enumerable, + writable: descriptor.writable + }); + } else if (opHeader === ProxyOps.GET_OWN_KEYS) + result = Object.getOwnPropertyNames(target); + else if (opHeader === ProxyOps.CALL) { + assert3(keyHeader !== null); + let func = target[keyHeader]; + if (assert3(typeof func == "function"), isFetcherFetch(targetName, keyHeader)) { + let originalUrl = request.headers.get(CoreHeaders.ORIGINAL_URL), url = new URL(originalUrl ?? request.url); + return request = new Request(url, request), request.headers.delete(CoreHeaders.OP_SECRET), request.headers.delete(CoreHeaders.OP), request.headers.delete(CoreHeaders.OP_TARGET), request.headers.delete(CoreHeaders.OP_KEY), request.headers.delete(CoreHeaders.ORIGINAL_URL), request.headers.delete(CoreHeaders.DISABLE_PRETTY_ERROR), func.call(target, request); + } + let args; + if (argsSizeHeader === null || argsSizeHeader === contentLengthHeader) + args = parseWithReadableStreams( + WORKERS_PLATFORM_IMPL, + { value: await request.text() }, + this.revivers + ); + else { + let argsSize = parseInt(argsSizeHeader); + assert3(!Number.isNaN(argsSize)), assert3(request.body !== null); + let [encodedArgs, rest] = await readPrefix(request.body, argsSize); + unbufferedRest = rest; + let stringifiedArgs = DECODER.decode(encodedArgs); + args = parseWithReadableStreams( + WORKERS_PLATFORM_IMPL, + { value: stringifiedArgs, unbufferedStream: rest }, + this.revivers + ); + } + assert3(Array.isArray(args)); + try { + ["RpcProperty", "RpcStub"].includes(func.constructor.name) ? result = await func(...args) : result = func.apply(target, args), isR2ObjectWriteHttpMetadata(targetName, keyHeader) && (result = args[0]); + } catch (e) { + status = 500, result = e; + } + } else + return new Response(null, { status: 404 }); + let headers = new Headers(); + if (allowAsync && result instanceof Promise) { + try { + result = await result; + } catch (e) { + status = 500, result = e; + } + headers.append(CoreHeaders.OP_RESULT_TYPE, "Promise"); + } + if (unbufferedRest !== void 0 && !unbufferedRest.locked) + try { + await unbufferedRest.pipeTo(new WritableStream()); + } catch { + } + if (result instanceof ReadableStream) + return headers.append(CoreHeaders.OP_RESULT_TYPE, "ReadableStream"), new Response(result, { status, headers }); + { + let stringified = await stringifyWithStreams( + WORKERS_PLATFORM_IMPL, + result, + this.reducers, + /* allowUnbufferedStream */ + allowAsync + ); + if (stringified.unbufferedStream === void 0) + return new Response(stringified.value, { status, headers }); + { + let body = new IdentityTransformStream(), encodedValue = ENCODER.encode(stringified.value), encodedSize = encodedValue.byteLength.toString(); + return headers.set(CoreHeaders.OP_STRINGIFIED_SIZE, encodedSize), this.#writeWithUnbufferedStream( + body.writable, + encodedValue, + stringified.unbufferedStream + ), new Response(body.readable, { status, headers }); + } + } + } + async #writeWithUnbufferedStream(writable, encodedValue, unbufferedStream) { + let writer = writable.getWriter(); + await writer.write(encodedValue), writer.releaseLock(), await unbufferedStream.pipeTo(writable); + } +}; + +// src/workers/core/entry.worker.ts +var encoder = new TextEncoder(); +function getUserRequest(request, env, clientIp) { + let originalUrl = request.headers.get(CoreHeaders.ORIGINAL_URL), url = new URL(originalUrl ?? request.url), rewriteHeadersFromOriginalUrl = !1, proxySharedSecret = request.headers.get( + CoreHeaders.PROXY_SHARED_SECRET + ); + if (proxySharedSecret) { + let secretFromHeader = encoder.encode(proxySharedSecret), configuredSecret = env[CoreBindings.DATA_PROXY_SHARED_SECRET]; + if (secretFromHeader.byteLength === configuredSecret?.byteLength && crypto.subtle.timingSafeEqual(secretFromHeader, configuredSecret)) + rewriteHeadersFromOriginalUrl = !0; + else + throw new HttpError( + 400, + `Disallowed header in request: ${CoreHeaders.PROXY_SHARED_SECRET}=${proxySharedSecret}` + ); + } + let upstreamUrl = env[CoreBindings.TEXT_UPSTREAM_URL]; + if (upstreamUrl !== void 0) { + let path = url.pathname + url.search; + path.startsWith("/") && (path = `./${path.substring(1)}`), url = new URL(path, upstreamUrl), rewriteHeadersFromOriginalUrl = !0; + } + request = new Request(url, request), request.headers.set("Accept-Encoding", "br, gzip"); + let secFetchMode = request.headers.get("X-Mf-Sec-Fetch-Mode"); + if (secFetchMode && request.headers.set("Sec-Fetch-Mode", secFetchMode), request.headers.delete("X-Mf-Sec-Fetch-Mode"), rewriteHeadersFromOriginalUrl && request.headers.set("Host", url.host), clientIp && !request.headers.get("CF-Connecting-IP")) { + let ipv4Regex = /(?.*?):\d+/, ipv6Regex = /\[(?.*?)\]:\d+/, ip = clientIp.match(ipv6Regex)?.groups?.ip ?? clientIp.match(ipv4Regex)?.groups?.ip; + ip && request.headers.set("CF-Connecting-IP", ip); + } + return request.headers.delete(CoreHeaders.PROXY_SHARED_SECRET), request.headers.delete(CoreHeaders.ORIGINAL_URL), request.headers.delete(CoreHeaders.DISABLE_PRETTY_ERROR), request; +} +function getTargetService(request, url, env) { + let service = env[CoreBindings.SERVICE_USER_FALLBACK], override = request.headers.get(CoreHeaders.ROUTE_OVERRIDE); + request.headers.delete(CoreHeaders.ROUTE_OVERRIDE); + let route = override ?? matchRoutes(env[CoreBindings.JSON_ROUTES], url); + return route !== null && (service = env[`${CoreBindings.SERVICE_USER_ROUTE_PREFIX}${route}`]), service; +} +function maybePrettifyError(request, response, env) { + return response.status !== 500 || response.headers.get(CoreHeaders.ERROR_STACK) === null ? response : env[CoreBindings.SERVICE_LOOPBACK].fetch( + "http://localhost/core/error", + { + method: "POST", + headers: request.headers, + body: response.body, + cf: { prettyErrorOriginalUrl: request.url } + } + ); +} +function maybeInjectLiveReload(response, env, ctx) { + let liveReloadScript = env[CoreBindings.DATA_LIVE_RELOAD_SCRIPT]; + if (liveReloadScript === void 0 || !response.headers.get("Content-Type")?.toLowerCase().includes("text/html")) + return response; + let headers = new Headers(response.headers), contentLength = parseInt(headers.get("content-length")); + isNaN(contentLength) || headers.set( + "content-length", + String(contentLength + liveReloadScript.byteLength) + ); + let { readable, writable } = new IdentityTransformStream(); + return ctx.waitUntil( + (async () => { + await response.body?.pipeTo(writable, { preventClose: !0 }); + let writer = writable.getWriter(); + await writer.write(liveReloadScript), await writer.close(); + })() + ), new Response(readable, { + status: response.status, + statusText: response.statusText, + headers + }); +} +var acceptEncodingElement = /^(?[a-z]+|\*)(?:\s*;\s*q=(?\d+(?:.\d+)?))?$/; +function maybeParseAcceptEncodingElement(element) { + let match = acceptEncodingElement.exec(element); + if (match?.groups != null) + return { + coding: match.groups.coding, + weight: match.groups.weight === void 0 ? 1 : parseFloat(match.groups.weight) + }; +} +function parseAcceptEncoding(header) { + let encodings = []; + for (let element of header.split(",")) { + let maybeEncoding = maybeParseAcceptEncodingElement(element.trim()); + maybeEncoding !== void 0 && encodings.push(maybeEncoding); + } + return encodings.sort((a, b) => b.weight - a.weight); +} +function ensureAcceptableEncoding(clientAcceptEncoding, response) { + if (clientAcceptEncoding === null) return response; + let encodings = parseAcceptEncoding(clientAcceptEncoding); + if (encodings.length === 0) return response; + let contentEncoding = response.headers.get("Content-Encoding"), contentType = response.headers.get("Content-Type"); + if (!isCompressedByCloudflareFL(contentType) || contentEncoding !== null && contentEncoding !== "gzip" && contentEncoding !== "br") + return response; + let desiredEncoding, identityDisallowed = !1; + for (let encoding of encodings) + if (encoding.weight === 0) + (encoding.coding === "identity" || encoding.coding === "*") && (identityDisallowed = !0); + else if (encoding.coding === "gzip" || encoding.coding === "br") { + desiredEncoding = encoding.coding; + break; + } else if (encoding.coding === "identity") + break; + return desiredEncoding === void 0 ? identityDisallowed ? new Response("Unsupported Media Type", { + status: 415, + headers: { "Accept-Encoding": "br, gzip" } + }) : (contentEncoding === null || (response = new Response(response.body, response), response.headers.delete("Content-Encoding")), response) : (contentEncoding === desiredEncoding || (response = new Response(response.body, response), response.headers.set("Content-Encoding", desiredEncoding)), response); +} +function colourFromHTTPStatus(status) { + return 200 <= status && status < 300 ? green : 400 <= status && status < 500 ? yellow : 500 <= status ? red : blue; +} +var ADDITIONAL_RESPONSE_LOG_HEADER_NAME = "X-Mf-Additional-Response-Log"; +function maybeLogRequest(req, res, env, ctx, startTime) { + res = new Response(res.body, res); + let additionalResponseLog = res.headers.get( + ADDITIONAL_RESPONSE_LOG_HEADER_NAME + ); + if (res.headers.delete(ADDITIONAL_RESPONSE_LOG_HEADER_NAME), env[CoreBindings.JSON_LOG_LEVEL] < LogLevel2.INFO) return res; + let url = new URL(req.url), statusText = (res.statusText.trim() || STATUS_CODES[res.status]) ?? "", lines = [ + `${bold(req.method)} ${url.pathname} `, + colourFromHTTPStatus(res.status)(`${bold(res.status)} ${statusText} `), + grey(`(${Date.now() - startTime}ms)`) + ]; + additionalResponseLog && lines.push(` ${grey(additionalResponseLog)}`); + let message = reset(lines.join("")); + return ctx.waitUntil( + env[CoreBindings.SERVICE_LOOPBACK].fetch("http://localhost/core/log", { + method: "POST", + headers: { [SharedHeaders2.LOG_LEVEL]: LogLevel2.INFO.toString() }, + body: message + }) + ), res; +} +function handleProxy(request, env) { + let ns = env[CoreBindings.DURABLE_OBJECT_NAMESPACE_PROXY], id = ns.idFromName(""); + return ns.get(id).fetch(request); +} +var entry_worker_default = { + async fetch(request, env, ctx) { + let startTime = Date.now(), clientIp = request.cf?.clientIp, clientCfBlobHeader = request.headers.get(CoreHeaders.CF_BLOB), cf = clientCfBlobHeader ? JSON.parse(clientCfBlobHeader) : { + ...env[CoreBindings.JSON_CF_BLOB], + // Defaulting to empty string to preserve undefined `Accept-Encoding` + // through Wrangler's proxy worker. + clientAcceptEncoding: request.headers.get("Accept-Encoding") ?? "" + }; + if (request = new Request(request, { cf }), request.headers.get(CoreHeaders.OP) !== null) return handleProxy(request, env); + let disablePrettyErrorPage = request.headers.get(CoreHeaders.DISABLE_PRETTY_ERROR) !== null, clientAcceptEncoding = request.headers.get("Accept-Encoding"); + try { + request = getUserRequest(request, env, clientIp); + } catch (e) { + if (e instanceof HttpError) + return e.toResponse(); + throw e; + } + let url = new URL(request.url), service = getTargetService(request, url, env); + if (service === void 0) + return new Response("No entrypoint worker found", { status: 404 }); + try { + if (env[CoreBindings.TRIGGER_HANDLERS]) { + if (url.pathname === "/cdn-cgi/handler/scheduled" || /* legacy URL path */ + url.pathname === "/cdn-cgi/mf/scheduled") + return url.pathname === "/cdn-cgi/mf/scheduled" && ctx.waitUntil( + env[CoreBindings.SERVICE_LOOPBACK].fetch( + "http://localhost/core/log", + { + method: "POST", + headers: { + [SharedHeaders2.LOG_LEVEL]: LogLevel2.WARN.toString() + }, + body: "Triggering scheduled handlers via a request to `/cdn-cgi/mf/scheduled` is deprecated, and will be removed in a future version of Miniflare. Instead, send a request to `/cdn-cgi/handler/scheduled`" + } + ) + ), await handleScheduled(url.searchParams, service); + if (url.pathname === "/cdn-cgi/handler/email") + return await handleEmail( + url.searchParams, + request, + service, + env, + ctx + ); + } + let response = await service.fetch(request); + return disablePrettyErrorPage || (response = await maybePrettifyError(request, response, env)), response = maybeInjectLiveReload(response, env, ctx), response = ensureAcceptableEncoding(clientAcceptEncoding, response), env[CoreBindings.LOG_REQUESTS] && (response = maybeLogRequest(request, response, env, ctx, startTime)), response; + } catch (e) { + return new Response(e?.stack ?? String(e), { status: 500 }); + } + } +}; +export { + ProxyServer, + entry_worker_default as default +}; +//# sourceMappingURL=entry.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/core/entry.worker.js.map b/node_modules/miniflare/dist/src/workers/core/entry.worker.js.map new file mode 100644 index 0000000..ac04e9a --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/core/entry.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../../../node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/colors.mjs", "../../../../src/workers/core/entry.worker.ts", "../../../../src/shared/mime-types.ts", "../../../../src/workers/core/constants.ts", "../../../../src/workers/core/email.ts", "../../../../../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/decode-strings.js", "../../../../../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/pass-through-decoder.js", "../../../../../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/base64-decoder.js", "../../../../../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/qp-decoder.js", "../../../../../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/mime-node.js", "../../../../../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/html-entities.js", "../../../../../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/text-format.js", "../../../../../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/address-parser.js", "../../../../../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/base64-encoder.js", "../../../../../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/postal-mime.js", "../../../../src/workers/email/constants.ts", "../../../../src/workers/email/validate.ts", "../../../../src/workers/core/http.ts", "../../../../src/workers/core/routing.ts", "../../../../src/workers/core/scheduled.ts", "../../../../src/workers/core/proxy.worker.ts", "../../../../../../node_modules/.pnpm/devalue@4.3.2/node_modules/devalue/src/utils.js", "../../../../../../node_modules/.pnpm/devalue@4.3.2/node_modules/devalue/src/parse.js", "../../../../../../node_modules/.pnpm/devalue@4.3.2/node_modules/devalue/src/stringify.js", "../../../../src/workers/core/devalue.ts"], + "mappings": ";AAAA,IAAI,aAAa,qBAAqB,UAAU,MAAM,QAAM;AACxD,OAAO,UAAY,QACrB,EAAE,aAAa,qBAAqB,UAAU,KAAK,IAAI,QAAQ,OAAO,CAAC,GACxE,QAAQ,QAAQ,UAAU,QAAQ,OAAO;AAGnC,IAAM,IAAI;AAAA,EAChB,SAAS,CAAC,uBAAuB,YAAY,QAAQ,SAAS,WAC7D,eAAe,QAAQ,gBAAgB,OAAO;AAEhD;AAEA,SAAS,KAAK,GAAG,GAAG;AACnB,MAAI,MAAM,IAAI,OAAO,WAAW,CAAC,KAAK,GAAG,GACrC,OAAO,QAAQ,CAAC,KAAK,QAAQ,QAAQ,CAAC;AAE1C,SAAO,SAAU,KAAK;AACrB,WAAI,CAAC,EAAE,WAAW,OAAO,OAAa,MAC/B,QAAU,EAAE,KAAG,KAAK,QAAQ,KAAK,IAAI,IAAI,QAAQ,K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AAG;AAClD,QAAI,YAAY;AACf,aAAO,IAAI,SAAS,8BAA8B,EAAE,QAAQ,IAAI,CAAC;AAGlE,QAAI;AACH,UAAI,IAAI,aAAa,gBAAgB,GAAG;AACvC,YACC,IAAI,aAAa;AAAA,QACK,IAAI,aAAa;AAEvC,iBAAI,IAAI,aAAa,2BACpB,IAAI;AAAA,YACH,IAAI,aAAa,gBAAgB,EAAE;AAAA,cAClC;AAAA,cACA;AAAA,gBACC,QAAQ;AAAA,gBACR,SAAS;AAAA,kBACR,CAACC,eAAc,SAAS,GAAGD,UAAS,KAAK,SAAS;AAAA,gBACnD;AAAA,gBACA,MAAM;AAAA,cACP;AAAA,YACD;AAAA,UACD,GAEM,MAAM,gBAAgB,IAAI,cAAc,OAAO;AAGvD,YAAI,IAAI,aAAa;AACpB,iBAAO,MAAM;AAAA,YACZ,IAAI;AAAA,YACJ;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,UACD;AAAA,MAEF;AAEA,UAAI,WAAW,MAAM,QAAQ,MAAM,OAAO;AAC1C,aAAK,2BACJ,WAAW,MAAM,mBAAmB,SAAS,UAAU,GAAG,IAE3D,WAAW,sBAAsB,UAAU,KAAK,GAAG,GACnD,WAAW,yBAAyB,sBAAsB,QAAQ,GAC9D,IAAI,aAAa,YAAY,MAChC,WAAW,gBAAgB,SAAS,UAAU,KAAK,KAAK,SAAS,IAE3D;AAAA,IACR,SAAS,GAAQ;AAChB,aAAO,IAAI,SAAS,GAAG,SAAS,OAAO,CAAC,GAAG,EAAE,QAAQ,IAAI,CAAC;AAAA,IAC3D;AAAA,EACD;AACD;", + "names": ["LogLevel", "SharedHeaders", "c", "escaped", "address", "addresses", "i", "assert", "Buffer", "index", "value", "assert", "assert", "value", "assert", "Buffer", "LogLevel", "SharedHeaders"] +} diff --git a/node_modules/miniflare/dist/src/workers/core/strip-cf-connecting-ip.worker.js b/node_modules/miniflare/dist/src/workers/core/strip-cf-connecting-ip.worker.js new file mode 100644 index 0000000..6dffff9 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/core/strip-cf-connecting-ip.worker.js @@ -0,0 +1,11 @@ +// src/workers/core/strip-cf-connecting-ip.worker.ts +var strip_cf_connecting_ip_worker_default = { + fetch(request) { + let headers = new Headers(request.headers); + return headers.delete("CF-Connecting-IP"), fetch(request, { headers }); + } +}; +export { + strip_cf_connecting_ip_worker_default as default +}; +//# sourceMappingURL=strip-cf-connecting-ip.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/core/strip-cf-connecting-ip.worker.js.map b/node_modules/miniflare/dist/src/workers/core/strip-cf-connecting-ip.worker.js.map new file mode 100644 index 0000000..dbb7a42 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/core/strip-cf-connecting-ip.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../src/workers/core/strip-cf-connecting-ip.worker.ts"], + "mappings": ";AAAA,IAAO,wCAAQ;AAAA,EACd,MAAM,SAAS;AACd,QAAM,UAAU,IAAI,QAAQ,QAAQ,OAAO;AAC3C,mBAAQ,OAAO,kBAAkB,GAC1B,MAAM,SAAS,EAAE,QAAQ,CAAC;AAAA,EAClC;AACD;", + "names": [] +} diff --git a/node_modules/miniflare/dist/src/workers/d1/database.worker.js b/node_modules/miniflare/dist/src/workers/d1/database.worker.js new file mode 100644 index 0000000..4d6dd72 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/d1/database.worker.js @@ -0,0 +1,352 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __decorateClass = (decorators, target, key, kind) => { + for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--) + (decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result); + return kind && result && __defProp(target, key, result), result; +}; + +// src/workers/d1/database.worker.ts +import assert from "node:assert"; +import { + get, + HttpError, + MiniflareDurableObject, + POST, + viewToBuffer +} from "miniflare:shared"; +import { z } from "miniflare:zod"; + +// src/workers/d1/dumpSql.ts +function* dumpSql(db, options) { + yield "PRAGMA defer_foreign_keys=TRUE;"; + let filterTables = new Set(options?.tables || []), { noData, noSchema } = options || {}, tables_cursor = db.prepare(` + SELECT name, type, sql + FROM sqlite_schema AS o + WHERE (true) AND type=='table' + AND sql NOT NULL + ORDER BY tbl_name='sqlite_sequence', rowid; + `)(), tables = Array.from(tables_cursor); + for (let { name: table, sql } of tables) { + if (filterTables.size > 0 && !filterTables.has(table)) continue; + if (table === "sqlite_sequence") + noSchema || (yield "DELETE FROM sqlite_sequence;"); + else if (table.match(/^sqlite_stat./)) + noSchema || (yield "ANALYZE sqlite_schema;"); + else { + if (sql.startsWith("CREATE VIRTUAL TABLE")) + throw new Error( + "D1 Export error: cannot export databases with Virtual Tables (fts5)" + ); + if (table.startsWith("_cf_") || table.startsWith("sqlite_")) + continue; + sql.match(/CREATE TABLE ['"].*/) ? noSchema || (yield `CREATE TABLE IF NOT EXISTS ${sql.substring(13)};`) : noSchema || (yield `${sql};`); + } + if (noData) continue; + let columns_cursor = db.exec(`PRAGMA table_info="${table}"`), columns = Array.from(columns_cursor), select = `SELECT ${columns.map((c) => c.name).join(", ")} + FROM "${table}";`, rows_cursor = db.exec(select); + for (let dataRow of rows_cursor.raw()) { + let formattedCells = dataRow.map((cell, i) => { + let colType = columns[i].type, cellType = typeof cell; + return cell === null ? "NULL" : colType === "INTEGER" || cellType === "number" ? cell : colType === "TEXT" || cellType === "string" ? outputQuotedEscapedString(cell) : cell instanceof ArrayBuffer ? `X'${Array.prototype.map.call(new Uint8Array(cell), (b) => b.toString(16).padStart(2, "0")).join("")}'` : (console.log({ colType, cellType, cell, column: columns[i] }), "ERROR"); + }); + yield `INSERT INTO ${sqliteQuote(table)} VALUES(${formattedCells.join(",")});`; + } + } + if (!noSchema) { + let rest_of_schema = db.exec( + "SELECT name, sql FROM sqlite_schema AS o WHERE (true) AND sql NOT NULL AND type IN ('index', 'trigger', 'view') ORDER BY type COLLATE NOCASE /* DESC */;" + ); + for (let { name, sql } of rest_of_schema) + filterTables.size > 0 && !filterTables.has(name) || (yield `${sql};`); + } +} +function outputQuotedEscapedString(cell) { + let lfs = !1, crs = !1, quotesOrNewlinesRegexp = /'|(\n)|(\r)/g, escapeQuotesDetectingNewlines = (_, lf, cr) => lf ? (lfs = !0, "\\n") : cr ? (crs = !0, "\\r") : "''", output_string = `'${cell.replace( + quotesOrNewlinesRegexp, + escapeQuotesDetectingNewlines + )}'`; + return crs && (output_string = `replace(${output_string},'\\r',char(13))`), lfs && (output_string = `replace(${output_string},'\\n',char(10))`), output_string; +} +function sqliteQuote(token) { + return token.length === 0 || // Doesn't start with alpha or underscore + !token.match(/^[a-zA-Z_]/) || token.match(/\W/) || SQLITE_KEYWORDS.has(token.toUpperCase()) ? `"${token}"` : token; +} +var SQLITE_KEYWORDS = /* @__PURE__ */ new Set([ + "ABORT", + "ACTION", + "ADD", + "AFTER", + "ALL", + "ALTER", + "ALWAYS", + "ANALYZE", + "AND", + "AS", + "ASC", + "ATTACH", + "AUTOINCREMENT", + "BEFORE", + "BEGIN", + "BETWEEN", + "BY", + "CASCADE", + "CASE", + "CAST", + "CHECK", + "COLLATE", + "COLUMN", + "COMMIT", + "CONFLICT", + "CONSTRAINT", + "CREATE", + "CROSS", + "CURRENT", + "CURRENT_DATE", + "CURRENT_TIME", + "CURRENT_TIMESTAMP", + "DATABASE", + "DEFAULT", + "DEFERRED", + "DEFERRABLE", + "DELETE", + "DESC", + "DETACH", + "DISTINCT", + "DO", + "DROP", + "END", + "EACH", + "ELSE", + "ESCAPE", + "EXCEPT", + "EXCLUSIVE", + "EXCLUDE", + "EXISTS", + "EXPLAIN", + "FAIL", + "FILTER", + "FIRST", + "FOLLOWING", + "FOR", + "FOREIGN", + "FROM", + "FULL", + "GENERATED", + "GLOB", + "GROUP", + "GROUPS", + "HAVING", + "IF", + "IGNORE", + "IMMEDIATE", + "IN", + "INDEX", + "INDEXED", + "INITIALLY", + "INNER", + "INSERT", + "INSTEAD", + "INTERSECT", + "INTO", + "IS", + "ISNULL", + "JOIN", + "KEY", + "LAST", + "LEFT", + "LIKE", + "LIMIT", + "MATCH", + "MATERIALIZED", + "NATURAL", + "NO", + "NOT", + "NOTHING", + "NOTNULL", + "NULL", + "NULLS", + "OF", + "OFFSET", + "ON", + "OR", + "ORDER", + "OTHERS", + "OUTER", + "OVER", + "PARTITION", + "PLAN", + "PRAGMA", + "PRECEDING", + "PRIMARY", + "QUERY", + "RAISE", + "RANGE", + "RECURSIVE", + "REFERENCES", + "REGEXP", + "REINDEX", + "RELEASE", + "RENAME", + "REPLACE", + "RESTRICT", + "RETURNING", + "RIGHT", + "ROLLBACK", + "ROW", + "ROWS", + "SAVEPOINT", + "SELECT", + "SET", + "TABLE", + "TEMP", + "TEMPORARY", + "THEN", + "TIES", + "TO", + "TRANSACTION", + "TRIGGER", + "UNBOUNDED", + "UNION", + "UNIQUE", + "UPDATE", + "USING", + "VACUUM", + "VALUES", + "VIEW", + "VIRTUAL", + "WHEN", + "WHERE", + "WINDOW", + "WITH", + "WITHOUT" +]); + +// src/workers/d1/database.worker.ts +var D1ValueSchema = z.union([ + z.number(), + z.string(), + z.null(), + z.number().array() +]), D1QuerySchema = z.object({ + sql: z.string(), + params: z.array(D1ValueSchema).nullable().optional() +}), D1QueriesSchema = z.union([D1QuerySchema, z.array(D1QuerySchema)]), D1_EXPORT_PRAGMA = "PRAGMA miniflare_d1_export(?,?,?);", D1ResultsFormatSchema = z.enum(["ARRAY_OF_OBJECTS", "ROWS_AND_COLUMNS", "NONE"]).catch("ARRAY_OF_OBJECTS"), served_by = "miniflare.db", D1_SESSION_COMMIT_TOKEN_HTTP_HEADER = "x-cf-d1-session-commit-token", D1Error = class extends HttpError { + constructor(cause) { + super(500); + this.cause = cause; + } + toResponse() { + let response = { success: !1, error: typeof this.cause == "object" && this.cause !== null && "message" in this.cause && typeof this.cause.message == "string" ? this.cause.message : String(this.cause) }; + return Response.json(response); + } +}; +function convertParams(params) { + return (params ?? []).map( + (param) => ( + // If `param` is an array, assume it's a byte array + Array.isArray(param) ? viewToBuffer(new Uint8Array(param)) : param + ) + ); +} +function convertRows(rows) { + return rows.map( + (row) => row.map((value) => { + let normalised; + return value instanceof ArrayBuffer ? normalised = Array.from(new Uint8Array(value)) : normalised = value, normalised; + }) + ); +} +function rowsToObjects(columns, rows) { + return rows.map( + (row) => Object.fromEntries(columns.map((name, i) => [name, row[i]])) + ); +} +function sqlStmts(db) { + return { + getChanges: db.prepare( + "SELECT total_changes() AS totalChanges, last_insert_rowid() AS lastRowId" + ) + }; +} +var D1DatabaseObject = class extends MiniflareDurableObject { + #stmts; + constructor(state, env) { + super(state, env), this.#stmts = sqlStmts(this.db); + } + #changes() { + let changes = get(this.#stmts.getChanges()); + return assert(changes !== void 0), changes; + } + #query = (format, query) => { + let beforeTime = performance.now(), beforeSize = this.state.storage.sql.databaseSize, beforeChanges = this.#changes(), params = convertParams(query.params ?? []), cursor = this.db.prepare(query.sql)(...params), columns = cursor.columnNames, rows = convertRows(Array.from(cursor.raw())), results; + format === "ROWS_AND_COLUMNS" ? results = { columns, rows } : results = rowsToObjects(columns, rows); + let afterTime = performance.now(), afterSize = this.state.storage.sql.databaseSize, afterChanges = this.#changes(), duration = afterTime - beforeTime, changes = afterChanges.totalChanges - beforeChanges.totalChanges, hasChanges = changes !== 0, lastRowChanged = afterChanges.lastRowId !== beforeChanges.lastRowId, changed = hasChanges || lastRowChanged || afterSize !== beforeSize; + return { + success: !0, + results, + meta: { + served_by, + duration, + changes, + last_row_id: afterChanges.lastRowId, + changed_db: changed, + size_after: afterSize, + rows_read: cursor.rowsRead, + rows_written: cursor.rowsWritten + } + }; + }; + #txn(queries, format) { + if (queries = queries.filter( + (query) => query.sql.replace(/^\s+--.*/gm, "").trim().length > 0 + ), queries.length === 0) { + let error = new Error("No SQL statements detected."); + throw new D1Error(error); + } + try { + return this.state.storage.transactionSync( + () => queries.map(this.#query.bind(this, format)) + ); + } catch (e) { + throw new D1Error(e); + } + } + queryExecute = async (req) => { + let queries = D1QueriesSchema.parse(await req.json()); + if (Array.isArray(queries) || (queries = [queries]), this.#isExportPragma(queries)) + return this.#doExportData(queries); + let { searchParams } = new URL(req.url), resultsFormat = D1ResultsFormatSchema.parse( + searchParams.get("resultsFormat") + ); + return Response.json(this.#txn(queries, resultsFormat), { + headers: { + [D1_SESSION_COMMIT_TOKEN_HTTP_HEADER]: await this.state.storage.getCurrentBookmark() + } + }); + }; + #isExportPragma(queries) { + return queries.length === 1 && queries[0].sql === D1_EXPORT_PRAGMA && (queries[0].params?.length || 0) >= 2; + } + #doExportData(queries) { + let [noSchema, noData, ...tables] = queries[0].params, options = { + noSchema: !!noSchema, + noData: !!noData, + tables + }; + return Response.json({ + success: !0, + results: [Array.from(dumpSql(this.state.storage.sql, options))], + meta: {} + }); + } +}; +__decorateClass([ + POST("/query"), + POST("/execute") +], D1DatabaseObject.prototype, "queryExecute", 2); +export { + D1DatabaseObject, + D1Error +}; +//# sourceMappingURL=database.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/d1/database.worker.js.map b/node_modules/miniflare/dist/src/workers/d1/database.worker.js.map new file mode 100644 index 0000000..076f5ea --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/d1/database.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../src/workers/d1/database.worker.ts", "../../../../src/workers/d1/dumpSql.ts"], + "mappings": ";;;;;;;;;AAAA,OAAO,YAAY;AACnB;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EAIA;AAAA,OACM;AACP,SAAS,SAAS;;;ACRX,UAAU,QAChB,IACA,SAKC;AACD,QAAM;AAGN,MAAM,eAAe,IAAI,IAAI,SAAS,UAAU,CAAC,CAAC,GAC5C,EAAE,QAAQ,SAAS,IAAI,WAAW,CAAC,GAInC,gBAAgB,GAAG,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,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,KAAK,MAAM,QAAQ,mBAAmB;AAAA,MAC9C;AAAA,IACD,CAAC;AAAA,EACF;AAAA,EAEA,gBAAgB,SAA+C;AAC9D,WACC,QAAQ,WAAW,KACnB,QAAQ,CAAC,EAAE,QAAQ,qBAClB,QAAQ,CAAC,EAAE,QAAQ,UAAU,MAAM;AAAA,EAEtC;AAAA,EAEA,cACC,SAGC;AACD,QAAM,CAAC,UAAU,QAAQ,GAAG,MAAM,IAAI,QAAQ,CAAC,EAAE,QAC3C,UAAU;AAAA,MACf,UAAU,EAAQ;AAAA,MAClB,QAAQ,EAAQ;AAAA,MAChB;AAAA,IACD;AACA,WAAO,SAAS,KAAK;AAAA,MACpB,SAAS;AAAA,MACT,SAAS,CAAC,MAAM,KAAK,QAAQ,KAAK,MAAM,QAAQ,KAAK,OAAO,CAAC,CAAC;AAAA,MAC9D,MAAM,CAAC;AAAA,IACR,CAAC;AAAA,EACF;AACD;AA/CC;AAAA,EAFC,KAAK,QAAQ;AAAA,EACb,KAAK,UAAU;AAAA,GA/EJ,iBAgFZ;", + "names": [] +} diff --git a/node_modules/miniflare/dist/src/workers/dispatch-namespace/dispatch-namespace.worker.js b/node_modules/miniflare/dist/src/workers/dispatch-namespace/dispatch-namespace.worker.js new file mode 100644 index 0000000..df70a3c --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/dispatch-namespace/dispatch-namespace.worker.js @@ -0,0 +1,25 @@ +// src/workers/dispatch-namespace/dispatch-namespace.worker.ts +var LocalDispatchNamespace = class { + constructor(env) { + this.env = env; + } + get(name, args, options) { + return { + ...this.env.fetcher, + fetch: (input, init) => { + let request = new Request(input, init); + return request.headers.set( + "MF-Dispatch-Namespace-Options", + JSON.stringify({ name, args, options }) + ), this.env.fetcher.fetch(request); + } + }; + } +}; +function dispatch_namespace_worker_default(env) { + return new LocalDispatchNamespace(env); +} +export { + dispatch_namespace_worker_default as default +}; +//# sourceMappingURL=dispatch-namespace.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/dispatch-namespace/dispatch-namespace.worker.js.map b/node_modules/miniflare/dist/src/workers/dispatch-namespace/dispatch-namespace.worker.js.map new file mode 100644 index 0000000..bd12cff --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/dispatch-namespace/dispatch-namespace.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../src/workers/dispatch-namespace/dispatch-namespace.worker.ts"], + "mappings": ";AAIA,IAAM,yBAAN,MAA0D;AAAA,EACzD,YAAoB,KAAU;AAAV;AAAA,EAAW;AAAA,EAC/B,IACC,MACA,MACA,SACU;AACV,WAAO;AAAA,MACN,GAAG,KAAK,IAAI;AAAA,MACZ,OAAO,CACN,OACA,SACuB;AACvB,YAAM,UAAU,IAAI,QAAQ,OAAO,IAAI;AACvC,uBAAQ,QAAQ;AAAA,UACf;AAAA,UACA,KAAK,UAAU,EAAE,MAAM,MAAM,QAAQ,CAAC;AAAA,QACvC,GACO,KAAK,IAAI,QAAQ,MAAM,OAAO;AAAA,MACtC;AAAA,IACD;AAAA,EACD;AACD;AAEe,SAAR,kCAAkB,KAAU;AAClC,SAAO,IAAI,uBAAuB,GAAG;AACtC;", + "names": [] +} diff --git a/node_modules/miniflare/dist/src/workers/email/email.worker.js b/node_modules/miniflare/dist/src/workers/email/email.worker.js new file mode 100644 index 0000000..5f26ac2 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/email/email.worker.js @@ -0,0 +1,23 @@ +// src/workers/email/constants.ts +var RAW_EMAIL = "EmailMessage::raw"; + +// src/workers/email/email.worker.ts +var EmailMessage = class { + constructor(from, to, raw) { + this.from = from; + this.to = to; + this.raw = raw; + return { + from, + to, + // @ts-expect-error We need to be able to access the raw contents of an EmailMessage in entry.worker.ts + [RAW_EMAIL]: raw + }; + } +}, email_worker_default = { + EmailMessage +}; +export { + email_worker_default as default +}; +//# sourceMappingURL=email.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/email/email.worker.js.map b/node_modules/miniflare/dist/src/workers/email/email.worker.js.map new file mode 100644 index 0000000..10eb17a --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/email/email.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../src/workers/email/constants.ts", "../../../../src/workers/email/email.worker.ts"], + "mappings": ";AAAO,IAAM,YAAY;;;ACWzB,IAAM,eAAN,MAA+C;AAAA,EACvC,YACU,MACA,IACR,KACP;AAHe;AACA;AACR;AAQR,WAAO;AAAA,MACN;AAAA,MACA;AAAA;AAAA,MAEA,CAAC,SAAS,GAAG;AAAA,IACd;AAAA,EACD;AACD,GACO,uBAAQ;AAAA,EACd;AACD;", + "names": [] +} diff --git a/node_modules/miniflare/dist/src/workers/email/send_email.worker.js b/node_modules/miniflare/dist/src/workers/email/send_email.worker.js new file mode 100644 index 0000000..c926e30 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/email/send_email.worker.js @@ -0,0 +1,3181 @@ +// src/workers/email/send_email.worker.ts +import { WorkerEntrypoint } from "cloudflare:workers"; + +// ../../node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/colors.mjs +var FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM, isTTY = !0; +typeof process < "u" && ({ FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM } = process.env || {}, isTTY = process.stdout && process.stdout.isTTY); +var $ = { + enabled: !NODE_DISABLE_COLORS && NO_COLOR == null && TERM !== "dumb" && (FORCE_COLOR != null && FORCE_COLOR !== "0" || isTTY) +}; +function init(x, y) { + let rgx = new RegExp(`\\x1b\\[${y}m`, "g"), open = `\x1B[${x}m`, close = `\x1B[${y}m`; + return function(txt) { + return !$.enabled || txt == null ? txt : open + (~("" + txt).indexOf(close) ? txt.replace(rgx, close + open) : txt) + close; + }; +} +var reset = init(0, 0), bold = init(1, 22), dim = init(2, 22), italic = init(3, 23), underline = init(4, 24), inverse = init(7, 27), hidden = init(8, 28), strikethrough = init(9, 29), black = init(30, 39), red = init(31, 39), green = init(32, 39), yellow = init(33, 39), blue = init(34, 39), magenta = init(35, 39), cyan = init(36, 39), white = init(37, 39), gray = init(90, 39), grey = init(90, 39), bgBlack = init(40, 49), bgRed = init(41, 49), bgGreen = init(42, 49), bgYellow = init(43, 49), bgBlue = init(44, 49), bgMagenta = init(45, 49), bgCyan = init(46, 49), bgWhite = init(47, 49); + +// src/workers/email/send_email.worker.ts +import { LogLevel, SharedHeaders } from "miniflare:shared"; + +// ../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/decode-strings.js +var textEncoder = new TextEncoder(), base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", base64Lookup = new Uint8Array(256); +for (i = 0; i < base64Chars.length; i++) + base64Lookup[base64Chars.charCodeAt(i)] = i; +var i; +function decodeBase64(base64) { + let bufferLength = Math.ceil(base64.length / 4) * 3, len = base64.length, p = 0; + base64.length % 4 === 3 ? bufferLength-- : base64.length % 4 === 2 ? bufferLength -= 2 : base64[base64.length - 1] === "=" && (bufferLength--, base64[base64.length - 2] === "=" && bufferLength--); + let arrayBuffer = new ArrayBuffer(bufferLength), bytes = new Uint8Array(arrayBuffer); + for (let i = 0; i < len; i += 4) { + let encoded1 = base64Lookup[base64.charCodeAt(i)], encoded2 = base64Lookup[base64.charCodeAt(i + 1)], encoded3 = base64Lookup[base64.charCodeAt(i + 2)], encoded4 = base64Lookup[base64.charCodeAt(i + 3)]; + bytes[p++] = encoded1 << 2 | encoded2 >> 4, bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2, bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63; + } + return arrayBuffer; +} +function getDecoder(charset) { + return charset = charset || "utf8", new TextDecoder(charset); +} +async function blobToArrayBuffer(blob) { + if ("arrayBuffer" in blob) + return await blob.arrayBuffer(); + let fr = new FileReader(); + return new Promise((resolve, reject) => { + fr.onload = function(e) { + resolve(e.target.result); + }, fr.onerror = function(e) { + reject(fr.error); + }, fr.readAsArrayBuffer(blob); + }); +} +function getHex(c) { + return c >= 48 && c <= 57 || c >= 97 && c <= 102 || c >= 65 && c <= 70 ? String.fromCharCode(c) : !1; +} +function decodeWord(charset, encoding, str) { + let splitPos = charset.indexOf("*"); + splitPos >= 0 && (charset = charset.substr(0, splitPos)), encoding = encoding.toUpperCase(); + let byteStr; + if (encoding === "Q") { + str = str.replace(/=\s+([0-9a-fA-F])/g, "=$1").replace(/[_\s]/g, " "); + let buf = textEncoder.encode(str), encodedBytes = []; + for (let i = 0, len = buf.length; i < len; i++) { + let c = buf[i]; + if (i <= len - 2 && c === 61) { + let c1 = getHex(buf[i + 1]), c2 = getHex(buf[i + 2]); + if (c1 && c2) { + let c3 = parseInt(c1 + c2, 16); + encodedBytes.push(c3), i += 2; + continue; + } + } + encodedBytes.push(c); + } + byteStr = new ArrayBuffer(encodedBytes.length); + let dataView = new DataView(byteStr); + for (let i = 0, len = encodedBytes.length; i < len; i++) + dataView.setUint8(i, encodedBytes[i]); + } else encoding === "B" ? byteStr = decodeBase64(str.replace(/[^a-zA-Z0-9\+\/=]+/g, "")) : byteStr = textEncoder.encode(str); + return getDecoder(charset).decode(byteStr); +} +function decodeWords(str) { + let joinString = !0, done = !1; + for (; !done; ) { + let result = (str || "").toString().replace(/(=\?([^?]+)\?[Bb]\?([^?]*)\?=)\s*(?==\?([^?]+)\?[Bb]\?[^?]*\?=)/g, (match, left, chLeft, encodedLeftStr, chRight) => joinString && chLeft === chRight && encodedLeftStr.length % 4 === 0 && !/=$/.test(encodedLeftStr) ? left + "__\0JOIN\0__" : match).replace(/(=\?([^?]+)\?[Qq]\?[^?]*\?=)\s*(?==\?([^?]+)\?[Qq]\?[^?]*\?=)/g, (match, left, chLeft, chRight) => joinString && chLeft === chRight ? left + "__\0JOIN\0__" : match).replace(/(\?=)?__\x00JOIN\x00__(=\?([^?]+)\?[QqBb]\?)?/g, "").replace(/(=\?[^?]+\?[QqBb]\?[^?]*\?=)\s+(?==\?[^?]+\?[QqBb]\?[^?]*\?=)/g, "$1").replace(/=\?([\w_\-*]+)\?([QqBb])\?([^?]*)\?=/g, (m, charset, encoding, text) => decodeWord(charset, encoding, text)); + if (joinString && result.indexOf("\uFFFD") >= 0) + joinString = !1; + else + return result; + } +} +function decodeURIComponentWithCharset(encodedStr, charset) { + charset = charset || "utf-8"; + let encodedBytes = []; + for (let i = 0; i < encodedStr.length; i++) { + let c = encodedStr.charAt(i); + if (c === "%" && /^[a-f0-9]{2}/i.test(encodedStr.substr(i + 1, 2))) { + let byte = encodedStr.substr(i + 1, 2); + i += 2, encodedBytes.push(parseInt(byte, 16)); + } else if (c.charCodeAt(0) > 126) { + c = textEncoder.encode(c); + for (let j = 0; j < c.length; j++) + encodedBytes.push(c[j]); + } else + encodedBytes.push(c.charCodeAt(0)); + } + let byteStr = new ArrayBuffer(encodedBytes.length), dataView = new DataView(byteStr); + for (let i = 0, len = encodedBytes.length; i < len; i++) + dataView.setUint8(i, encodedBytes[i]); + return getDecoder(charset).decode(byteStr); +} +function decodeParameterValueContinuations(header) { + let paramKeys = /* @__PURE__ */ new Map(); + Object.keys(header.params).forEach((key) => { + let match = key.match(/\*((\d+)\*?)?$/); + if (!match) + return; + let actualKey = key.substr(0, match.index).toLowerCase(), nr = Number(match[2]) || 0, paramVal; + paramKeys.has(actualKey) ? paramVal = paramKeys.get(actualKey) : (paramVal = { + charset: !1, + values: [] + }, paramKeys.set(actualKey, paramVal)); + let value = header.params[key]; + nr === 0 && match[0].charAt(match[0].length - 1) === "*" && (match = value.match(/^([^']*)'[^']*'(.*)$/)) && (paramVal.charset = match[1] || "utf-8", value = match[2]), paramVal.values.push({ nr, value }), delete header.params[key]; + }), paramKeys.forEach((paramVal, key) => { + header.params[key] = decodeURIComponentWithCharset( + paramVal.values.sort((a, b) => a.nr - b.nr).map((a) => a.value).join(""), + paramVal.charset + ); + }); +} + +// ../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/pass-through-decoder.js +var PassThroughDecoder = class { + constructor() { + this.chunks = []; + } + update(line) { + this.chunks.push(line), this.chunks.push(` +`); + } + finalize() { + return blobToArrayBuffer(new Blob(this.chunks, { type: "application/octet-stream" })); + } +}; + +// ../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/base64-decoder.js +var Base64Decoder = class { + constructor(opts) { + opts = opts || {}, this.decoder = opts.decoder || new TextDecoder(), this.maxChunkSize = 100 * 1024, this.chunks = [], this.remainder = ""; + } + update(buffer) { + let str = this.decoder.decode(buffer); + if (/[^a-zA-Z0-9+\/]/.test(str) && (str = str.replace(/[^a-zA-Z0-9+\/]+/g, "")), this.remainder += str, this.remainder.length >= this.maxChunkSize) { + let allowedBytes = Math.floor(this.remainder.length / 4) * 4, base64Str; + allowedBytes === this.remainder.length ? (base64Str = this.remainder, this.remainder = "") : (base64Str = this.remainder.substr(0, allowedBytes), this.remainder = this.remainder.substr(allowedBytes)), base64Str.length && this.chunks.push(decodeBase64(base64Str)); + } + } + finalize() { + return this.remainder && !/^=+$/.test(this.remainder) && this.chunks.push(decodeBase64(this.remainder)), blobToArrayBuffer(new Blob(this.chunks, { type: "application/octet-stream" })); + } +}; + +// ../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/qp-decoder.js +var QPDecoder = class { + constructor(opts) { + opts = opts || {}, this.decoder = opts.decoder || new TextDecoder(), this.maxChunkSize = 100 * 1024, this.remainder = "", this.chunks = []; + } + decodeQPBytes(encodedBytes) { + let buf = new ArrayBuffer(encodedBytes.length), dataView = new DataView(buf); + for (let i = 0, len = encodedBytes.length; i < len; i++) + dataView.setUint8(i, parseInt(encodedBytes[i], 16)); + return buf; + } + decodeChunks(str) { + str = str.replace(/=\r?\n/g, ""); + let list = str.split(/(?==)/), encodedBytes = []; + for (let part of list) { + if (part.charAt(0) !== "=") { + encodedBytes.length && (this.chunks.push(this.decodeQPBytes(encodedBytes)), encodedBytes = []), this.chunks.push(part); + continue; + } + if (part.length === 3) { + encodedBytes.push(part.substr(1)); + continue; + } + part.length > 3 && (encodedBytes.push(part.substr(1, 2)), this.chunks.push(this.decodeQPBytes(encodedBytes)), encodedBytes = [], part = part.substr(3), this.chunks.push(part)); + } + encodedBytes.length && (this.chunks.push(this.decodeQPBytes(encodedBytes)), encodedBytes = []); + } + update(buffer) { + let str = this.decoder.decode(buffer) + ` +`; + if (str = this.remainder + str, str.length < this.maxChunkSize) { + this.remainder = str; + return; + } + this.remainder = ""; + let partialEnding = str.match(/=[a-fA-F0-9]?$/); + if (partialEnding) { + if (partialEnding.index === 0) { + this.remainder = str; + return; + } + this.remainder = str.substr(partialEnding.index), str = str.substr(0, partialEnding.index); + } + this.decodeChunks(str); + } + finalize() { + return this.remainder.length && (this.decodeChunks(this.remainder), this.remainder = ""), blobToArrayBuffer(new Blob(this.chunks, { type: "application/octet-stream" })); + } +}; + +// ../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/mime-node.js +var MimeNode = class { + constructor(opts) { + opts = opts || {}, this.postalMime = opts.postalMime, this.root = !!opts.parentNode, this.childNodes = [], opts.parentNode && opts.parentNode.childNodes.push(this), this.state = "header", this.headerLines = [], this.contentType = { + value: "text/plain", + default: !0 + }, this.contentTransferEncoding = { + value: "8bit" + }, this.contentDisposition = { + value: "" + }, this.headers = [], this.contentDecoder = !1; + } + setupContentDecoder(transferEncoding) { + /base64/i.test(transferEncoding) ? this.contentDecoder = new Base64Decoder() : /quoted-printable/i.test(transferEncoding) ? this.contentDecoder = new QPDecoder({ decoder: getDecoder(this.contentType.parsed.params.charset) }) : this.contentDecoder = new PassThroughDecoder(); + } + async finalize() { + if (this.state === "finished") + return; + this.state === "header" && this.processHeaders(); + let boundaries = this.postalMime.boundaries; + for (let i = boundaries.length - 1; i >= 0; i--) + if (boundaries[i].node === this) { + boundaries.splice(i, 1); + break; + } + await this.finalizeChildNodes(), this.content = this.contentDecoder ? await this.contentDecoder.finalize() : null, this.state = "finished"; + } + async finalizeChildNodes() { + for (let childNode of this.childNodes) + await childNode.finalize(); + } + parseStructuredHeader(str) { + let response = { + value: !1, + params: {} + }, key = !1, value = "", stage = "value", quote = !1, escaped = !1, chr; + for (let i = 0, len = str.length; i < len; i++) + switch (chr = str.charAt(i), stage) { + case "key": + if (chr === "=") { + key = value.trim().toLowerCase(), stage = "value", value = ""; + break; + } + value += chr; + break; + case "value": + if (escaped) + value += chr; + else if (chr === "\\") { + escaped = !0; + continue; + } else quote && chr === quote ? quote = !1 : !quote && chr === '"' ? quote = chr : !quote && chr === ";" ? (key === !1 ? response.value = value.trim() : response.params[key] = value.trim(), stage = "key", value = "") : value += chr; + escaped = !1; + break; + } + return value = value.trim(), stage === "value" ? key === !1 ? response.value = value : response.params[key] = value : value && (response.params[value.toLowerCase()] = ""), response.value && (response.value = response.value.toLowerCase()), decodeParameterValueContinuations(response), response; + } + decodeFlowedText(str, delSp) { + return str.split(/\r?\n/).reduce((previousValue, currentValue) => / $/.test(previousValue) && !/(^|\n)-- $/.test(previousValue) ? delSp ? previousValue.slice(0, -1) + currentValue : previousValue + currentValue : previousValue + ` +` + currentValue).replace(/^ /gm, ""); + } + getTextContent() { + if (!this.content) + return ""; + let str = getDecoder(this.contentType.parsed.params.charset).decode(this.content); + return /^flowed$/i.test(this.contentType.parsed.params.format) && (str = this.decodeFlowedText(str, /^yes$/i.test(this.contentType.parsed.params.delsp))), str; + } + processHeaders() { + for (let i = this.headerLines.length - 1; i >= 0; i--) { + let line = this.headerLines[i]; + if (i && /^\s/.test(line)) + this.headerLines[i - 1] += ` +` + line, this.headerLines.splice(i, 1); + else { + line = line.replace(/\s+/g, " "); + let sep = line.indexOf(":"), key = sep < 0 ? line.trim() : line.substr(0, sep).trim(), value = sep < 0 ? "" : line.substr(sep + 1).trim(); + switch (this.headers.push({ key: key.toLowerCase(), originalKey: key, value }), key.toLowerCase()) { + case "content-type": + this.contentType.default && (this.contentType = { value, parsed: {} }); + break; + case "content-transfer-encoding": + this.contentTransferEncoding = { value, parsed: {} }; + break; + case "content-disposition": + this.contentDisposition = { value, parsed: {} }; + break; + case "content-id": + this.contentId = value; + break; + case "content-description": + this.contentDescription = value; + break; + } + } + } + this.contentType.parsed = this.parseStructuredHeader(this.contentType.value), this.contentType.multipart = /^multipart\//i.test(this.contentType.parsed.value) ? this.contentType.parsed.value.substr(this.contentType.parsed.value.indexOf("/") + 1) : !1, this.contentType.multipart && this.contentType.parsed.params.boundary && this.postalMime.boundaries.push({ + value: textEncoder.encode(this.contentType.parsed.params.boundary), + node: this + }), this.contentDisposition.parsed = this.parseStructuredHeader(this.contentDisposition.value), this.contentTransferEncoding.encoding = this.contentTransferEncoding.value.toLowerCase().split(/[^\w-]/).shift(), this.setupContentDecoder(this.contentTransferEncoding.encoding); + } + feed(line) { + switch (this.state) { + case "header": + if (!line.length) + return this.state = "body", this.processHeaders(); + this.headerLines.push(getDecoder().decode(line)); + break; + case "body": + this.contentDecoder.update(line); + } + } +}; + +// ../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/html-entities.js +var htmlEntities = { + "Æ": "\xC6", + "Æ": "\xC6", + "&": "&", + "&": "&", + "Á": "\xC1", + "Á": "\xC1", + "Ă": "\u0102", + "Â": "\xC2", + "Â": "\xC2", + "А": "\u0410", + "𝔄": "\u{1D504}", + "À": "\xC0", + "À": "\xC0", + "Α": "\u0391", + "Ā": "\u0100", + "⩓": "\u2A53", + "Ą": "\u0104", + "𝔸": "\u{1D538}", + "⁡": "\u2061", + "Å": "\xC5", + "Å": "\xC5", + "𝒜": "\u{1D49C}", + "≔": "\u2254", + "Ã": "\xC3", + "Ã": "\xC3", + "Ä": "\xC4", + "Ä": "\xC4", + "∖": "\u2216", + "⫧": "\u2AE7", + "⌆": "\u2306", + "Б": "\u0411", + "∵": "\u2235", + "ℬ": "\u212C", + "Β": "\u0392", + "𝔅": "\u{1D505}", + "𝔹": "\u{1D539}", + "˘": "\u02D8", + "ℬ": "\u212C", + "≎": "\u224E", + "Ч": "\u0427", + "©": "\xA9", + "©": "\xA9", + "Ć": "\u0106", + "⋒": "\u22D2", + "ⅅ": "\u2145", + "ℭ": "\u212D", + "Č": "\u010C", + "Ç": "\xC7", + "Ç": "\xC7", + "Ĉ": "\u0108", + "∰": "\u2230", + "Ċ": "\u010A", + "¸": "\xB8", + "·": "\xB7", + "ℭ": "\u212D", + "Χ": "\u03A7", + "⊙": "\u2299", + "⊖": "\u2296", + "⊕": "\u2295", + "⊗": "\u2297", + "∲": "\u2232", + "”": "\u201D", + "’": "\u2019", + "∷": "\u2237", + "⩴": "\u2A74", + "≡": "\u2261", + "∯": "\u222F", + "∮": "\u222E", + "ℂ": "\u2102", + "∐": "\u2210", + "∳": "\u2233", + "⨯": "\u2A2F", + "𝒞": "\u{1D49E}", + "⋓": "\u22D3", + "≍": "\u224D", + "ⅅ": "\u2145", + "⤑": "\u2911", + "Ђ": "\u0402", + "Ѕ": "\u0405", + "Џ": "\u040F", + "‡": "\u2021", + "↡": "\u21A1", + "⫤": "\u2AE4", + "Ď": "\u010E", + "Д": "\u0414", + "∇": "\u2207", + "Δ": "\u0394", + "𝔇": "\u{1D507}", + "´": "\xB4", + "˙": "\u02D9", + "˝": "\u02DD", + "`": "`", + "˜": "\u02DC", + "⋄": "\u22C4", + "ⅆ": "\u2146", + "𝔻": "\u{1D53B}", + "¨": "\xA8", + "⃜": "\u20DC", + "≐": "\u2250", + "∯": "\u222F", + "¨": "\xA8", + "⇓": "\u21D3", + "⇐": "\u21D0", + "⇔": "\u21D4", + "⫤": "\u2AE4", + "⟸": "\u27F8", + "⟺": "\u27FA", + "⟹": "\u27F9", + "⇒": "\u21D2", + "⊨": "\u22A8", + "⇑": "\u21D1", + "⇕": "\u21D5", + "∥": "\u2225", + "↓": "\u2193", + "⤓": "\u2913", + "⇵": "\u21F5", + "̑": "\u0311", + "⥐": "\u2950", + "⥞": "\u295E", + "↽": "\u21BD", + "⥖": "\u2956", + "⥟": "\u295F", + "⇁": "\u21C1", + "⥗": "\u2957", + "⊤": "\u22A4", + "↧": "\u21A7", + "⇓": "\u21D3", + "𝒟": "\u{1D49F}", + "Đ": "\u0110", + "Ŋ": "\u014A", + "Ð": "\xD0", + "Ð": "\xD0", + "É": "\xC9", + "É": "\xC9", + "Ě": "\u011A", + "Ê": "\xCA", + "Ê": "\xCA", + "Э": "\u042D", + "Ė": "\u0116", + "𝔈": "\u{1D508}", + "È": "\xC8", + "È": "\xC8", + "∈": "\u2208", + "Ē": "\u0112", + "◻": "\u25FB", + "▫": "\u25AB", + "Ę": "\u0118", + "𝔼": "\u{1D53C}", + "Ε": "\u0395", + "⩵": "\u2A75", + "≂": "\u2242", + "⇌": "\u21CC", + "ℰ": "\u2130", + "⩳": "\u2A73", + "Η": "\u0397", + "Ë": "\xCB", + "Ë": "\xCB", + "∃": "\u2203", + "ⅇ": "\u2147", + "Ф": "\u0424", + "𝔉": "\u{1D509}", + "◼": "\u25FC", + "▪": "\u25AA", + "𝔽": "\u{1D53D}", + "∀": "\u2200", + "ℱ": "\u2131", + "ℱ": "\u2131", + "Ѓ": "\u0403", + ">": ">", + ">": ">", + "Γ": "\u0393", + "Ϝ": "\u03DC", + "Ğ": "\u011E", + "Ģ": "\u0122", + "Ĝ": "\u011C", + "Г": "\u0413", + "Ġ": "\u0120", + "𝔊": "\u{1D50A}", + "⋙": "\u22D9", + "𝔾": "\u{1D53E}", + "≥": "\u2265", + "⋛": "\u22DB", + "≧": "\u2267", + "⪢": "\u2AA2", + "≷": "\u2277", + "⩾": "\u2A7E", + "≳": "\u2273", + "𝒢": "\u{1D4A2}", + "≫": "\u226B", + "Ъ": "\u042A", + "ˇ": "\u02C7", + "^": "^", + "Ĥ": "\u0124", + "ℌ": "\u210C", + "ℋ": "\u210B", + "ℍ": "\u210D", + "─": "\u2500", + "ℋ": "\u210B", + "Ħ": "\u0126", + "≎": "\u224E", + "≏": "\u224F", + "Е": "\u0415", + "IJ": "\u0132", + "Ё": "\u0401", + "Í": "\xCD", + "Í": "\xCD", + "Î": "\xCE", + "Î": "\xCE", + "И": "\u0418", + "İ": "\u0130", + "ℑ": "\u2111", + "Ì": "\xCC", + "Ì": "\xCC", + "ℑ": "\u2111", + "Ī": "\u012A", + "ⅈ": "\u2148", + "⇒": "\u21D2", + "∬": "\u222C", + "∫": "\u222B", + "⋂": "\u22C2", + "⁣": "\u2063", + "⁢": "\u2062", + "Į": "\u012E", + "𝕀": "\u{1D540}", + "Ι": "\u0399", + "ℐ": "\u2110", + "Ĩ": "\u0128", + "І": "\u0406", + "Ï": "\xCF", + "Ï": "\xCF", + "Ĵ": "\u0134", + "Й": "\u0419", + "𝔍": "\u{1D50D}", + "𝕁": "\u{1D541}", + "𝒥": "\u{1D4A5}", + "Ј": "\u0408", + "Є": "\u0404", + "Х": "\u0425", + "Ќ": "\u040C", + "Κ": "\u039A", + "Ķ": "\u0136", + "К": "\u041A", + "𝔎": "\u{1D50E}", + "𝕂": "\u{1D542}", + "𝒦": "\u{1D4A6}", + "Љ": "\u0409", + "<": "<", + "<": "<", + "Ĺ": "\u0139", + "Λ": "\u039B", + "⟪": "\u27EA", + "ℒ": "\u2112", + "↞": "\u219E", + "Ľ": "\u013D", + "Ļ": "\u013B", + "Л": "\u041B", + "⟨": "\u27E8", + "←": "\u2190", + "⇤": "\u21E4", + "⇆": "\u21C6", + "⌈": "\u2308", + "⟦": "\u27E6", + "⥡": "\u2961", + "⇃": "\u21C3", + "⥙": "\u2959", + "⌊": "\u230A", + "↔": "\u2194", + "⥎": "\u294E", + "⊣": "\u22A3", + "↤": "\u21A4", + "⥚": "\u295A", + "⊲": "\u22B2", + "⧏": "\u29CF", + "⊴": "\u22B4", + "⥑": "\u2951", + "⥠": "\u2960", + "↿": "\u21BF", + "⥘": "\u2958", + "↼": "\u21BC", + "⥒": "\u2952", + "⇐": "\u21D0", + "⇔": "\u21D4", + "⋚": "\u22DA", + "≦": "\u2266", + "≶": "\u2276", + "⪡": "\u2AA1", + "⩽": "\u2A7D", + "≲": "\u2272", + "𝔏": "\u{1D50F}", + "⋘": "\u22D8", + "⇚": "\u21DA", + "Ŀ": "\u013F", + "⟵": "\u27F5", + "⟷": "\u27F7", + "⟶": "\u27F6", + "⟸": "\u27F8", + "⟺": "\u27FA", + "⟹": "\u27F9", + "𝕃": "\u{1D543}", + "↙": "\u2199", + "↘": "\u2198", + "ℒ": "\u2112", + "↰": "\u21B0", + "Ł": "\u0141", + "≪": "\u226A", + "⤅": "\u2905", + "М": "\u041C", + " ": "\u205F", + "ℳ": "\u2133", + "𝔐": "\u{1D510}", + "∓": "\u2213", + "𝕄": "\u{1D544}", + "ℳ": "\u2133", + "Μ": "\u039C", + "Њ": "\u040A", + "Ń": "\u0143", + "Ň": "\u0147", + "Ņ": "\u0145", + "Н": "\u041D", + "​": "\u200B", + "​": "\u200B", + "​": "\u200B", + "​": "\u200B", + "≫": "\u226B", + "≪": "\u226A", + " ": ` +`, + "𝔑": "\u{1D511}", + "⁠": "\u2060", + " ": "\xA0", + "ℕ": "\u2115", + "⫬": "\u2AEC", + "≢": "\u2262", + "≭": "\u226D", + "∦": "\u2226", + "∉": "\u2209", + "≠": "\u2260", + "≂̸": "\u2242\u0338", + "∄": "\u2204", + "≯": "\u226F", + "≱": "\u2271", + "≧̸": "\u2267\u0338", + "≫̸": "\u226B\u0338", + "≹": "\u2279", + "⩾̸": "\u2A7E\u0338", + "≵": "\u2275", + "≎̸": "\u224E\u0338", + "≏̸": "\u224F\u0338", + "⋪": "\u22EA", + "⧏̸": "\u29CF\u0338", + "⋬": "\u22EC", + "≮": "\u226E", + "≰": "\u2270", + "≸": "\u2278", + "≪̸": "\u226A\u0338", + "⩽̸": "\u2A7D\u0338", + "≴": "\u2274", + "⪢̸": "\u2AA2\u0338", + "⪡̸": "\u2AA1\u0338", + "⊀": "\u2280", + "⪯̸": "\u2AAF\u0338", + "⋠": "\u22E0", + "∌": "\u220C", + "⋫": "\u22EB", + "⧐̸": "\u29D0\u0338", + "⋭": "\u22ED", + "⊏̸": "\u228F\u0338", + "⋢": "\u22E2", + "⊐̸": "\u2290\u0338", + "⋣": "\u22E3", + "⊂⃒": "\u2282\u20D2", + "⊈": "\u2288", + "⊁": "\u2281", + "⪰̸": "\u2AB0\u0338", + "⋡": "\u22E1", + "≿̸": "\u227F\u0338", + "⊃⃒": "\u2283\u20D2", + "⊉": "\u2289", + "≁": "\u2241", + "≄": "\u2244", + "≇": "\u2247", + "≉": "\u2249", + "∤": "\u2224", + "𝒩": "\u{1D4A9}", + "Ñ": "\xD1", + "Ñ": "\xD1", + "Ν": "\u039D", + "Œ": "\u0152", + "Ó": "\xD3", + "Ó": "\xD3", + "Ô": "\xD4", + "Ô": "\xD4", + "О": "\u041E", + "Ő": "\u0150", + "𝔒": "\u{1D512}", + "Ò": "\xD2", + "Ò": "\xD2", + "Ō": "\u014C", + "Ω": "\u03A9", + "Ο": "\u039F", + "𝕆": "\u{1D546}", + "“": "\u201C", + "‘": "\u2018", + "⩔": "\u2A54", + "𝒪": "\u{1D4AA}", + "Ø": "\xD8", + "Ø": "\xD8", + "Õ": "\xD5", + "Õ": "\xD5", + "⨷": "\u2A37", + "Ö": "\xD6", + "Ö": "\xD6", + "‾": "\u203E", + "⏞": "\u23DE", + "⎴": "\u23B4", + "⏜": "\u23DC", + "∂": "\u2202", + "П": "\u041F", + "𝔓": "\u{1D513}", + "Φ": "\u03A6", + "Π": "\u03A0", + "±": "\xB1", + "ℌ": "\u210C", + "ℙ": "\u2119", + "⪻": "\u2ABB", + "≺": "\u227A", + "⪯": "\u2AAF", + "≼": "\u227C", + "≾": "\u227E", + "″": "\u2033", + "∏": "\u220F", + "∷": "\u2237", + "∝": "\u221D", + "𝒫": "\u{1D4AB}", + "Ψ": "\u03A8", + """: '"', + """: '"', + "𝔔": "\u{1D514}", + "ℚ": "\u211A", + "𝒬": "\u{1D4AC}", + "⤐": "\u2910", + "®": "\xAE", + "®": "\xAE", + "Ŕ": "\u0154", + "⟫": "\u27EB", + "↠": "\u21A0", + "⤖": "\u2916", + "Ř": "\u0158", + "Ŗ": "\u0156", + "Р": "\u0420", + "ℜ": "\u211C", + "∋": "\u220B", + "⇋": "\u21CB", + "⥯": "\u296F", + "ℜ": "\u211C", + "Ρ": "\u03A1", + "⟩": "\u27E9", + "→": "\u2192", + "⇥": "\u21E5", + "⇄": "\u21C4", + "⌉": "\u2309", + "⟧": "\u27E7", + "⥝": "\u295D", + "⇂": "\u21C2", + "⥕": "\u2955", + "⌋": "\u230B", + "⊢": "\u22A2", + "↦": "\u21A6", + "⥛": "\u295B", + "⊳": "\u22B3", + "⧐": "\u29D0", + "⊵": "\u22B5", + "⥏": "\u294F", + "⥜": "\u295C", + "↾": "\u21BE", + "⥔": "\u2954", + "⇀": "\u21C0", + "⥓": "\u2953", + "⇒": "\u21D2", + "ℝ": "\u211D", + "⥰": "\u2970", + "⇛": "\u21DB", + "ℛ": "\u211B", + "↱": "\u21B1", + "⧴": "\u29F4", + "Щ": "\u0429", + "Ш": "\u0428", + "Ь": "\u042C", + "Ś": "\u015A", + "⪼": "\u2ABC", + "Š": "\u0160", + "Ş": "\u015E", + "Ŝ": "\u015C", + "С": "\u0421", + "𝔖": "\u{1D516}", + "↓": "\u2193", + "←": "\u2190", + "→": "\u2192", + "↑": "\u2191", + "Σ": "\u03A3", + "∘": "\u2218", + "𝕊": "\u{1D54A}", + "√": "\u221A", + "□": "\u25A1", + "⊓": "\u2293", + "⊏": "\u228F", + "⊑": "\u2291", + "⊐": "\u2290", + "⊒": "\u2292", + "⊔": "\u2294", + "𝒮": "\u{1D4AE}", + "⋆": "\u22C6", + "⋐": "\u22D0", + "⋐": "\u22D0", + "⊆": "\u2286", + "≻": "\u227B", + "⪰": "\u2AB0", + "≽": "\u227D", + "≿": "\u227F", + "∋": "\u220B", + "∑": "\u2211", + "⋑": "\u22D1", + "⊃": "\u2283", + "⊇": "\u2287", + "⋑": "\u22D1", + "Þ": "\xDE", + "Þ": "\xDE", + "™": "\u2122", + "Ћ": "\u040B", + "Ц": "\u0426", + " ": " ", + "Τ": "\u03A4", + "Ť": "\u0164", + "Ţ": "\u0162", + "Т": "\u0422", + "𝔗": "\u{1D517}", + "∴": "\u2234", + "Θ": "\u0398", + "  ": "\u205F\u200A", + " ": "\u2009", + "∼": "\u223C", + "≃": "\u2243", + "≅": "\u2245", + "≈": "\u2248", + "𝕋": "\u{1D54B}", + "⃛": "\u20DB", + "𝒯": "\u{1D4AF}", + "Ŧ": "\u0166", + "Ú": "\xDA", + "Ú": "\xDA", + "↟": "\u219F", + "⥉": "\u2949", + "Ў": "\u040E", + "Ŭ": "\u016C", + "Û": "\xDB", + "Û": "\xDB", + "У": "\u0423", + "Ű": "\u0170", + "𝔘": "\u{1D518}", + "Ù": "\xD9", + "Ù": "\xD9", + "Ū": "\u016A", + "_": "_", + "⏟": "\u23DF", + "⎵": "\u23B5", + "⏝": "\u23DD", + "⋃": "\u22C3", + "⊎": "\u228E", + "Ų": "\u0172", + "𝕌": "\u{1D54C}", + "↑": "\u2191", + "⤒": "\u2912", + "⇅": "\u21C5", + "↕": "\u2195", + "⥮": "\u296E", + "⊥": "\u22A5", + "↥": "\u21A5", + "⇑": "\u21D1", + "⇕": "\u21D5", + "↖": "\u2196", + "↗": "\u2197", + "ϒ": "\u03D2", + "Υ": "\u03A5", + "Ů": "\u016E", + "𝒰": "\u{1D4B0}", + "Ũ": "\u0168", + "Ü": "\xDC", + "Ü": "\xDC", + "⊫": "\u22AB", + "⫫": "\u2AEB", + "В": "\u0412", + "⊩": "\u22A9", + "⫦": "\u2AE6", + "⋁": "\u22C1", + "‖": "\u2016", + "‖": "\u2016", + "∣": "\u2223", + "|": "|", + "❘": "\u2758", + "≀": "\u2240", + " ": "\u200A", + "𝔙": "\u{1D519}", + "𝕍": "\u{1D54D}", + "𝒱": "\u{1D4B1}", + "⊪": "\u22AA", + "Ŵ": "\u0174", + "⋀": "\u22C0", + "𝔚": "\u{1D51A}", + "𝕎": "\u{1D54E}", + "𝒲": "\u{1D4B2}", + "𝔛": "\u{1D51B}", + "Ξ": "\u039E", + "𝕏": "\u{1D54F}", + "𝒳": "\u{1D4B3}", + "Я": "\u042F", + "Ї": "\u0407", + "Ю": "\u042E", + "Ý": "\xDD", + "Ý": "\xDD", + "Ŷ": "\u0176", + "Ы": "\u042B", + "𝔜": "\u{1D51C}", + "𝕐": "\u{1D550}", + "𝒴": "\u{1D4B4}", + "Ÿ": "\u0178", + "Ж": "\u0416", + "Ź": "\u0179", + "Ž": "\u017D", + "З": "\u0417", + "Ż": "\u017B", + "​": "\u200B", + "Ζ": "\u0396", + "ℨ": "\u2128", + "ℤ": "\u2124", + "𝒵": "\u{1D4B5}", + "á": "\xE1", + "á": "\xE1", + "ă": "\u0103", + "∾": "\u223E", + "∾̳": "\u223E\u0333", + "∿": "\u223F", + "â": "\xE2", + "â": "\xE2", + "´": "\xB4", + "´": "\xB4", + "а": "\u0430", + "æ": "\xE6", + "æ": "\xE6", + "⁡": "\u2061", + "𝔞": "\u{1D51E}", + "à": "\xE0", + "à": "\xE0", + "ℵ": "\u2135", + "ℵ": "\u2135", + "α": "\u03B1", + "ā": "\u0101", + "⨿": "\u2A3F", + "&": "&", + "&": "&", + "∧": "\u2227", + "⩕": "\u2A55", + "⩜": "\u2A5C", + "⩘": "\u2A58", + "⩚": "\u2A5A", + "∠": "\u2220", + "⦤": "\u29A4", + "∠": "\u2220", + "∡": "\u2221", + "⦨": "\u29A8", + "⦩": "\u29A9", + "⦪": "\u29AA", + "⦫": "\u29AB", + "⦬": "\u29AC", + "⦭": "\u29AD", + "⦮": "\u29AE", + "⦯": "\u29AF", + "∟": "\u221F", + "⊾": "\u22BE", + "⦝": "\u299D", + "∢": "\u2222", + "Å": "\xC5", + "⍼": "\u237C", + "ą": "\u0105", + "𝕒": "\u{1D552}", + "≈": "\u2248", + "⩰": "\u2A70", + "⩯": "\u2A6F", + "≊": "\u224A", + "≋": "\u224B", + "'": "'", + "≈": "\u2248", + "≊": "\u224A", + "å": "\xE5", + "å": "\xE5", + "𝒶": "\u{1D4B6}", + "*": "*", + "≈": "\u2248", + "≍": "\u224D", + "ã": "\xE3", + "ã": "\xE3", + "ä": "\xE4", + "ä": "\xE4", + "∳": "\u2233", + "⨑": "\u2A11", + "⫭": "\u2AED", + "≌": "\u224C", + "϶": "\u03F6", + "‵": "\u2035", + "∽": "\u223D", + "⋍": "\u22CD", + "⊽": "\u22BD", + "⌅": "\u2305", + "⌅": "\u2305", + "⎵": "\u23B5", + "⎶": "\u23B6", + "≌": "\u224C", + "б": "\u0431", + "„": "\u201E", + "∵": "\u2235", + "∵": "\u2235", + "⦰": "\u29B0", + "϶": "\u03F6", + "ℬ": "\u212C", + "β": "\u03B2", + "ℶ": "\u2136", + "≬": "\u226C", + "𝔟": "\u{1D51F}", + "⋂": "\u22C2", + "◯": "\u25EF", + "⋃": "\u22C3", + "⨀": "\u2A00", + "⨁": "\u2A01", + "⨂": "\u2A02", + "⨆": "\u2A06", + "★": "\u2605", + "▽": "\u25BD", + "△": "\u25B3", + "⨄": "\u2A04", + "⋁": "\u22C1", + "⋀": "\u22C0", + "⤍": "\u290D", + "⧫": "\u29EB", + "▪": "\u25AA", + "▴": "\u25B4", + "▾": "\u25BE", + "◂": "\u25C2", + "▸": "\u25B8", + "␣": "\u2423", + "▒": "\u2592", + "░": "\u2591", + "▓": "\u2593", + "█": "\u2588", + "=⃥": "=\u20E5", + "≡⃥": "\u2261\u20E5", + "⌐": "\u2310", + "𝕓": "\u{1D553}", + "⊥": "\u22A5", + "⊥": "\u22A5", + "⋈": "\u22C8", + "╗": "\u2557", + "╔": "\u2554", + "╖": "\u2556", + "╓": "\u2553", + "═": "\u2550", + "╦": "\u2566", + "╩": "\u2569", + "╤": "\u2564", + "╧": "\u2567", + "╝": "\u255D", + "╚": "\u255A", + "╜": "\u255C", + "╙": "\u2559", + "║": "\u2551", + "╬": "\u256C", + "╣": "\u2563", + "╠": "\u2560", + "╫": "\u256B", + "╢": "\u2562", + "╟": "\u255F", + "⧉": "\u29C9", + "╕": "\u2555", + "╒": "\u2552", + "┐": "\u2510", + "┌": "\u250C", + "─": "\u2500", + "╥": "\u2565", + "╨": "\u2568", + "┬": "\u252C", + "┴": "\u2534", + "⊟": "\u229F", + "⊞": "\u229E", + "⊠": "\u22A0", + "╛": "\u255B", + "╘": "\u2558", + "┘": "\u2518", + "└": "\u2514", + "│": "\u2502", + "╪": "\u256A", + "╡": "\u2561", + "╞": "\u255E", + "┼": "\u253C", + "┤": "\u2524", + "├": "\u251C", + "‵": "\u2035", + "˘": "\u02D8", + "¦": "\xA6", + "¦": "\xA6", + "𝒷": "\u{1D4B7}", + "⁏": "\u204F", + "∽": "\u223D", + "⋍": "\u22CD", + "\": "\\", + "⧅": "\u29C5", + "⟈": "\u27C8", + "•": "\u2022", + "•": "\u2022", + "≎": "\u224E", + "⪮": "\u2AAE", + "≏": "\u224F", + "≏": "\u224F", + "ć": "\u0107", + "∩": "\u2229", + "⩄": "\u2A44", + "⩉": "\u2A49", + "⩋": "\u2A4B", + "⩇": "\u2A47", + "⩀": "\u2A40", + "∩︀": "\u2229\uFE00", + "⁁": "\u2041", + "ˇ": "\u02C7", + "⩍": "\u2A4D", + "č": "\u010D", + "ç": "\xE7", + "ç": "\xE7", + "ĉ": "\u0109", + "⩌": "\u2A4C", + "⩐": "\u2A50", + "ċ": "\u010B", + "¸": "\xB8", + "¸": "\xB8", + "⦲": "\u29B2", + "¢": "\xA2", + "¢": "\xA2", + "·": "\xB7", + "𝔠": "\u{1D520}", + "ч": "\u0447", + "✓": "\u2713", + "✓": "\u2713", + "χ": "\u03C7", + "○": "\u25CB", + "⧃": "\u29C3", + "ˆ": "\u02C6", + "≗": "\u2257", + "↺": "\u21BA", + "↻": "\u21BB", + "®": "\xAE", + "Ⓢ": "\u24C8", + "⊛": "\u229B", + "⊚": "\u229A", + "⊝": "\u229D", + "≗": "\u2257", + "⨐": "\u2A10", + "⫯": "\u2AEF", + "⧂": "\u29C2", + "♣": "\u2663", + "♣": "\u2663", + ":": ":", + "≔": "\u2254", + "≔": "\u2254", + ",": ",", + "@": "@", + "∁": "\u2201", + "∘": "\u2218", + "∁": "\u2201", + "ℂ": "\u2102", + "≅": "\u2245", + "⩭": "\u2A6D", + "∮": "\u222E", + "𝕔": "\u{1D554}", + "∐": "\u2210", + "©": "\xA9", + "©": "\xA9", + "℗": "\u2117", + "↵": "\u21B5", + "✗": "\u2717", + "𝒸": "\u{1D4B8}", + "⫏": "\u2ACF", + "⫑": "\u2AD1", + "⫐": "\u2AD0", + "⫒": "\u2AD2", + "⋯": "\u22EF", + "⤸": "\u2938", + "⤵": "\u2935", + "⋞": "\u22DE", + "⋟": "\u22DF", + "↶": "\u21B6", + "⤽": "\u293D", + "∪": "\u222A", + "⩈": "\u2A48", + "⩆": "\u2A46", + "⩊": "\u2A4A", + "⊍": "\u228D", + "⩅": "\u2A45", + "∪︀": "\u222A\uFE00", + "↷": "\u21B7", + "⤼": "\u293C", + "⋞": "\u22DE", + "⋟": "\u22DF", + "⋎": "\u22CE", + "⋏": "\u22CF", + "¤": "\xA4", + "¤": "\xA4", + "↶": "\u21B6", + "↷": "\u21B7", + "⋎": "\u22CE", + "⋏": "\u22CF", + "∲": "\u2232", + "∱": "\u2231", + "⌭": "\u232D", + "⇓": "\u21D3", + "⥥": "\u2965", + "†": "\u2020", + "ℸ": "\u2138", + "↓": "\u2193", + "‐": "\u2010", + "⊣": "\u22A3", + "⤏": "\u290F", + "˝": "\u02DD", + "ď": "\u010F", + "д": "\u0434", + "ⅆ": "\u2146", + "‡": "\u2021", + "⇊": "\u21CA", + "⩷": "\u2A77", + "°": "\xB0", + "°": "\xB0", + "δ": "\u03B4", + "⦱": "\u29B1", + "⥿": "\u297F", + "𝔡": "\u{1D521}", + "⇃": "\u21C3", + "⇂": "\u21C2", + "⋄": "\u22C4", + "⋄": "\u22C4", + "♦": "\u2666", + "♦": "\u2666", + "¨": "\xA8", + "ϝ": "\u03DD", + "⋲": "\u22F2", + "÷": "\xF7", + "÷": "\xF7", + "÷": "\xF7", + "⋇": "\u22C7", + "⋇": "\u22C7", + "ђ": "\u0452", + "⌞": "\u231E", + "⌍": "\u230D", + "$": "$", + "𝕕": "\u{1D555}", + "˙": "\u02D9", + "≐": "\u2250", + "≑": "\u2251", + "∸": "\u2238", + "∔": "\u2214", + "⊡": "\u22A1", + "⌆": "\u2306", + "↓": "\u2193", + "⇊": "\u21CA", + "⇃": "\u21C3", + "⇂": "\u21C2", + "⤐": "\u2910", + "⌟": "\u231F", + "⌌": "\u230C", + "𝒹": "\u{1D4B9}", + "ѕ": "\u0455", + "⧶": "\u29F6", + "đ": "\u0111", + "⋱": "\u22F1", + "▿": "\u25BF", + "▾": "\u25BE", + "⇵": "\u21F5", + "⥯": "\u296F", + "⦦": "\u29A6", + "џ": "\u045F", + "⟿": "\u27FF", + "⩷": "\u2A77", + "≑": "\u2251", + "é": "\xE9", + "é": "\xE9", + "⩮": "\u2A6E", + "ě": "\u011B", + "≖": "\u2256", + "ê": "\xEA", + "ê": "\xEA", + "≕": "\u2255", + "э": "\u044D", + "ė": "\u0117", + "ⅇ": "\u2147", + "≒": "\u2252", + "𝔢": "\u{1D522}", + "⪚": "\u2A9A", + "è": "\xE8", + "è": "\xE8", + "⪖": "\u2A96", + "⪘": "\u2A98", + "⪙": "\u2A99", + "⏧": "\u23E7", + "ℓ": "\u2113", + "⪕": "\u2A95", + "⪗": "\u2A97", + "ē": "\u0113", + "∅": "\u2205", + "∅": "\u2205", + "∅": "\u2205", + " ": "\u2004", + " ": "\u2005", + " ": "\u2003", + "ŋ": "\u014B", + " ": "\u2002", + "ę": "\u0119", + "𝕖": "\u{1D556}", + "⋕": "\u22D5", + "⧣": "\u29E3", + "⩱": "\u2A71", + "ε": "\u03B5", + "ε": "\u03B5", + "ϵ": "\u03F5", + "≖": "\u2256", + "≕": "\u2255", + "≂": "\u2242", + "⪖": "\u2A96", + "⪕": "\u2A95", + "=": "=", + "≟": "\u225F", + "≡": "\u2261", + "⩸": "\u2A78", + "⧥": "\u29E5", + "≓": "\u2253", + "⥱": "\u2971", + "ℯ": "\u212F", + "≐": "\u2250", + "≂": "\u2242", + "η": "\u03B7", + "ð": "\xF0", + "ð": "\xF0", + "ë": "\xEB", + "ë": "\xEB", + "€": "\u20AC", + "!": "!", + "∃": "\u2203", + "ℰ": "\u2130", + "ⅇ": "\u2147", + "≒": "\u2252", + "ф": "\u0444", + "♀": "\u2640", + "ffi": "\uFB03", + "ff": "\uFB00", + "ffl": "\uFB04", + "𝔣": "\u{1D523}", + "fi": "\uFB01", + "fj": "fj", + "♭": "\u266D", + "fl": "\uFB02", + "▱": "\u25B1", + "ƒ": "\u0192", + "𝕗": "\u{1D557}", + "∀": "\u2200", + "⋔": "\u22D4", + "⫙": "\u2AD9", + "⨍": "\u2A0D", + "½": "\xBD", + "½": "\xBD", + "⅓": "\u2153", + "¼": "\xBC", + "¼": "\xBC", + "⅕": "\u2155", + "⅙": "\u2159", + "⅛": "\u215B", + "⅔": "\u2154", + "⅖": "\u2156", + "¾": "\xBE", + "¾": "\xBE", + "⅗": "\u2157", + "⅜": "\u215C", + "⅘": "\u2158", + "⅚": "\u215A", + "⅝": "\u215D", + "⅞": "\u215E", + "⁄": "\u2044", + "⌢": "\u2322", + "𝒻": "\u{1D4BB}", + "≧": "\u2267", + "⪌": "\u2A8C", + "ǵ": "\u01F5", + "γ": "\u03B3", + "ϝ": "\u03DD", + "⪆": "\u2A86", + "ğ": "\u011F", + "ĝ": "\u011D", + "г": "\u0433", + "ġ": "\u0121", + "≥": "\u2265", + "⋛": "\u22DB", + "≥": "\u2265", + "≧": "\u2267", + "⩾": "\u2A7E", + "⩾": "\u2A7E", + "⪩": "\u2AA9", + "⪀": "\u2A80", + "⪂": "\u2A82", + "⪄": "\u2A84", + "⋛︀": "\u22DB\uFE00", + "⪔": "\u2A94", + "𝔤": "\u{1D524}", + "≫": "\u226B", + "⋙": "\u22D9", + "ℷ": "\u2137", + "ѓ": "\u0453", + "≷": "\u2277", + "⪒": "\u2A92", + "⪥": "\u2AA5", + "⪤": "\u2AA4", + "≩": "\u2269", + "⪊": "\u2A8A", + "⪊": "\u2A8A", + "⪈": "\u2A88", + "⪈": "\u2A88", + "≩": "\u2269", + "⋧": "\u22E7", + "𝕘": "\u{1D558}", + "`": "`", + "ℊ": "\u210A", + "≳": "\u2273", + "⪎": "\u2A8E", + "⪐": "\u2A90", + ">": ">", + ">": ">", + "⪧": "\u2AA7", + "⩺": "\u2A7A", + "⋗": "\u22D7", + "⦕": "\u2995", + "⩼": "\u2A7C", + "⪆": "\u2A86", + "⥸": "\u2978", + "⋗": "\u22D7", + "⋛": "\u22DB", + "⪌": "\u2A8C", + "≷": "\u2277", + "≳": "\u2273", + "≩︀": "\u2269\uFE00", + "≩︀": "\u2269\uFE00", + "⇔": "\u21D4", + " ": "\u200A", + "½": "\xBD", + "ℋ": "\u210B", + "ъ": "\u044A", + "↔": "\u2194", + "⥈": "\u2948", + "↭": "\u21AD", + "ℏ": "\u210F", + "ĥ": "\u0125", + "♥": "\u2665", + "♥": "\u2665", + "…": "\u2026", + "⊹": "\u22B9", + "𝔥": "\u{1D525}", + "⤥": "\u2925", + "⤦": "\u2926", + "⇿": "\u21FF", + "∻": "\u223B", + "↩": "\u21A9", + "↪": "\u21AA", + "𝕙": "\u{1D559}", + "―": "\u2015", + "𝒽": "\u{1D4BD}", + "ℏ": "\u210F", + "ħ": "\u0127", + "⁃": "\u2043", + "‐": "\u2010", + "í": "\xED", + "í": "\xED", + "⁣": "\u2063", + "î": "\xEE", + "î": "\xEE", + "и": "\u0438", + "е": "\u0435", + "¡": "\xA1", + "¡": "\xA1", + "⇔": "\u21D4", + "𝔦": "\u{1D526}", + "ì": "\xEC", + "ì": "\xEC", + "ⅈ": "\u2148", + "⨌": "\u2A0C", + "∭": "\u222D", + "⧜": "\u29DC", + "℩": "\u2129", + "ij": "\u0133", + "ī": "\u012B", + "ℑ": "\u2111", + "ℐ": "\u2110", + "ℑ": "\u2111", + "ı": "\u0131", + "⊷": "\u22B7", + "Ƶ": "\u01B5", + "∈": "\u2208", + "℅": "\u2105", + "∞": "\u221E", + "⧝": "\u29DD", + "ı": "\u0131", + "∫": "\u222B", + "⊺": "\u22BA", + "ℤ": "\u2124", + "⊺": "\u22BA", + "⨗": "\u2A17", + "⨼": "\u2A3C", + "ё": "\u0451", + "į": "\u012F", + "𝕚": "\u{1D55A}", + "ι": "\u03B9", + "⨼": "\u2A3C", + "¿": "\xBF", + "¿": "\xBF", + "𝒾": "\u{1D4BE}", + "∈": "\u2208", + "⋹": "\u22F9", + "⋵": "\u22F5", + "⋴": "\u22F4", + "⋳": "\u22F3", + "∈": "\u2208", + "⁢": "\u2062", + "ĩ": "\u0129", + "і": "\u0456", + "ï": "\xEF", + "ï": "\xEF", + "ĵ": "\u0135", + "й": "\u0439", + "𝔧": "\u{1D527}", + "ȷ": "\u0237", + "𝕛": "\u{1D55B}", + "𝒿": "\u{1D4BF}", + "ј": "\u0458", + "є": "\u0454", + "κ": "\u03BA", + "ϰ": "\u03F0", + "ķ": "\u0137", + "к": "\u043A", + "𝔨": "\u{1D528}", + "ĸ": "\u0138", + "х": "\u0445", + "ќ": "\u045C", + "𝕜": "\u{1D55C}", + "𝓀": "\u{1D4C0}", + "⇚": "\u21DA", + "⇐": "\u21D0", + "⤛": "\u291B", + "⤎": "\u290E", + "≦": "\u2266", + "⪋": "\u2A8B", + "⥢": "\u2962", + "ĺ": "\u013A", + "⦴": "\u29B4", + "ℒ": "\u2112", + "λ": "\u03BB", + "⟨": "\u27E8", + "⦑": "\u2991", + "⟨": "\u27E8", + "⪅": "\u2A85", + "«": "\xAB", + "«": "\xAB", + "←": "\u2190", + "⇤": "\u21E4", + "⤟": "\u291F", + "⤝": "\u291D", + "↩": "\u21A9", + "↫": "\u21AB", + "⤹": "\u2939", + "⥳": "\u2973", + "↢": "\u21A2", + "⪫": "\u2AAB", + "⤙": "\u2919", + "⪭": "\u2AAD", + "⪭︀": "\u2AAD\uFE00", + "⤌": "\u290C", + "❲": "\u2772", + "{": "{", + "[": "[", + "⦋": "\u298B", + "⦏": "\u298F", + "⦍": "\u298D", + "ľ": "\u013E", + "ļ": "\u013C", + "⌈": "\u2308", + "{": "{", + "л": "\u043B", + "⤶": "\u2936", + "“": "\u201C", + "„": "\u201E", + "⥧": "\u2967", + "⥋": "\u294B", + "↲": "\u21B2", + "≤": "\u2264", + "←": "\u2190", + "↢": "\u21A2", + "↽": "\u21BD", + "↼": "\u21BC", + "⇇": "\u21C7", + "↔": "\u2194", + "⇆": "\u21C6", + "⇋": "\u21CB", + "↭": "\u21AD", + "⋋": "\u22CB", + "⋚": "\u22DA", + "≤": "\u2264", + "≦": "\u2266", + "⩽": "\u2A7D", + "⩽": "\u2A7D", + "⪨": "\u2AA8", + "⩿": "\u2A7F", + "⪁": "\u2A81", + "⪃": "\u2A83", + "⋚︀": "\u22DA\uFE00", + "⪓": "\u2A93", + "⪅": "\u2A85", + "⋖": "\u22D6", + "⋚": "\u22DA", + "⪋": "\u2A8B", + "≶": "\u2276", + "≲": "\u2272", + "⥼": "\u297C", + "⌊": "\u230A", + "𝔩": "\u{1D529}", + "≶": "\u2276", + "⪑": "\u2A91", + "↽": "\u21BD", + "↼": "\u21BC", + "⥪": "\u296A", + "▄": "\u2584", + "љ": "\u0459", + "≪": "\u226A", + "⇇": "\u21C7", + "⌞": "\u231E", + "⥫": "\u296B", + "◺": "\u25FA", + "ŀ": "\u0140", + "⎰": "\u23B0", + "⎰": "\u23B0", + "≨": "\u2268", + "⪉": "\u2A89", + "⪉": "\u2A89", + "⪇": "\u2A87", + "⪇": "\u2A87", + "≨": "\u2268", + "⋦": "\u22E6", + "⟬": "\u27EC", + "⇽": "\u21FD", + "⟦": "\u27E6", + "⟵": "\u27F5", + "⟷": "\u27F7", + "⟼": "\u27FC", + "⟶": "\u27F6", + "↫": "\u21AB", + "↬": "\u21AC", + "⦅": "\u2985", + "𝕝": "\u{1D55D}", + "⨭": "\u2A2D", + "⨴": "\u2A34", + "∗": "\u2217", + "_": "_", + "◊": "\u25CA", + "◊": "\u25CA", + "⧫": "\u29EB", + "(": "(", + "⦓": "\u2993", + "⇆": "\u21C6", + "⌟": "\u231F", + "⇋": "\u21CB", + "⥭": "\u296D", + "‎": "\u200E", + "⊿": "\u22BF", + "‹": "\u2039", + "𝓁": "\u{1D4C1}", + "↰": "\u21B0", + "≲": "\u2272", + "⪍": "\u2A8D", + "⪏": "\u2A8F", + "[": "[", + "‘": "\u2018", + "‚": "\u201A", + "ł": "\u0142", + "<": "<", + "<": "<", + "⪦": "\u2AA6", + "⩹": "\u2A79", + "⋖": "\u22D6", + "⋋": "\u22CB", + "⋉": "\u22C9", + "⥶": "\u2976", + "⩻": "\u2A7B", + "⦖": "\u2996", + "◃": "\u25C3", + "⊴": "\u22B4", + "◂": "\u25C2", + "⥊": "\u294A", + "⥦": "\u2966", + "≨︀": "\u2268\uFE00", + "≨︀": "\u2268\uFE00", + "∺": "\u223A", + "¯": "\xAF", + "¯": "\xAF", + "♂": "\u2642", + "✠": "\u2720", + "✠": "\u2720", + "↦": "\u21A6", + "↦": "\u21A6", + "↧": "\u21A7", + "↤": "\u21A4", + "↥": "\u21A5", + "▮": "\u25AE", + "⨩": "\u2A29", + "м": "\u043C", + "—": "\u2014", + "∡": "\u2221", + "𝔪": "\u{1D52A}", + "℧": "\u2127", + "µ": "\xB5", + "µ": "\xB5", + "∣": "\u2223", + "*": "*", + "⫰": "\u2AF0", + "·": "\xB7", + "·": "\xB7", + "−": "\u2212", + "⊟": "\u229F", + "∸": "\u2238", + "⨪": "\u2A2A", + "⫛": "\u2ADB", + "…": "\u2026", + "∓": "\u2213", + "⊧": "\u22A7", + "𝕞": "\u{1D55E}", + "∓": "\u2213", + "𝓂": "\u{1D4C2}", + "∾": "\u223E", + "μ": "\u03BC", + "⊸": "\u22B8", + "⊸": "\u22B8", + "⋙̸": "\u22D9\u0338", + "≫⃒": "\u226B\u20D2", + "≫̸": "\u226B\u0338", + "⇍": "\u21CD", + "⇎": "\u21CE", + "⋘̸": "\u22D8\u0338", + "≪⃒": "\u226A\u20D2", + "≪̸": "\u226A\u0338", + "⇏": "\u21CF", + "⊯": "\u22AF", + "⊮": "\u22AE", + "∇": "\u2207", + "ń": "\u0144", + "∠⃒": "\u2220\u20D2", + "≉": "\u2249", + "⩰̸": "\u2A70\u0338", + "≋̸": "\u224B\u0338", + "ʼn": "\u0149", + "≉": "\u2249", + "♮": "\u266E", + "♮": "\u266E", + "ℕ": "\u2115", + " ": "\xA0", + " ": "\xA0", + "≎̸": "\u224E\u0338", + "≏̸": "\u224F\u0338", + "⩃": "\u2A43", + "ň": "\u0148", + "ņ": "\u0146", + "≇": "\u2247", + "⩭̸": "\u2A6D\u0338", + "⩂": "\u2A42", + "н": "\u043D", + "–": "\u2013", + "≠": "\u2260", + "⇗": "\u21D7", + "⤤": "\u2924", + "↗": "\u2197", + "↗": "\u2197", + "≐̸": "\u2250\u0338", + "≢": "\u2262", + "⤨": "\u2928", + "≂̸": "\u2242\u0338", + "∄": "\u2204", + "∄": "\u2204", + "𝔫": "\u{1D52B}", + "≧̸": "\u2267\u0338", + "≱": "\u2271", + "≱": "\u2271", + "≧̸": "\u2267\u0338", + "⩾̸": "\u2A7E\u0338", + "⩾̸": "\u2A7E\u0338", + "≵": "\u2275", + "≯": "\u226F", + "≯": "\u226F", + "⇎": "\u21CE", + "↮": "\u21AE", + "⫲": "\u2AF2", + "∋": "\u220B", + "⋼": "\u22FC", + "⋺": "\u22FA", + "∋": "\u220B", + "њ": "\u045A", + "⇍": "\u21CD", + "≦̸": "\u2266\u0338", + "↚": "\u219A", + "‥": "\u2025", + "≰": "\u2270", + "↚": "\u219A", + "↮": "\u21AE", + "≰": "\u2270", + "≦̸": "\u2266\u0338", + "⩽̸": "\u2A7D\u0338", + "⩽̸": "\u2A7D\u0338", + "≮": "\u226E", + "≴": "\u2274", + "≮": "\u226E", + "⋪": "\u22EA", + "⋬": "\u22EC", + "∤": "\u2224", + "𝕟": "\u{1D55F}", + "¬": "\xAC", + "¬": "\xAC", + "∉": "\u2209", + "⋹̸": "\u22F9\u0338", + "⋵̸": "\u22F5\u0338", + "∉": "\u2209", + "⋷": "\u22F7", + "⋶": "\u22F6", + "∌": "\u220C", + "∌": "\u220C", + "⋾": "\u22FE", + "⋽": "\u22FD", + "∦": "\u2226", + "∦": "\u2226", + "⫽⃥": "\u2AFD\u20E5", + "∂̸": "\u2202\u0338", + "⨔": "\u2A14", + "⊀": "\u2280", + "⋠": "\u22E0", + "⪯̸": "\u2AAF\u0338", + "⊀": "\u2280", + "⪯̸": "\u2AAF\u0338", + "⇏": "\u21CF", + "↛": "\u219B", + "⤳̸": "\u2933\u0338", + "↝̸": "\u219D\u0338", + "↛": "\u219B", + "⋫": "\u22EB", + "⋭": "\u22ED", + "⊁": "\u2281", + "⋡": "\u22E1", + "⪰̸": "\u2AB0\u0338", + "𝓃": "\u{1D4C3}", + "∤": "\u2224", + "∦": "\u2226", + "≁": "\u2241", + "≄": "\u2244", + "≄": "\u2244", + "∤": "\u2224", + "∦": "\u2226", + "⋢": "\u22E2", + "⋣": "\u22E3", + "⊄": "\u2284", + "⫅̸": "\u2AC5\u0338", + "⊈": "\u2288", + "⊂⃒": "\u2282\u20D2", + "⊈": "\u2288", + "⫅̸": "\u2AC5\u0338", + "⊁": "\u2281", + "⪰̸": "\u2AB0\u0338", + "⊅": "\u2285", + "⫆̸": "\u2AC6\u0338", + "⊉": "\u2289", + "⊃⃒": "\u2283\u20D2", + "⊉": "\u2289", + "⫆̸": "\u2AC6\u0338", + "≹": "\u2279", + "ñ": "\xF1", + "ñ": "\xF1", + "≸": "\u2278", + "⋪": "\u22EA", + "⋬": "\u22EC", + "⋫": "\u22EB", + "⋭": "\u22ED", + "ν": "\u03BD", + "#": "#", + "№": "\u2116", + " ": "\u2007", + "⊭": "\u22AD", + "⤄": "\u2904", + "≍⃒": "\u224D\u20D2", + "⊬": "\u22AC", + "≥⃒": "\u2265\u20D2", + ">⃒": ">\u20D2", + "⧞": "\u29DE", + "⤂": "\u2902", + "≤⃒": "\u2264\u20D2", + "<⃒": "<\u20D2", + "⊴⃒": "\u22B4\u20D2", + "⤃": "\u2903", + "⊵⃒": "\u22B5\u20D2", + "∼⃒": "\u223C\u20D2", + "⇖": "\u21D6", + "⤣": "\u2923", + "↖": "\u2196", + "↖": "\u2196", + "⤧": "\u2927", + "Ⓢ": "\u24C8", + "ó": "\xF3", + "ó": "\xF3", + "⊛": "\u229B", + "⊚": "\u229A", + "ô": "\xF4", + "ô": "\xF4", + "о": "\u043E", + "⊝": "\u229D", + "ő": "\u0151", + "⨸": "\u2A38", + "⊙": "\u2299", + "⦼": "\u29BC", + "œ": "\u0153", + "⦿": "\u29BF", + "𝔬": "\u{1D52C}", + "˛": "\u02DB", + "ò": "\xF2", + "ò": "\xF2", + "⧁": "\u29C1", + "⦵": "\u29B5", + "Ω": "\u03A9", + "∮": "\u222E", + "↺": "\u21BA", + "⦾": "\u29BE", + "⦻": "\u29BB", + "‾": "\u203E", + "⧀": "\u29C0", + "ō": "\u014D", + "ω": "\u03C9", + "ο": "\u03BF", + "⦶": "\u29B6", + "⊖": "\u2296", + "𝕠": "\u{1D560}", + "⦷": "\u29B7", + "⦹": "\u29B9", + "⊕": "\u2295", + "∨": "\u2228", + "↻": "\u21BB", + "⩝": "\u2A5D", + "ℴ": "\u2134", + "ℴ": "\u2134", + "ª": "\xAA", + "ª": "\xAA", + "º": "\xBA", + "º": "\xBA", + "⊶": "\u22B6", + "⩖": "\u2A56", + "⩗": "\u2A57", + "⩛": "\u2A5B", + "ℴ": "\u2134", + "ø": "\xF8", + "ø": "\xF8", + "⊘": "\u2298", + "õ": "\xF5", + "õ": "\xF5", + "⊗": "\u2297", + "⨶": "\u2A36", + "ö": "\xF6", + "ö": "\xF6", + "⌽": "\u233D", + "∥": "\u2225", + "¶": "\xB6", + "¶": "\xB6", + "∥": "\u2225", + "⫳": "\u2AF3", + "⫽": "\u2AFD", + "∂": "\u2202", + "п": "\u043F", + "%": "%", + ".": ".", + "‰": "\u2030", + "⊥": "\u22A5", + "‱": "\u2031", + "𝔭": "\u{1D52D}", + "φ": "\u03C6", + "ϕ": "\u03D5", + "ℳ": "\u2133", + "☎": "\u260E", + "π": "\u03C0", + "⋔": "\u22D4", + "ϖ": "\u03D6", + "ℏ": "\u210F", + "ℎ": "\u210E", + "ℏ": "\u210F", + "+": "+", + "⨣": "\u2A23", + "⊞": "\u229E", + "⨢": "\u2A22", + "∔": "\u2214", + "⨥": "\u2A25", + "⩲": "\u2A72", + "±": "\xB1", + "±": "\xB1", + "⨦": "\u2A26", + "⨧": "\u2A27", + "±": "\xB1", + "⨕": "\u2A15", + "𝕡": "\u{1D561}", + "£": "\xA3", + "£": "\xA3", + "≺": "\u227A", + "⪳": "\u2AB3", + "⪷": "\u2AB7", + "≼": "\u227C", + "⪯": "\u2AAF", + "≺": "\u227A", + "⪷": "\u2AB7", + "≼": "\u227C", + "⪯": "\u2AAF", + "⪹": "\u2AB9", + "⪵": "\u2AB5", + "⋨": "\u22E8", + "≾": "\u227E", + "′": "\u2032", + "ℙ": "\u2119", + "⪵": "\u2AB5", + "⪹": "\u2AB9", + "⋨": "\u22E8", + "∏": "\u220F", + "⌮": "\u232E", + "⌒": "\u2312", + "⌓": "\u2313", + "∝": "\u221D", + "∝": "\u221D", + "≾": "\u227E", + "⊰": "\u22B0", + "𝓅": "\u{1D4C5}", + "ψ": "\u03C8", + " ": "\u2008", + "𝔮": "\u{1D52E}", + "⨌": "\u2A0C", + "𝕢": "\u{1D562}", + "⁗": "\u2057", + "𝓆": "\u{1D4C6}", + "ℍ": "\u210D", + "⨖": "\u2A16", + "?": "?", + "≟": "\u225F", + """: '"', + """: '"', + "⇛": "\u21DB", + "⇒": "\u21D2", + "⤜": "\u291C", + "⤏": "\u290F", + "⥤": "\u2964", + "∽̱": "\u223D\u0331", + "ŕ": "\u0155", + "√": "\u221A", + "⦳": "\u29B3", + "⟩": "\u27E9", + "⦒": "\u2992", + "⦥": "\u29A5", + "⟩": "\u27E9", + "»": "\xBB", + "»": "\xBB", + "→": "\u2192", + "⥵": "\u2975", + "⇥": "\u21E5", + "⤠": "\u2920", + "⤳": "\u2933", + "⤞": "\u291E", + "↪": "\u21AA", + "↬": "\u21AC", + "⥅": "\u2945", + "⥴": "\u2974", + "↣": "\u21A3", + "↝": "\u219D", + "⤚": "\u291A", + "∶": "\u2236", + "ℚ": "\u211A", + "⤍": "\u290D", + "❳": "\u2773", + "}": "}", + "]": "]", + "⦌": "\u298C", + "⦎": "\u298E", + "⦐": "\u2990", + "ř": "\u0159", + "ŗ": "\u0157", + "⌉": "\u2309", + "}": "}", + "р": "\u0440", + "⤷": "\u2937", + "⥩": "\u2969", + "”": "\u201D", + "”": "\u201D", + "↳": "\u21B3", + "ℜ": "\u211C", + "ℛ": "\u211B", + "ℜ": "\u211C", + "ℝ": "\u211D", + "▭": "\u25AD", + "®": "\xAE", + "®": "\xAE", + "⥽": "\u297D", + "⌋": "\u230B", + "𝔯": "\u{1D52F}", + "⇁": "\u21C1", + "⇀": "\u21C0", + "⥬": "\u296C", + "ρ": "\u03C1", + "ϱ": "\u03F1", + "→": "\u2192", + "↣": "\u21A3", + "⇁": "\u21C1", + "⇀": "\u21C0", + "⇄": "\u21C4", + "⇌": "\u21CC", + "⇉": "\u21C9", + "↝": "\u219D", + "⋌": "\u22CC", + "˚": "\u02DA", + "≓": "\u2253", + "⇄": "\u21C4", + "⇌": "\u21CC", + "‏": "\u200F", + "⎱": "\u23B1", + "⎱": "\u23B1", + "⫮": "\u2AEE", + "⟭": "\u27ED", + "⇾": "\u21FE", + "⟧": "\u27E7", + "⦆": "\u2986", + "𝕣": "\u{1D563}", + "⨮": "\u2A2E", + "⨵": "\u2A35", + ")": ")", + "⦔": "\u2994", + "⨒": "\u2A12", + "⇉": "\u21C9", + "›": "\u203A", + "𝓇": "\u{1D4C7}", + "↱": "\u21B1", + "]": "]", + "’": "\u2019", + "’": "\u2019", + "⋌": "\u22CC", + "⋊": "\u22CA", + "▹": "\u25B9", + "⊵": "\u22B5", + "▸": "\u25B8", + "⧎": "\u29CE", + "⥨": "\u2968", + "℞": "\u211E", + "ś": "\u015B", + "‚": "\u201A", + "≻": "\u227B", + "⪴": "\u2AB4", + "⪸": "\u2AB8", + "š": "\u0161", + "≽": "\u227D", + "⪰": "\u2AB0", + "ş": "\u015F", + "ŝ": "\u015D", + "⪶": "\u2AB6", + "⪺": "\u2ABA", + "⋩": "\u22E9", + "⨓": "\u2A13", + "≿": "\u227F", + "с": "\u0441", + "⋅": "\u22C5", + "⊡": "\u22A1", + "⩦": "\u2A66", + "⇘": "\u21D8", + "⤥": "\u2925", + "↘": "\u2198", + "↘": "\u2198", + "§": "\xA7", + "§": "\xA7", + ";": ";", + "⤩": "\u2929", + "∖": "\u2216", + "∖": "\u2216", + "✶": "\u2736", + "𝔰": "\u{1D530}", + "⌢": "\u2322", + "♯": "\u266F", + "щ": "\u0449", + "ш": "\u0448", + "∣": "\u2223", + "∥": "\u2225", + "­": "\xAD", + "­": "\xAD", + "σ": "\u03C3", + "ς": "\u03C2", + "ς": "\u03C2", + "∼": "\u223C", + "⩪": "\u2A6A", + "≃": "\u2243", + "≃": "\u2243", + "⪞": "\u2A9E", + "⪠": "\u2AA0", + "⪝": "\u2A9D", + "⪟": "\u2A9F", + "≆": "\u2246", + "⨤": "\u2A24", + "⥲": "\u2972", + "←": "\u2190", + "∖": "\u2216", + "⨳": "\u2A33", + "⧤": "\u29E4", + "∣": "\u2223", + "⌣": "\u2323", + "⪪": "\u2AAA", + "⪬": "\u2AAC", + "⪬︀": "\u2AAC\uFE00", + "ь": "\u044C", + "/": "/", + "⧄": "\u29C4", + "⌿": "\u233F", + "𝕤": "\u{1D564}", + "♠": "\u2660", + "♠": "\u2660", + "∥": "\u2225", + "⊓": "\u2293", + "⊓︀": "\u2293\uFE00", + "⊔": "\u2294", + "⊔︀": "\u2294\uFE00", + "⊏": "\u228F", + "⊑": "\u2291", + "⊏": "\u228F", + "⊑": "\u2291", + "⊐": "\u2290", + "⊒": "\u2292", + "⊐": "\u2290", + "⊒": "\u2292", + "□": "\u25A1", + "□": "\u25A1", + "▪": "\u25AA", + "▪": "\u25AA", + "→": "\u2192", + "𝓈": "\u{1D4C8}", + "∖": "\u2216", + "⌣": "\u2323", + "⋆": "\u22C6", + "☆": "\u2606", + "★": "\u2605", + "ϵ": "\u03F5", + "ϕ": "\u03D5", + "¯": "\xAF", + "⊂": "\u2282", + "⫅": "\u2AC5", + "⪽": "\u2ABD", + "⊆": "\u2286", + "⫃": "\u2AC3", + "⫁": "\u2AC1", + "⫋": "\u2ACB", + "⊊": "\u228A", + "⪿": "\u2ABF", + "⥹": "\u2979", + "⊂": "\u2282", + "⊆": "\u2286", + "⫅": "\u2AC5", + "⊊": "\u228A", + "⫋": "\u2ACB", + "⫇": "\u2AC7", + "⫕": "\u2AD5", + "⫓": "\u2AD3", + "≻": "\u227B", + "⪸": "\u2AB8", + "≽": "\u227D", + "⪰": "\u2AB0", + "⪺": "\u2ABA", + "⪶": "\u2AB6", + "⋩": "\u22E9", + "≿": "\u227F", + "∑": "\u2211", + "♪": "\u266A", + "¹": "\xB9", + "¹": "\xB9", + "²": "\xB2", + "²": "\xB2", + "³": "\xB3", + "³": "\xB3", + "⊃": "\u2283", + "⫆": "\u2AC6", + "⪾": "\u2ABE", + "⫘": "\u2AD8", + "⊇": "\u2287", + "⫄": "\u2AC4", + "⟉": "\u27C9", + "⫗": "\u2AD7", + "⥻": "\u297B", + "⫂": "\u2AC2", + "⫌": "\u2ACC", + "⊋": "\u228B", + "⫀": "\u2AC0", + "⊃": "\u2283", + "⊇": "\u2287", + "⫆": "\u2AC6", + "⊋": "\u228B", + "⫌": "\u2ACC", + "⫈": "\u2AC8", + "⫔": "\u2AD4", + "⫖": "\u2AD6", + "⇙": "\u21D9", + "⤦": "\u2926", + "↙": "\u2199", + "↙": "\u2199", + "⤪": "\u292A", + "ß": "\xDF", + "ß": "\xDF", + "⌖": "\u2316", + "τ": "\u03C4", + "⎴": "\u23B4", + "ť": "\u0165", + "ţ": "\u0163", + "т": "\u0442", + "⃛": "\u20DB", + "⌕": "\u2315", + "𝔱": "\u{1D531}", + "∴": "\u2234", + "∴": "\u2234", + "θ": "\u03B8", + "ϑ": "\u03D1", + "ϑ": "\u03D1", + "≈": "\u2248", + "∼": "\u223C", + " ": "\u2009", + "≈": "\u2248", + "∼": "\u223C", + "þ": "\xFE", + "þ": "\xFE", + "˜": "\u02DC", + "×": "\xD7", + "×": "\xD7", + "⊠": "\u22A0", + "⨱": "\u2A31", + "⨰": "\u2A30", + "∭": "\u222D", + "⤨": "\u2928", + "⊤": "\u22A4", + "⌶": "\u2336", + "⫱": "\u2AF1", + "𝕥": "\u{1D565}", + "⫚": "\u2ADA", + "⤩": "\u2929", + "‴": "\u2034", + "™": "\u2122", + "▵": "\u25B5", + "▿": "\u25BF", + "◃": "\u25C3", + "⊴": "\u22B4", + "≜": "\u225C", + "▹": "\u25B9", + "⊵": "\u22B5", + "◬": "\u25EC", + "≜": "\u225C", + "⨺": "\u2A3A", + "⨹": "\u2A39", + "⧍": "\u29CD", + "⨻": "\u2A3B", + "⏢": "\u23E2", + "𝓉": "\u{1D4C9}", + "ц": "\u0446", + "ћ": "\u045B", + "ŧ": "\u0167", + "≬": "\u226C", + "↞": "\u219E", + "↠": "\u21A0", + "⇑": "\u21D1", + "⥣": "\u2963", + "ú": "\xFA", + "ú": "\xFA", + "↑": "\u2191", + "ў": "\u045E", + "ŭ": "\u016D", + "û": "\xFB", + "û": "\xFB", + "у": "\u0443", + "⇅": "\u21C5", + "ű": "\u0171", + "⥮": "\u296E", + "⥾": "\u297E", + "𝔲": "\u{1D532}", + "ù": "\xF9", + "ù": "\xF9", + "↿": "\u21BF", + "↾": "\u21BE", + "▀": "\u2580", + "⌜": "\u231C", + "⌜": "\u231C", + "⌏": "\u230F", + "◸": "\u25F8", + "ū": "\u016B", + "¨": "\xA8", + "¨": "\xA8", + "ų": "\u0173", + "𝕦": "\u{1D566}", + "↑": "\u2191", + "↕": "\u2195", + "↿": "\u21BF", + "↾": "\u21BE", + "⊎": "\u228E", + "υ": "\u03C5", + "ϒ": "\u03D2", + "υ": "\u03C5", + "⇈": "\u21C8", + "⌝": "\u231D", + "⌝": "\u231D", + "⌎": "\u230E", + "ů": "\u016F", + "◹": "\u25F9", + "𝓊": "\u{1D4CA}", + "⋰": "\u22F0", + "ũ": "\u0169", + "▵": "\u25B5", + "▴": "\u25B4", + "⇈": "\u21C8", + "ü": "\xFC", + "ü": "\xFC", + "⦧": "\u29A7", + "⇕": "\u21D5", + "⫨": "\u2AE8", + "⫩": "\u2AE9", + "⊨": "\u22A8", + "⦜": "\u299C", + "ϵ": "\u03F5", + "ϰ": "\u03F0", + "∅": "\u2205", + "ϕ": "\u03D5", + "ϖ": "\u03D6", + "∝": "\u221D", + "↕": "\u2195", + "ϱ": "\u03F1", + "ς": "\u03C2", + "⊊︀": "\u228A\uFE00", + "⫋︀": "\u2ACB\uFE00", + "⊋︀": "\u228B\uFE00", + "⫌︀": "\u2ACC\uFE00", + "ϑ": "\u03D1", + "⊲": "\u22B2", + "⊳": "\u22B3", + "в": "\u0432", + "⊢": "\u22A2", + "∨": "\u2228", + "⊻": "\u22BB", + "≚": "\u225A", + "⋮": "\u22EE", + "|": "|", + "|": "|", + "𝔳": "\u{1D533}", + "⊲": "\u22B2", + "⊂⃒": "\u2282\u20D2", + "⊃⃒": "\u2283\u20D2", + "𝕧": "\u{1D567}", + "∝": "\u221D", + "⊳": "\u22B3", + "𝓋": "\u{1D4CB}", + "⫋︀": "\u2ACB\uFE00", + "⊊︀": "\u228A\uFE00", + "⫌︀": "\u2ACC\uFE00", + "⊋︀": "\u228B\uFE00", + "⦚": "\u299A", + "ŵ": "\u0175", + "⩟": "\u2A5F", + "∧": "\u2227", + "≙": "\u2259", + "℘": "\u2118", + "𝔴": "\u{1D534}", + "𝕨": "\u{1D568}", + "℘": "\u2118", + "≀": "\u2240", + "≀": "\u2240", + "𝓌": "\u{1D4CC}", + "⋂": "\u22C2", + "◯": "\u25EF", + "⋃": "\u22C3", + "▽": "\u25BD", + "𝔵": "\u{1D535}", + "⟺": "\u27FA", + "⟷": "\u27F7", + "ξ": "\u03BE", + "⟸": "\u27F8", + "⟵": "\u27F5", + "⟼": "\u27FC", + "⋻": "\u22FB", + "⨀": "\u2A00", + "𝕩": "\u{1D569}", + "⨁": "\u2A01", + "⨂": "\u2A02", + "⟹": "\u27F9", + "⟶": "\u27F6", + "𝓍": "\u{1D4CD}", + "⨆": "\u2A06", + "⨄": "\u2A04", + "△": "\u25B3", + "⋁": "\u22C1", + "⋀": "\u22C0", + "ý": "\xFD", + "ý": "\xFD", + "я": "\u044F", + "ŷ": "\u0177", + "ы": "\u044B", + "¥": "\xA5", + "¥": "\xA5", + "𝔶": "\u{1D536}", + "ї": "\u0457", + "𝕪": "\u{1D56A}", + "𝓎": "\u{1D4CE}", + "ю": "\u044E", + "ÿ": "\xFF", + "ÿ": "\xFF", + "ź": "\u017A", + "ž": "\u017E", + "з": "\u0437", + "ż": "\u017C", + "ℨ": "\u2128", + "ζ": "\u03B6", + "𝔷": "\u{1D537}", + "ж": "\u0436", + "⇝": "\u21DD", + "𝕫": "\u{1D56B}", + "𝓏": "\u{1D4CF}", + "‍": "\u200D", + "‌": "\u200C" +}, html_entities_default = htmlEntities; + +// ../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/text-format.js +function decodeHTMLEntities(str) { + return str.replace(/&(#\d+|#x[a-f0-9]+|[a-z]+\d*);?/gi, (match, entity) => { + if (typeof html_entities_default[match] == "string") + return html_entities_default[match]; + if (entity.charAt(0) !== "#" || match.charAt(match.length - 1) !== ";") + return match; + let codePoint; + entity.charAt(1) === "x" ? codePoint = parseInt(entity.substr(2), 16) : codePoint = parseInt(entity.substr(1), 10); + var output = ""; + return codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111 ? "\uFFFD" : (codePoint > 65535 && (codePoint -= 65536, output += String.fromCharCode(codePoint >>> 10 & 1023 | 55296), codePoint = 56320 | codePoint & 1023), output += String.fromCharCode(codePoint), output); + }); +} +function escapeHtml(str) { + return str.trim().replace(/[<>"'?&]/g, (c) => { + let hex = c.charCodeAt(0).toString(16); + return hex.length < 2 && (hex = "0" + hex), "&#x" + hex.toUpperCase() + ";"; + }); +} +function textToHtml(str) { + return "
" + escapeHtml(str).replace(/\n/g, "
") + "
"; +} +function htmlToText(str) { + return str = str.replace(/\r?\n/g, "").replace(/<\!\-\-.*?\-\->/gi, " ").replace(/]*>/gi, ` +`).replace(/<\/?(p|div|table|tr|td|th)\b[^>]*>/gi, ` + +`).replace(/]*>.*?<\/script\b[^>]*>/gi, " ").replace(/^.*]*>/i, "").replace(/^.*<\/head\b[^>]*>/i, "").replace(/^.*<\!doctype\b[^>]*>/i, "").replace(/<\/body\b[^>]*>.*$/i, "").replace(/<\/html\b[^>]*>.*$/i, "").replace(/]*href\s*=\s*["']?([^\s"']+)[^>]*>/gi, " ($1) ").replace(/<\/?(span|em|i|strong|b|u|a)\b[^>]*>/gi, "").replace(/]*>[\n\u0001\s]*/gi, "* ").replace(/]*>/g, ` +------------- +`).replace(/<[^>]*>/g, " ").replace(/\u0001/g, ` +`).replace(/[ \t]+/g, " ").replace(/^\s+$/gm, "").replace(/\n\n+/g, ` + +`).replace(/^\n+/, ` +`).replace(/\n+$/, ` +`), str = decodeHTMLEntities(str), str; +} +function formatTextAddress(address) { + return [].concat(address.name || []).concat(address.name ? `<${address.address}>` : address.address).join(" "); +} +function formatTextAddresses(addresses) { + let parts = [], processAddress = (address, partCounter) => { + if (partCounter && parts.push(", "), address.group) { + let groupStart = `${address.name}:`, groupEnd = ";"; + parts.push(groupStart), address.group.forEach(processAddress), parts.push(groupEnd); + } else + parts.push(formatTextAddress(address)); + }; + return addresses.forEach(processAddress), parts.join(""); +} +function formatHtmlAddress(address) { + return ``; +} +function formatHtmlAddresses(addresses) { + let parts = [], processAddress = (address, partCounter) => { + if (partCounter && parts.push(''), address.group) { + let groupStart = ``, groupEnd = ''; + parts.push(groupStart), address.group.forEach(processAddress), parts.push(groupEnd); + } else + parts.push(formatHtmlAddress(address)); + }; + return addresses.forEach(processAddress), parts.join(" "); +} +function foldLines(str, lineLength, afterSpace) { + str = (str || "").toString(), lineLength = lineLength || 76; + let pos = 0, len = str.length, result = "", line, match; + for (; pos < len; ) { + if (line = str.substr(pos, lineLength), line.length < lineLength) { + result += line; + break; + } + if (match = line.match(/^[^\n\r]*(\r?\n|\r)/)) { + line = match[0], result += line, pos += line.length; + continue; + } else (match = line.match(/(\s+)[^\s]*$/)) && match[0].length - (afterSpace ? (match[1] || "").length : 0) < line.length ? line = line.substr(0, line.length - (match[0].length - (afterSpace ? (match[1] || "").length : 0))) : (match = str.substr(pos + line.length).match(/^[^\s]+(\s*)/)) && (line = line + match[0].substr(0, match[0].length - (afterSpace ? 0 : (match[1] || "").length))); + result += line, pos += line.length, pos < len && (result += `\r +`); + } + return result; +} +function formatTextHeader(message) { + let rows = []; + if (message.from && rows.push({ key: "From", val: formatTextAddress(message.from) }), message.subject && rows.push({ key: "Subject", val: message.subject }), message.date) { + let dateOptions = { + year: "numeric", + month: "numeric", + day: "numeric", + hour: "numeric", + minute: "numeric", + second: "numeric", + hour12: !1 + }, dateStr = typeof Intl > "u" ? message.date : new Intl.DateTimeFormat("default", dateOptions).format(new Date(message.date)); + rows.push({ key: "Date", val: dateStr }); + } + message.to && message.to.length && rows.push({ key: "To", val: formatTextAddresses(message.to) }), message.cc && message.cc.length && rows.push({ key: "Cc", val: formatTextAddresses(message.cc) }), message.bcc && message.bcc.length && rows.push({ key: "Bcc", val: formatTextAddresses(message.bcc) }); + let maxKeyLength = rows.map((r) => r.key.length).reduce((acc, cur) => cur > acc ? cur : acc, 0); + rows = rows.flatMap((row) => { + let sepLen = maxKeyLength - row.key.length, prefix = `${row.key}: ${" ".repeat(sepLen)}`, emptyPrefix = `${" ".repeat(row.key.length + 1)} ${" ".repeat(sepLen)}`; + return foldLines(row.val, 80, !0).split(/\r?\n/).map((line) => line.trim()).map((line, i) => `${i ? emptyPrefix : prefix}${line}`); + }); + let maxLineLength = rows.map((r) => r.length).reduce((acc, cur) => cur > acc ? cur : acc, 0), lineMarker = "-".repeat(maxLineLength); + return ` +${lineMarker} +${rows.join(` +`)} +${lineMarker} +`; +} +function formatHtmlHeader(message) { + let rows = []; + if (message.from && rows.push(``), message.subject && rows.push( + `` + ), message.date) { + let dateOptions = { + year: "numeric", + month: "numeric", + day: "numeric", + hour: "numeric", + minute: "numeric", + second: "numeric", + hour12: !1 + }, dateStr = typeof Intl > "u" ? message.date : new Intl.DateTimeFormat("default", dateOptions).format(new Date(message.date)); + rows.push( + `` + ); + } + return message.to && message.to.length && rows.push(``), message.cc && message.cc.length && rows.push(``), message.bcc && message.bcc.length && rows.push(``), ``; +} + +// ../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/address-parser.js +function _handleAddress(tokens) { + let token, isGroup = !1, state = "text", address, addresses = [], data = { + address: [], + comment: [], + group: [], + text: [] + }, i, len; + for (i = 0, len = tokens.length; i < len; i++) + if (token = tokens[i], token.type === "operator") + switch (token.value) { + case "<": + state = "address"; + break; + case "(": + state = "comment"; + break; + case ":": + state = "group", isGroup = !0; + break; + default: + state = "text"; + } + else token.value && (state === "address" && (token.value = token.value.replace(/^[^<]*<\s*/, "")), data[state].push(token.value)); + if (!data.text.length && data.comment.length && (data.text = data.comment, data.comment = []), isGroup) + data.text = data.text.join(" "), addresses.push({ + name: decodeWords(data.text || address && address.name), + group: data.group.length ? addressParser(data.group.join(",")) : [] + }); + else { + if (!data.address.length && data.text.length) { + for (i = data.text.length - 1; i >= 0; i--) + if (data.text[i].match(/^[^@\s]+@[^@\s]+$/)) { + data.address = data.text.splice(i, 1); + break; + } + let _regexHandler = function(address2) { + return data.address.length ? address2 : (data.address = [address2.trim()], " "); + }; + if (!data.address.length) + for (i = data.text.length - 1; i >= 0 && (data.text[i] = data.text[i].replace(/\s*\b[^@\s]+@[^\s]+\b\s*/, _regexHandler).trim(), !data.address.length); i--) + ; + } + if (!data.text.length && data.comment.length && (data.text = data.comment, data.comment = []), data.address.length > 1 && (data.text = data.text.concat(data.address.splice(1))), data.text = data.text.join(" "), data.address = data.address.join(" "), !data.address && /^=\?[^=]+?=$/.test(data.text.trim())) { + let parsedSubAddresses = addressParser(decodeWords(data.text)); + if (parsedSubAddresses && parsedSubAddresses.length) + return parsedSubAddresses; + } + if (!data.address && isGroup) + return []; + address = { + address: data.address || data.text || "", + name: decodeWords(data.text || data.address || "") + }, address.address === address.name && ((address.address || "").match(/@/) ? address.name = "" : address.address = ""), addresses.push(address); + } + return addresses; +} +var Tokenizer = class { + constructor(str) { + this.str = (str || "").toString(), this.operatorCurrent = "", this.operatorExpecting = "", this.node = null, this.escaped = !1, this.list = [], this.operators = { + '"': '"', + "(": ")", + "<": ">", + ",": "", + ":": ";", + // Semicolons are not a legal delimiter per the RFC2822 grammar other + // than for terminating a group, but they are also not valid for any + // other use in this context. Given that some mail clients have + // historically allowed the semicolon as a delimiter equivalent to the + // comma in their UI, it makes sense to treat them the same as a comma + // when used outside of a group. + ";": "" + }; + } + /** + * Tokenizes the original input string + * + * @return {Array} An array of operator|text tokens + */ + tokenize() { + let chr, list = []; + for (let i = 0, len = this.str.length; i < len; i++) + chr = this.str.charAt(i), this.checkChar(chr); + return this.list.forEach((node) => { + node.value = (node.value || "").toString().trim(), node.value && list.push(node); + }), list; + } + /** + * Checks if a character is an operator or text and acts accordingly + * + * @param {String} chr Character from the address field + */ + checkChar(chr) { + if (!this.escaped) { + if (chr === this.operatorExpecting) { + this.node = { + type: "operator", + value: chr + }, this.list.push(this.node), this.node = null, this.operatorExpecting = "", this.escaped = !1; + return; + } else if (!this.operatorExpecting && chr in this.operators) { + this.node = { + type: "operator", + value: chr + }, this.list.push(this.node), this.node = null, this.operatorExpecting = this.operators[chr], this.escaped = !1; + return; + } else if (['"', "'"].includes(this.operatorExpecting) && chr === "\\") { + this.escaped = !0; + return; + } + } + this.node || (this.node = { + type: "text", + value: "" + }, this.list.push(this.node)), chr === ` +` && (chr = " "), (chr.charCodeAt(0) >= 33 || [" ", " "].includes(chr)) && (this.node.value += chr), this.escaped = !1; + } +}; +function addressParser(str, options) { + options = options || {}; + let tokens = new Tokenizer(str).tokenize(), addresses = [], address = [], parsedAddresses = []; + if (tokens.forEach((token) => { + token.type === "operator" && (token.value === "," || token.value === ";") ? (address.length && addresses.push(address), address = []) : address.push(token); + }), address.length && addresses.push(address), addresses.forEach((address2) => { + address2 = _handleAddress(address2), address2.length && (parsedAddresses = parsedAddresses.concat(address2)); + }), options.flatten) { + let addresses2 = [], walkAddressList = (list) => { + list.forEach((address2) => { + if (address2.group) + return walkAddressList(address2.group); + addresses2.push(address2); + }); + }; + return walkAddressList(parsedAddresses), addresses2; + } + return parsedAddresses; +} +var address_parser_default = addressParser; + +// ../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/base64-encoder.js +function base64ArrayBuffer(arrayBuffer) { + for (var base64 = "", encodings = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", bytes = new Uint8Array(arrayBuffer), byteLength = bytes.byteLength, byteRemainder = byteLength % 3, mainLength = byteLength - byteRemainder, a, b, c, d, chunk, i = 0; i < mainLength; i = i + 3) + chunk = bytes[i] << 16 | bytes[i + 1] << 8 | bytes[i + 2], a = (chunk & 16515072) >> 18, b = (chunk & 258048) >> 12, c = (chunk & 4032) >> 6, d = chunk & 63, base64 += encodings[a] + encodings[b] + encodings[c] + encodings[d]; + return byteRemainder == 1 ? (chunk = bytes[mainLength], a = (chunk & 252) >> 2, b = (chunk & 3) << 4, base64 += encodings[a] + encodings[b] + "==") : byteRemainder == 2 && (chunk = bytes[mainLength] << 8 | bytes[mainLength + 1], a = (chunk & 64512) >> 10, b = (chunk & 1008) >> 4, c = (chunk & 15) << 2, base64 += encodings[a] + encodings[b] + encodings[c] + "="), base64; +} + +// ../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/postal-mime.js +var PostalMime = class _PostalMime { + static parse(buf, options) { + return new _PostalMime(options).parse(buf); + } + constructor(options) { + this.options = options || {}, this.root = this.currentNode = new MimeNode({ + postalMime: this + }), this.boundaries = [], this.textContent = {}, this.attachments = [], this.attachmentEncoding = (this.options.attachmentEncoding || "").toString().replace(/[-_\s]/g, "").trim().toLowerCase() || "arraybuffer", this.started = !1; + } + async finalize() { + await this.root.finalize(); + } + async processLine(line, isFinal) { + let boundaries = this.boundaries; + if (boundaries.length && line.length > 2 && line[0] === 45 && line[1] === 45) + for (let i = boundaries.length - 1; i >= 0; i--) { + let boundary = boundaries[i]; + if (line.length !== boundary.value.length + 2 && line.length !== boundary.value.length + 4) + continue; + let isTerminator = line.length === boundary.value.length + 4; + if (isTerminator && (line[line.length - 2] !== 45 || line[line.length - 1] !== 45)) + continue; + let boudaryMatches = !0; + for (let i2 = 0; i2 < boundary.value.length; i2++) + if (line[i2 + 2] !== boundary.value[i2]) { + boudaryMatches = !1; + break; + } + if (boudaryMatches) + return isTerminator ? (await boundary.node.finalize(), this.currentNode = boundary.node.parentNode || this.root) : (await boundary.node.finalizeChildNodes(), this.currentNode = new MimeNode({ + postalMime: this, + parentNode: boundary.node + })), isFinal ? this.finalize() : void 0; + } + if (this.currentNode.feed(line), isFinal) + return this.finalize(); + } + readLine() { + let startPos = this.readPos, endPos = this.readPos, res = () => ({ + bytes: new Uint8Array(this.buf, startPos, endPos - startPos), + done: this.readPos >= this.av.length + }); + for (; this.readPos < this.av.length; ) { + let c = this.av[this.readPos++]; + if (c !== 13 && c !== 10 && (endPos = this.readPos), c === 10) + return res(); + } + return res(); + } + async processNodeTree() { + let textContent = {}, textTypes = /* @__PURE__ */ new Set(), textMap = this.textMap = /* @__PURE__ */ new Map(), forceRfc822Attachments = this.forceRfc822Attachments(), walk = async (node, alternative, related) => { + if (alternative = alternative || !1, related = related || !1, node.contentType.multipart) + node.contentType.multipart === "alternative" ? alternative = node : node.contentType.multipart === "related" && (related = node); + else if (this.isInlineMessageRfc822(node) && !forceRfc822Attachments) { + let subParser = new _PostalMime(); + node.subMessage = await subParser.parse(node.content), textMap.has(node) || textMap.set(node, {}); + let textEntry = textMap.get(node); + (node.subMessage.text || !node.subMessage.html) && (textEntry.plain = textEntry.plain || [], textEntry.plain.push({ type: "subMessage", value: node.subMessage }), textTypes.add("plain")), node.subMessage.html && (textEntry.html = textEntry.html || [], textEntry.html.push({ type: "subMessage", value: node.subMessage }), textTypes.add("html")), subParser.textMap && subParser.textMap.forEach((subTextEntry, subTextNode) => { + textMap.set(subTextNode, subTextEntry); + }); + for (let attachment of node.subMessage.attachments || []) + this.attachments.push(attachment); + } else if (this.isInlineTextNode(node)) { + let textType = node.contentType.parsed.value.substr(node.contentType.parsed.value.indexOf("/") + 1), selectorNode = alternative || node; + textMap.has(selectorNode) || textMap.set(selectorNode, {}); + let textEntry = textMap.get(selectorNode); + textEntry[textType] = textEntry[textType] || [], textEntry[textType].push({ type: "text", value: node.getTextContent() }), textTypes.add(textType); + } else if (node.content) { + let filename = node.contentDisposition.parsed.params.filename || node.contentType.parsed.params.name || null, attachment = { + filename: filename ? decodeWords(filename) : null, + mimeType: node.contentType.parsed.value, + disposition: node.contentDisposition.parsed.value || null + }; + switch (related && node.contentId && (attachment.related = !0), node.contentDescription && (attachment.description = node.contentDescription), node.contentId && (attachment.contentId = node.contentId), node.contentType.parsed.value) { + // Special handling for calendar events + case "text/calendar": + case "application/ics": { + node.contentType.parsed.params.method && (attachment.method = node.contentType.parsed.params.method.toString().toUpperCase().trim()); + let decodedText = node.getTextContent().replace(/\r?\n/g, ` +`).replace(/\n*$/, ` +`); + attachment.content = textEncoder.encode(decodedText); + break; + } + // Regular attachments + default: + attachment.content = node.content; + } + this.attachments.push(attachment); + } + for (let childNode of node.childNodes) + await walk(childNode, alternative, related); + }; + await walk(this.root, !1, []), textMap.forEach((mapEntry) => { + textTypes.forEach((textType) => { + if (textContent[textType] || (textContent[textType] = []), mapEntry[textType]) + mapEntry[textType].forEach((textEntry) => { + switch (textEntry.type) { + case "text": + textContent[textType].push(textEntry.value); + break; + case "subMessage": + switch (textType) { + case "html": + textContent[textType].push(formatHtmlHeader(textEntry.value)); + break; + case "plain": + textContent[textType].push(formatTextHeader(textEntry.value)); + break; + } + break; + } + }); + else { + let alternativeType; + switch (textType) { + case "html": + alternativeType = "plain"; + break; + case "plain": + alternativeType = "html"; + break; + } + (mapEntry[alternativeType] || []).forEach((textEntry) => { + switch (textEntry.type) { + case "text": + switch (textType) { + case "html": + textContent[textType].push(textToHtml(textEntry.value)); + break; + case "plain": + textContent[textType].push(htmlToText(textEntry.value)); + break; + } + break; + case "subMessage": + switch (textType) { + case "html": + textContent[textType].push(formatHtmlHeader(textEntry.value)); + break; + case "plain": + textContent[textType].push(formatTextHeader(textEntry.value)); + break; + } + break; + } + }); + } + }); + }), Object.keys(textContent).forEach((textType) => { + textContent[textType] = textContent[textType].join(` +`); + }), this.textContent = textContent; + } + isInlineTextNode(node) { + if (node.contentDisposition.parsed.value === "attachment") + return !1; + switch (node.contentType.parsed.value) { + case "text/html": + case "text/plain": + return !0; + case "text/calendar": + case "text/csv": + default: + return !1; + } + } + isInlineMessageRfc822(node) { + return node.contentType.parsed.value !== "message/rfc822" ? !1 : (node.contentDisposition.parsed.value || (this.options.rfc822Attachments ? "attachment" : "inline")) === "inline"; + } + // Check if this is a specially crafted report email where message/rfc822 content should not be inlined + forceRfc822Attachments() { + if (this.options.forceRfc822Attachments) + return !0; + let forceRfc822Attachments = !1, walk = (node) => { + node.contentType.multipart || ["message/delivery-status", "message/feedback-report"].includes(node.contentType.parsed.value) && (forceRfc822Attachments = !0); + for (let childNode of node.childNodes) + walk(childNode); + }; + return walk(this.root), forceRfc822Attachments; + } + async resolveStream(stream) { + let chunkLen = 0, chunks = [], reader = stream.getReader(); + for (; ; ) { + let { done, value } = await reader.read(); + if (done) + break; + chunks.push(value), chunkLen += value.length; + } + let result = new Uint8Array(chunkLen), chunkPointer = 0; + for (let chunk of chunks) + result.set(chunk, chunkPointer), chunkPointer += chunk.length; + return result; + } + async parse(buf) { + if (this.started) + throw new Error("Can not reuse parser, create a new PostalMime object"); + for (this.started = !0, buf && typeof buf.getReader == "function" && (buf = await this.resolveStream(buf)), buf = buf || new ArrayBuffer(0), typeof buf == "string" && (buf = textEncoder.encode(buf)), (buf instanceof Blob || Object.prototype.toString.call(buf) === "[object Blob]") && (buf = await blobToArrayBuffer(buf)), buf.buffer instanceof ArrayBuffer && (buf = new Uint8Array(buf).buffer), this.buf = buf, this.av = new Uint8Array(buf), this.readPos = 0; this.readPos < this.av.length; ) { + let line = this.readLine(); + await this.processLine(line.bytes, line.done); + } + await this.processNodeTree(); + let message = { + headers: this.root.headers.map((entry) => ({ key: entry.key, value: entry.value })).reverse() + }; + for (let key of ["from", "sender"]) { + let addressHeader = this.root.headers.find((line) => line.key === key); + if (addressHeader && addressHeader.value) { + let addresses = address_parser_default(addressHeader.value); + addresses && addresses.length && (message[key] = addresses[0]); + } + } + for (let key of ["delivered-to", "return-path"]) { + let addressHeader = this.root.headers.find((line) => line.key === key); + if (addressHeader && addressHeader.value) { + let addresses = address_parser_default(addressHeader.value); + if (addresses && addresses.length && addresses[0].address) { + let camelKey = key.replace(/\-(.)/g, (o, c) => c.toUpperCase()); + message[camelKey] = addresses[0].address; + } + } + } + for (let key of ["to", "cc", "bcc", "reply-to"]) { + let addressHeaders = this.root.headers.filter((line) => line.key === key), addresses = []; + if (addressHeaders.filter((entry) => entry && entry.value).map((entry) => address_parser_default(entry.value)).forEach((parsed) => addresses = addresses.concat(parsed || [])), addresses && addresses.length) { + let camelKey = key.replace(/\-(.)/g, (o, c) => c.toUpperCase()); + message[camelKey] = addresses; + } + } + for (let key of ["subject", "message-id", "in-reply-to", "references"]) { + let header = this.root.headers.find((line) => line.key === key); + if (header && header.value) { + let camelKey = key.replace(/\-(.)/g, (o, c) => c.toUpperCase()); + message[camelKey] = decodeWords(header.value); + } + } + let dateHeader = this.root.headers.find((line) => line.key === "date"); + if (dateHeader) { + let date = new Date(dateHeader.value); + !date || date.toString() === "Invalid Date" ? date = dateHeader.value : date = date.toISOString(), message.date = date; + } + switch (this.textContent?.html && (message.html = this.textContent.html), this.textContent?.plain && (message.text = this.textContent.plain), message.attachments = this.attachments, this.attachmentEncoding) { + case "arraybuffer": + break; + case "base64": + for (let attachment of message.attachments || []) + attachment?.content && (attachment.content = base64ArrayBuffer(attachment.content), attachment.encoding = "base64"); + break; + case "utf8": + let attachmentDecoder = new TextDecoder("utf8"); + for (let attachment of message.attachments || []) + attachment?.content && (attachment.content = attachmentDecoder.decode(attachment.content), attachment.encoding = "utf8"); + break; + default: + throw new Error("Unknwon attachment encoding"); + } + return message; + } +}; + +// src/workers/core/constants.ts +var CoreBindings = { + SERVICE_LOOPBACK: "MINIFLARE_LOOPBACK", + SERVICE_USER_ROUTE_PREFIX: "MINIFLARE_USER_ROUTE_", + SERVICE_USER_FALLBACK: "MINIFLARE_USER_FALLBACK", + TEXT_CUSTOM_SERVICE: "MINIFLARE_CUSTOM_SERVICE", + IMAGES_SERVICE: "MINIFLARE_IMAGES_SERVICE", + TEXT_UPSTREAM_URL: "MINIFLARE_UPSTREAM_URL", + JSON_CF_BLOB: "CF_BLOB", + JSON_ROUTES: "MINIFLARE_ROUTES", + JSON_LOG_LEVEL: "MINIFLARE_LOG_LEVEL", + DATA_LIVE_RELOAD_SCRIPT: "MINIFLARE_LIVE_RELOAD_SCRIPT", + DURABLE_OBJECT_NAMESPACE_PROXY: "MINIFLARE_PROXY", + DATA_PROXY_SECRET: "MINIFLARE_PROXY_SECRET", + DATA_PROXY_SHARED_SECRET: "MINIFLARE_PROXY_SHARED_SECRET", + TRIGGER_HANDLERS: "TRIGGER_HANDLERS", + LOG_REQUESTS: "LOG_REQUESTS" +}; + +// src/workers/email/constants.ts +var RAW_EMAIL = "EmailMessage::raw"; + +// src/workers/email/send_email.worker.ts +var SendEmailBinding = class extends WorkerEntrypoint { + checkDestinationAllowed(to) { + if (this.env.destination_address !== void 0 && to !== this.env.destination_address) + throw new Error(`email to ${to} not allowed`); + if (this.env.allowed_destination_addresses !== void 0 && !this.env.allowed_destination_addresses.includes(to)) + throw new Error(`email to ${to} not allowed`); + } + async send(emailMessage) { + this.checkDestinationAllowed(emailMessage.to); + let rawEmail = emailMessage[RAW_EMAIL], rawEmailBuffer = new Uint8Array( + await new Response(rawEmail).arrayBuffer() + ), parsedEmail; + try { + parsedEmail = await PostalMime.parse(rawEmailBuffer); + } catch (e) { + let error = e; + throw new Error(`could not parse email: ${error.message}`); + } + if (parsedEmail.messageId === void 0) + throw new Error("invalid message-id"); + let emailHeaders; + try { + emailHeaders = new Headers( + parsedEmail.headers.map((header) => [header.key, header.value]) + ); + } catch (e) { + let error = e; + throw new Error(`could not parse email: ${error.message}`); + } + if (emailMessage.from !== parsedEmail.from.address) + throw new Error("From: header does not match mail from"); + if (emailHeaders.get("received") !== null) + throw new Error("invalid headers set"); + let file = await (await this.env[CoreBindings.SERVICE_LOOPBACK].fetch( + "http://localhost/core/store-temp-file?extension=eml&prefix=email", + { + method: "POST", + body: rawEmailBuffer + } + )).text(); + this.ctx.waitUntil( + this.env[CoreBindings.SERVICE_LOOPBACK].fetch( + "http://localhost/core/log", + { + method: "POST", + headers: { [SharedHeaders.LOG_LEVEL]: LogLevel.INFO.toString() }, + body: `${blue("send_email binding called with the following message:")} + ${file}` + } + ) + ); + } +}; +export { + SendEmailBinding +}; +//# sourceMappingURL=send_email.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/email/send_email.worker.js.map b/node_modules/miniflare/dist/src/workers/email/send_email.worker.js.map new file mode 100644 index 0000000..efd7b3e --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/email/send_email.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../src/workers/email/send_email.worker.ts", "../../../../../../node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/colors.mjs", "../../../../../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/decode-strings.js", "../../../../../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/pass-through-decoder.js", "../../../../../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/base64-decoder.js", "../../../../../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/qp-decoder.js", "../../../../../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/mime-node.js", "../../../../../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/html-entities.js", "../../../../../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/text-format.js", "../../../../../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/address-parser.js", "../../../../../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex3jjynq4iizhk4/node_modules/postal-mime/src/base64-encoder.js", "../../../../../../node_modules/.pnpm/postal-mime@2.4.3_patch_hash=ngwql2fj2dlex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AEI;AAEJ,QAAI;AACH,oBAAc,MAAM,WAAW,MAAM,cAAc;AAAA,IACpD,SAAS,GAAG;AACX,UAAM,QAAQ;AACd,YAAM,IAAI,MAAM,0BAA0B,MAAM,OAAO,EAAE;AAAA,IAC1D;AAEA,QAAI,YAAY,cAAc;AAC7B,YAAM,IAAI,MAAM,oBAAoB;AAGrC,QAAI;AACJ,QAAI;AACH,qBAAe,IAAI;AAAA,QAClB,YAAY,QAAQ,IAAI,CAAC,WAAW,CAAC,OAAO,KAAK,OAAO,KAAK,CAAC;AAAA,MAC/D;AAAA,IACD,SAAS,GAAG;AACX,UAAM,QAAQ;AACd,YAAM,IAAI,MAAM,0BAA0B,MAAM,OAAO,EAAE;AAAA,IAC1D;AAEA,QAAI,aAAa,SAAS,YAAY,KAAK;AAC1C,YAAM,IAAI,MAAM,uCAAuC;AAGxD,QAAI,aAAa,IAAI,UAAU,MAAM;AACpC,YAAM,IAAI,MAAM,qBAAqB;AAUtC,QAAM,OAAO,OAPA,MAAM,KAAK,IAAI,aAAa,gBAAgB,EAAE;AAAA,MAC1D;AAAA,MACA;AAAA,QACC,QAAQ;AAAA,QACR,MAAM;AAAA,MACP;AAAA,IACD,GACwB,KAAK;AAE7B,SAAK,IAAI;AAAA,MACR,KAAK,IAAI,aAAa,gBAAgB,EAAE;AAAA,QACvC;AAAA,QACA;AAAA,UACC,QAAQ;AAAA,UACR,SAAS,EAAE,CAAC,cAAc,SAAS,GAAG,SAAS,KAAK,SAAS,EAAE;AAAA,UAC/D,MAAM,GAAG,KAAK,uDAAuD,CAAC;AAAA,IAAO,IAAI;AAAA,QAClF;AAAA,MACD;AAAA,IACD;AAAA,EACD;AACD;", + "names": ["c", "address", "addresses", "i"] +} diff --git a/node_modules/miniflare/dist/src/workers/kv/namespace.worker.js b/node_modules/miniflare/dist/src/workers/kv/namespace.worker.js new file mode 100644 index 0000000..bfa8766 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/kv/namespace.worker.js @@ -0,0 +1,321 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __decorateClass = (decorators, target, key, kind) => { + for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--) + (decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result); + return kind && result && __defProp(target, key, result), result; +}; + +// src/workers/kv/namespace.worker.ts +import assert from "node:assert"; +import { + DeferredPromise, + DELETE, + GET, + HttpError as HttpError2, + KeyValueStorage, + maybeApply, + MiniflareDurableObject, + POST, + PUT +} from "miniflare:shared"; + +// src/workers/kv/constants.ts +import { testRegExps } from "miniflare:shared"; +var KVLimits = { + MIN_CACHE_TTL: 60, + MAX_LIST_KEYS: 1e3, + MAX_KEY_SIZE: 512, + MAX_VALUE_SIZE: 25 * 1024 * 1024, + MAX_VALUE_SIZE_TEST: 1024, + MAX_METADATA_SIZE: 1024, + MAX_BULK_SIZE: 25 * 1024 * 1024 +}, KVParams = { + URL_ENCODED: "urlencoded", + CACHE_TTL: "cache_ttl", + EXPIRATION: "expiration", + EXPIRATION_TTL: "expiration_ttl", + LIST_LIMIT: "key_count_limit", + LIST_PREFIX: "prefix", + LIST_CURSOR: "cursor" +}, KVHeaders = { + EXPIRATION: "CF-Expiration", + METADATA: "CF-KV-Metadata" +}; +var MAX_BULK_GET_KEYS = 100; + +// src/workers/kv/validator.worker.ts +import { Buffer as Buffer2 } from "node:buffer"; +import { HttpError } from "miniflare:shared"; +function decodeKey({ key }, query) { + if (query.get(KVParams.URL_ENCODED)?.toLowerCase() !== "true") return key; + try { + return decodeURIComponent(key); + } catch (e) { + throw e instanceof URIError ? new HttpError(400, "Could not URL-decode key name") : e; + } +} +function validateKey(key) { + if (key === "") + throw new HttpError(400, "Key names must not be empty"); + if (key === "." || key === "..") + throw new HttpError( + 400, + `Illegal key name "${key}". Please use a different name.` + ); + validateKeyLength(key); +} +function validateKeyLength(key) { + let keyLength = Buffer2.byteLength(key); + if (keyLength > KVLimits.MAX_KEY_SIZE) + throw new HttpError( + 414, + `UTF-8 encoded length of ${keyLength} exceeds key length limit of ${KVLimits.MAX_KEY_SIZE}.` + ); +} +function validateGetOptions(key, options) { + validateKey(key); + let cacheTtl = options?.cacheTtl; + if (cacheTtl !== void 0 && (isNaN(cacheTtl) || cacheTtl < KVLimits.MIN_CACHE_TTL)) + throw new HttpError( + 400, + `Invalid ${KVParams.CACHE_TTL} of ${cacheTtl}. Cache TTL must be at least ${KVLimits.MIN_CACHE_TTL}.` + ); +} +function validatePutOptions(key, options) { + let { now, rawExpiration, rawExpirationTtl, rawMetadata } = options; + validateKey(key); + let expiration; + if (rawExpirationTtl !== null) { + let expirationTtl = parseInt(rawExpirationTtl); + if (Number.isNaN(expirationTtl) || expirationTtl <= 0) + throw new HttpError( + 400, + `Invalid ${KVParams.EXPIRATION_TTL} of ${rawExpirationTtl}. Please specify integer greater than 0.` + ); + if (expirationTtl < KVLimits.MIN_CACHE_TTL) + throw new HttpError( + 400, + `Invalid ${KVParams.EXPIRATION_TTL} of ${rawExpirationTtl}. Expiration TTL must be at least ${KVLimits.MIN_CACHE_TTL}.` + ); + expiration = now + expirationTtl; + } else if (rawExpiration !== null) { + if (expiration = parseInt(rawExpiration), Number.isNaN(expiration) || expiration <= now) + throw new HttpError( + 400, + `Invalid ${KVParams.EXPIRATION} of ${rawExpiration}. Please specify integer greater than the current number of seconds since the UNIX epoch.` + ); + if (expiration < now + KVLimits.MIN_CACHE_TTL) + throw new HttpError( + 400, + `Invalid ${KVParams.EXPIRATION} of ${rawExpiration}. Expiration times must be at least ${KVLimits.MIN_CACHE_TTL} seconds in the future.` + ); + } + let metadata; + if (rawMetadata !== null) { + let metadataLength = Buffer2.byteLength(rawMetadata); + if (metadataLength > KVLimits.MAX_METADATA_SIZE) + throw new HttpError( + 413, + `Metadata length of ${metadataLength} exceeds limit of ${KVLimits.MAX_METADATA_SIZE}.` + ); + metadata = JSON.parse(rawMetadata); + } + return { expiration, metadata }; +} +function decodeListOptions(url) { + let limitParam = url.searchParams.get(KVParams.LIST_LIMIT), limit = limitParam === null ? KVLimits.MAX_LIST_KEYS : parseInt(limitParam), prefix = url.searchParams.get(KVParams.LIST_PREFIX) ?? void 0, cursor = url.searchParams.get(KVParams.LIST_CURSOR) ?? void 0; + return { limit, prefix, cursor }; +} +function validateListOptions(options) { + let limit = options.limit; + if (limit !== void 0) { + if (isNaN(limit) || limit < 1) + throw new HttpError( + 400, + `Invalid ${KVParams.LIST_LIMIT} of ${limit}. Please specify an integer greater than 0.` + ); + if (limit > KVLimits.MAX_LIST_KEYS) + throw new HttpError( + 400, + `Invalid ${KVParams.LIST_LIMIT} of ${limit}. Please specify an integer less than ${KVLimits.MAX_LIST_KEYS}.` + ); + } + let prefix = options.prefix; + prefix != null && validateKeyLength(prefix); +} + +// src/workers/kv/namespace.worker.ts +function createMaxValueSizeError(length, maxValueSize) { + return new HttpError2( + 413, + `Value length of ${length} exceeds limit of ${maxValueSize}.` + ); +} +var MaxLengthStream = class extends TransformStream { + signal; + length; + constructor(maxLength) { + let abortController = new AbortController(), lengthPromise = new DeferredPromise(), length = 0; + super({ + transform(chunk, controller) { + length += chunk.byteLength, length <= maxLength ? controller.enqueue(chunk) : abortController.signal.aborted || abortController.abort(); + }, + flush() { + lengthPromise.resolve(length); + } + }), this.signal = abortController.signal, this.length = lengthPromise; + } +}; +function millisToSeconds(millis) { + return Math.floor(millis / 1e3); +} +function secondsToMillis(seconds) { + return seconds * 1e3; +} +async function processKeyValue(obj, type = "text", withMetadata = !1) { + let decoder = new TextDecoder(), decodedValue = ""; + if (obj?.value) { + for await (let chunk of obj?.value) + decodedValue += decoder.decode(chunk, { stream: !0 }); + decodedValue += decoder.decode(); + } + let val = null, size = decodedValue.length; + try { + val = obj?.value ? type === "json" ? JSON.parse(decodedValue) : decodedValue : null; + } catch { + throw new HttpError2( + 400, + `At least one of the requested keys corresponds to a non-${type} value` + ); + } + return val && withMetadata ? [ + { + value: val, + metadata: obj?.metadata ?? null + }, + size + ] : [val, size]; +} +var KVNamespaceObject = class extends MiniflareDurableObject { + #storage; + get storage() { + return this.#storage ??= new KeyValueStorage(this); + } + get = async (req, params, url) => { + if (req.method === "POST" && req.body != null) { + let decodedBody = "", decoder = new TextDecoder(); + for await (let chunk of req.body) + decodedBody += decoder.decode(chunk, { stream: !0 }); + decodedBody += decoder.decode(); + let parsedBody = JSON.parse(decodedBody), keys = parsedBody.keys, type = parsedBody?.type; + if (type && type !== "text" && type !== "json") { + let errorStr = `"${type}" is not a valid type. Use "json" or "text"`; + return new Response(errorStr, { status: 400, statusText: errorStr }); + } + let obj = {}; + if (keys.length > MAX_BULK_GET_KEYS) { + let errorStr = `You can request a maximum of ${MAX_BULK_GET_KEYS} keys`; + return new Response(errorStr, { status: 400, statusText: errorStr }); + } + if (keys.length < 1) { + let errorStr = "You must request a minimum of 1 key"; + return new Response(errorStr, { status: 400, statusText: errorStr }); + } + let totalBytes = 0; + for (let key2 of keys) { + validateGetOptions(key2, { cacheTtl: parsedBody?.cacheTtl }); + let entry2 = await this.storage.get(key2), [value, size] = await processKeyValue( + entry2, + parsedBody?.type, + parsedBody?.withMetadata + ); + totalBytes += size, obj[key2] = value; + } + let maxValueSize = this.beingTested ? KVLimits.MAX_VALUE_SIZE_TEST : KVLimits.MAX_BULK_SIZE; + if (totalBytes > maxValueSize) + throw new HttpError2( + 413, + `Total size of request exceeds the limit of ${maxValueSize / 1024 / 1024}MB` + ); + return new Response(JSON.stringify(obj)); + } + let key = decodeKey(params, url.searchParams), cacheTtlParam = url.searchParams.get(KVParams.CACHE_TTL), cacheTtl = cacheTtlParam === null ? void 0 : parseInt(cacheTtlParam); + validateGetOptions(key, { cacheTtl }); + let entry = await this.storage.get(key); + if (entry === null) throw new HttpError2(404, "Not Found"); + let headers = new Headers(); + return entry.expiration !== void 0 && headers.set( + KVHeaders.EXPIRATION, + millisToSeconds(entry.expiration).toString() + ), entry.metadata !== void 0 && headers.set(KVHeaders.METADATA, JSON.stringify(entry.metadata)), new Response(entry.value, { headers }); + }; + put = async (req, params, url) => { + let key = decodeKey(params, url.searchParams), rawExpiration = url.searchParams.get(KVParams.EXPIRATION), rawExpirationTtl = url.searchParams.get(KVParams.EXPIRATION_TTL), rawMetadata = req.headers.get(KVHeaders.METADATA), now = millisToSeconds(this.timers.now()), { expiration, metadata } = validatePutOptions(key, { + now, + rawExpiration, + rawExpirationTtl, + rawMetadata + }), value = req.body, contentLength = parseInt(req.headers.get("Content-Length")), valueLengthHint; + Number.isNaN(contentLength) ? value === null && (valueLengthHint = 0) : valueLengthHint = contentLength, value ??= new ReadableStream({ + start(controller) { + controller.close(); + } + }); + let maxValueSize = this.beingTested ? KVLimits.MAX_VALUE_SIZE_TEST : KVLimits.MAX_VALUE_SIZE, maxLengthStream; + if (valueLengthHint !== void 0 && valueLengthHint > maxValueSize) + throw createMaxValueSizeError(valueLengthHint, maxValueSize); + maxLengthStream = new MaxLengthStream(maxValueSize), value = value.pipeThrough(maxLengthStream); + try { + await this.storage.put({ + key, + value, + expiration: maybeApply(secondsToMillis, expiration), + metadata, + signal: maxLengthStream?.signal + }); + } catch (e) { + if (typeof e == "object" && e !== null && "name" in e && e.name === "AbortError") { + assert(maxLengthStream !== void 0); + let length = await maxLengthStream.length; + throw createMaxValueSizeError(length, maxValueSize); + } else + throw e; + } + return new Response(); + }; + delete = async (req, params, url) => { + let key = decodeKey(params, url.searchParams); + return validateKey(key), await this.storage.delete(key), new Response(); + }; + list = async (req, params, url) => { + let options = decodeListOptions(url); + validateListOptions(options); + let res = await this.storage.list(options), keys = res.keys.map((key) => ({ + name: key.key, + expiration: maybeApply(millisToSeconds, key.expiration), + // workerd expects metadata to be a JSON-serialised string + metadata: maybeApply(JSON.stringify, key.metadata) + })), result; + return res.cursor === void 0 ? result = { keys, list_complete: !0, cacheStatus: null } : result = { + keys, + list_complete: !1, + cursor: res.cursor, + cacheStatus: null + }, Response.json(result); + }; +}; +__decorateClass([ + GET("/:key"), + POST("/bulk/get") +], KVNamespaceObject.prototype, "get", 2), __decorateClass([ + PUT("/:key") +], KVNamespaceObject.prototype, "put", 2), __decorateClass([ + DELETE("/:key") +], KVNamespaceObject.prototype, "delete", 2), __decorateClass([ + GET("/") +], KVNamespaceObject.prototype, "list", 2); +export { + KVNamespaceObject +}; +//# sourceMappingURL=namespace.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/kv/namespace.worker.js.map b/node_modules/miniflare/dist/src/workers/kv/namespace.worker.js.map new file mode 100644 index 0000000..c558ab5 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/kv/namespace.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../src/workers/kv/namespace.worker.ts", "../../../../src/workers/kv/constants.ts", "../../../../src/workers/kv/validator.worker.ts"], + "mappings": ";;;;;;;;;AAAA,OAAO,YAAY;AACnB;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA,aAAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEM;;;ACbP,SAAyB,mBAAmB;AAErC,IAAM,WAAW;AAAA,EACvB,eAAe;AAAA,EACf,eAAe;AAAA,EACf,cAAc;AAAA,EACd,gBAAgB,KAAK,OAAO;AAAA,EAC5B,qBAAqB;AAAA,EACrB,mBAAmB;AAAA,EACnB,eAAe,KAAK,OAAO;AAC5B,GAEa,WAAW;AAAA,EACvB,aAAa;AAAA,EACb,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,gBAAgB;AAAA,EAChB,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,aAAa;AACd,GAEa,YAAY;AAAA,EACxB,YAAY;AAAA,EACZ,UAAU;AACX;AAYO,IAAM,oBAAoB;;;ACrCjC,SAAS,UAAAC,eAAc;AACvB,SAAS,iBAAiB;AAGnB,SAAS,UAAU,EAAE,IAAI,GAAoB,OAAwB;AAC3E,MAAI,MAAM,IAAI,SAAS,WAAW,GAAG,YA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AAA,MACV,YAAY,WAAW,iBAAiB,IAAI,UAAU;AAAA;AAAA,MAEtD,UAAU,WAAW,KAAK,WAAW,IAAI,QAAQ;AAAA,IAClD,EAAE,GACE;AACJ,WAAI,IAAI,WAAW,SAClB,SAAS,EAAE,MAAM,eAAe,IAAM,aAAa,KAAK,IAExD,SAAS;AAAA,MACR;AAAA,MACA,eAAe;AAAA,MACf,QAAQ,IAAI;AAAA,MACZ,aAAa;AAAA,IACd,GAEM,SAAS,KAAK,MAAM;AAAA,EAC5B;AACD;AA/LC;AAAA,EAFC,IAAI,OAAO;AAAA,EACX,KAAK,WAAW;AAAA,GARL,kBASZ,sBA0EA;AAAA,EADC,IAAI,OAAO;AAAA,GAlFA,kBAmFZ,sBAgFA;AAAA,EADC,OAAO,OAAO;AAAA,GAlKH,kBAmKZ,yBAWA;AAAA,EADC,IAAI,GAAG;AAAA,GA7KI,kBA8KZ;", + "names": ["HttpError", "Buffer", "Buffer", "HttpError", "key", "entry"] +} diff --git a/node_modules/miniflare/dist/src/workers/kv/sites.worker.js b/node_modules/miniflare/dist/src/workers/kv/sites.worker.js new file mode 100644 index 0000000..e64bf44 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/kv/sites.worker.js @@ -0,0 +1,145 @@ +// src/workers/kv/sites.worker.ts +import { base64Decode, base64Encode, SharedBindings } from "miniflare:shared"; + +// src/workers/kv/constants.ts +import { testRegExps } from "miniflare:shared"; +var KVLimits = { + MIN_CACHE_TTL: 60, + MAX_LIST_KEYS: 1e3, + MAX_KEY_SIZE: 512, + MAX_VALUE_SIZE: 25 * 1024 * 1024, + MAX_VALUE_SIZE_TEST: 1024, + MAX_METADATA_SIZE: 1024, + MAX_BULK_SIZE: 25 * 1024 * 1024 +}, KVParams = { + URL_ENCODED: "urlencoded", + CACHE_TTL: "cache_ttl", + EXPIRATION: "expiration", + EXPIRATION_TTL: "expiration_ttl", + LIST_LIMIT: "key_count_limit", + LIST_PREFIX: "prefix", + LIST_CURSOR: "cursor" +}; +var SiteBindings = { + KV_NAMESPACE_SITE: "__STATIC_CONTENT", + JSON_SITE_MANIFEST: "__STATIC_CONTENT_MANIFEST", + JSON_SITE_FILTER: "MINIFLARE_SITE_FILTER" +}, SITES_NO_CACHE_PREFIX = "$__MINIFLARE_SITES__$/"; +function encodeSitesKey(key) { + return SITES_NO_CACHE_PREFIX + encodeURIComponent(key); +} +function decodeSitesKey(key) { + return key.startsWith(SITES_NO_CACHE_PREFIX) ? decodeURIComponent(key.substring(SITES_NO_CACHE_PREFIX.length)) : key; +} +function deserialiseRegExps(matcher) { + return { + include: matcher.include.map((regExp) => new RegExp(regExp)), + exclude: matcher.exclude.map((regExp) => new RegExp(regExp)) + }; +} +function deserialiseSiteRegExps(siteRegExps) { + return { + include: siteRegExps.include && deserialiseRegExps(siteRegExps.include), + exclude: siteRegExps.exclude && deserialiseRegExps(siteRegExps.exclude) + }; +} +function testSiteRegExps(regExps, key) { + return regExps.include !== void 0 ? testRegExps(regExps.include, key) : regExps.exclude !== void 0 ? !testRegExps(regExps.exclude, key) : !0; +} + +// src/workers/kv/validator.worker.ts +import { Buffer } from "node:buffer"; +import { HttpError } from "miniflare:shared"; +function validateKeyLength(key) { + let keyLength = Buffer.byteLength(key); + if (keyLength > KVLimits.MAX_KEY_SIZE) + throw new HttpError( + 414, + `UTF-8 encoded length of ${keyLength} exceeds key length limit of ${KVLimits.MAX_KEY_SIZE}.` + ); +} +function decodeListOptions(url) { + let limitParam = url.searchParams.get(KVParams.LIST_LIMIT), limit = limitParam === null ? KVLimits.MAX_LIST_KEYS : parseInt(limitParam), prefix = url.searchParams.get(KVParams.LIST_PREFIX) ?? void 0, cursor = url.searchParams.get(KVParams.LIST_CURSOR) ?? void 0; + return { limit, prefix, cursor }; +} +function validateListOptions(options) { + let limit = options.limit; + if (limit !== void 0) { + if (isNaN(limit) || limit < 1) + throw new HttpError( + 400, + `Invalid ${KVParams.LIST_LIMIT} of ${limit}. Please specify an integer greater than 0.` + ); + if (limit > KVLimits.MAX_LIST_KEYS) + throw new HttpError( + 400, + `Invalid ${KVParams.LIST_LIMIT} of ${limit}. Please specify an integer less than ${KVLimits.MAX_LIST_KEYS}.` + ); + } + let prefix = options.prefix; + prefix != null && validateKeyLength(prefix); +} + +// src/workers/kv/sites.worker.ts +var siteRegExpsCache = /* @__PURE__ */ new WeakMap(); +function getSiteRegExps(env) { + let regExps = siteRegExpsCache.get(env); + return regExps !== void 0 || (regExps = deserialiseSiteRegExps(env[SiteBindings.JSON_SITE_FILTER]), siteRegExpsCache.set(env, regExps)), regExps; +} +async function* walkDirectory(blobsService, path = "") { + let res = await blobsService.fetch(`http://placeholder/${path}`); + if (!(res.headers.get("Content-Type") ?? "").toLowerCase().startsWith("application/json")) { + await res.body?.pipeTo(new WritableStream()), yield path; + return; + } + let entries = await res.json(); + for (let { name, type } of entries) { + let entryPath = `${path}${path === "" ? "" : "/"}${name}`; + type === "directory" ? yield* walkDirectory(blobsService, entryPath) : yield entryPath; + } +} +var encoder = new TextEncoder(); +function arrayCompare(a, b) { + let minLength = Math.min(a.length, b.length); + for (let i = 0; i < minLength; i++) { + let aElement = a[i], bElement = b[i]; + if (aElement < bElement) return -1; + if (aElement > bElement) return 1; + } + return a.length - b.length; +} +async function handleListRequest(url, blobsService, siteRegExps) { + let options = decodeListOptions(url); + validateListOptions(options); + let { limit = KVLimits.MAX_LIST_KEYS, prefix, cursor } = options, keys = []; + for await (let name of walkDirectory(blobsService)) + testSiteRegExps(siteRegExps, name) && (name = encodeSitesKey(name), !(prefix !== void 0 && !name.startsWith(prefix)) && keys.push({ name, encodedName: encoder.encode(name) })); + keys.sort((a, b) => arrayCompare(a.encodedName, b.encodedName)); + for (let key of keys) delete key.encodedName; + let startAfter = cursor === void 0 ? "" : base64Decode(cursor), startIndex = 0; + startAfter !== "" && (startIndex = keys.findIndex(({ name }) => name === startAfter), startIndex === -1 && (startIndex = keys.length), startIndex++); + let endIndex = startIndex + limit, nextCursor = endIndex < keys.length ? base64Encode(keys[endIndex - 1].name) : void 0; + return keys = keys.slice(startIndex, endIndex), nextCursor === void 0 ? Response.json({ keys, list_complete: !0 }) : Response.json({ keys, list_complete: !1, cursor: nextCursor }); +} +var sites_worker_default = { + async fetch(request, env) { + if (request.method !== "GET") { + let message = `Cannot ${request.method.toLowerCase()}() with Workers Sites namespace`; + return new Response(message, { status: 405, statusText: message }); + } + let url = new URL(request.url), key = url.pathname.substring(1); + url.searchParams.get(KVParams.URL_ENCODED)?.toLowerCase() === "true" && (key = decodeURIComponent(key)), key = decodeSitesKey(key); + let siteRegExps = getSiteRegExps(env); + if (key !== "" && !testSiteRegExps(siteRegExps, key)) + return new Response("Not Found", { + status: 404, + statusText: "Not Found" + }); + let blobsService = env[SharedBindings.MAYBE_SERVICE_BLOBS]; + return key === "" ? handleListRequest(url, blobsService, siteRegExps) : blobsService.fetch(new URL(key, "http://placeholder")); + } +}; +export { + sites_worker_default as default +}; +//# sourceMappingURL=sites.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/kv/sites.worker.js.map b/node_modules/miniflare/dist/src/workers/kv/sites.worker.js.map new file mode 100644 index 0000000..1b14fb5 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/kv/sites.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../src/workers/kv/sites.worker.ts", "../../../../src/workers/kv/constants.ts", "../../../../src/workers/kv/validator.worker.ts"], + "mappings": ";AAAA,SAAS,cAAc,cAAc,sBAAsB;;;ACA3D,SAAyB,mBAAmB;AAErC,IAAM,WAAW;AAAA,EACvB,eAAe;AAAA,EACf,eAAe;AAAA,EACf,cAAc;AAAA,EACd,gBAAgB,KAAK,OAAO;AAAA,EAC5B,qBAAqB;AAAA,EACrB,mBAAmB;AAAA,EACnB,eAAe,KAAK,OAAO;AAC5B,GAEa,WAAW;AAAA,EACvB,aAAa;AAAA,EACb,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,gBAAgB;AAAA,EAChB,YAAY;AAAA,EACZ,a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;AAAA,EACpC,MAAM,MAAM,SAAS,KAAK;AAEzB,QAAI,QAAQ,WAAW,OAAO;AAC7B,UAAM,UAAU,UAAU,QAAQ,OAAO,YAAY,CAAC;AACtD,aAAO,IAAI,SAAS,SAAS,EAAE,QAAQ,KAAK,YAAY,QAAQ,CAAC;AAAA,IAClE;AAGA,QAAM,MAAM,IAAI,IAAI,QAAQ,GAAG,GAC3B,MAAM,IAAI,SAAS,UAAU,CAAC;AAClC,IAAI,IAAI,aAAa,IAAI,SAAS,WAAW,GAAG,YAAY,MAAM,WACjE,MAAM,mBAAmB,GAAG,IAI7B,MAAM,eAAe,GAAG;AAGxB,QAAM,cAAc,eAAe,GAAG;AACtC,QAAI,QAAQ,MAAM,CAAC,gBAAgB,aAAa,GAAG;AAClD,aAAO,IAAI,SAAS,aAAa;AAAA,QAChC,QAAQ;AAAA,QACR,YAAY;AAAA,MACb,CAAC;AAGF,QAAM,eAAe,IAAI,eAAe,mBAAmB;AAC3D,WAAI,QAAQ,KACJ,kBAAkB,KAAK,cAAc,WAAW,IAEhD,aAAa,MAAM,IAAI,IAAI,KAAK,oBAAoB,CAAC;AAAA,EAE9D;AACD;", + "names": [] +} diff --git a/node_modules/miniflare/dist/src/workers/pipelines/pipeline.worker.js b/node_modules/miniflare/dist/src/workers/pipelines/pipeline.worker.js new file mode 100644 index 0000000..ded30e4 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/pipelines/pipeline.worker.js @@ -0,0 +1,11 @@ +// src/workers/pipelines/pipeline.worker.ts +import { WorkerEntrypoint } from "cloudflare:workers"; +var Pipeline = class extends WorkerEntrypoint { + async send(data) { + console.log("Request received", data); + } +}; +export { + Pipeline as default +}; +//# sourceMappingURL=pipeline.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/pipelines/pipeline.worker.js.map b/node_modules/miniflare/dist/src/workers/pipelines/pipeline.worker.js.map new file mode 100644 index 0000000..8f0e995 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/pipelines/pipeline.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../src/workers/pipelines/pipeline.worker.ts"], + "mappings": ";AAAA,SAAS,wBAAwB;AAEjC,IAAqB,WAArB,cAAsC,iBAAiB;AAAA,EACtD,MAAM,KAAK,MAA+B;AACzC,YAAQ,IAAI,oBAAoB,IAAI;AAAA,EACrC;AACD;", + "names": [] +} diff --git a/node_modules/miniflare/dist/src/workers/queues/broker.worker.js b/node_modules/miniflare/dist/src/workers/queues/broker.worker.js new file mode 100644 index 0000000..104fad2 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/queues/broker.worker.js @@ -0,0 +1,289 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __decorateClass = (decorators, target, key, kind) => { + for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--) + (decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result); + return kind && result && __defProp(target, key, result), result; +}; + +// src/workers/queues/broker.worker.ts +import assert from "node:assert"; +import { Buffer as Buffer2 } from "node:buffer"; + +// ../../node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/colors.mjs +var FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM, isTTY = !0; +typeof process < "u" && ({ FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM } = process.env || {}, isTTY = process.stdout && process.stdout.isTTY); +var $ = { + enabled: !NODE_DISABLE_COLORS && NO_COLOR == null && TERM !== "dumb" && (FORCE_COLOR != null && FORCE_COLOR !== "0" || isTTY) +}; +function init(x, y) { + let rgx = new RegExp(`\\x1b\\[${y}m`, "g"), open = `\x1B[${x}m`, close = `\x1B[${y}m`; + return function(txt) { + return !$.enabled || txt == null ? txt : open + (~("" + txt).indexOf(close) ? txt.replace(rgx, close + open) : txt) + close; + }; +} +var reset = init(0, 0), bold = init(1, 22), dim = init(2, 22), italic = init(3, 23), underline = init(4, 24), inverse = init(7, 27), hidden = init(8, 28), strikethrough = init(9, 29), black = init(30, 39), red = init(31, 39), green = init(32, 39), yellow = init(33, 39), blue = init(34, 39), magenta = init(35, 39), cyan = init(36, 39), white = init(37, 39), gray = init(90, 39), grey = init(90, 39), bgBlack = init(40, 49), bgRed = init(41, 49), bgGreen = init(42, 49), bgYellow = init(43, 49), bgBlue = init(44, 49), bgMagenta = init(45, 49), bgCyan = init(46, 49), bgWhite = init(47, 49); + +// src/workers/queues/broker.worker.ts +import { + HttpError, + LogLevel, + MiniflareDurableObject, + POST, + SharedBindings, + viewToBuffer +} from "miniflare:shared"; + +// src/workers/queues/constants.ts +var QueueBindings = { + SERVICE_WORKER_PREFIX: "MINIFLARE_WORKER_", + MAYBE_JSON_QUEUE_PRODUCERS: "MINIFLARE_QUEUE_PRODUCERS", + MAYBE_JSON_QUEUE_CONSUMERS: "MINIFLARE_QUEUE_CONSUMERS" +}; + +// src/workers/queues/schemas.ts +import { Base64DataSchema, z } from "miniflare:zod"; +var QueueMessageDelaySchema = z.number().int().min(0).max(43200).optional(), QueueProducerOptionsSchema = /* @__PURE__ */ z.object({ + // https://developers.cloudflare.com/queues/platform/configuration/#producer + queueName: z.string(), + deliveryDelay: QueueMessageDelaySchema +}), QueueProducerSchema = /* @__PURE__ */ z.intersection( + QueueProducerOptionsSchema, + z.object({ workerName: z.string() }) +), QueueProducersSchema = /* @__PURE__ */ z.record(QueueProducerSchema), QueueConsumerOptionsSchema = /* @__PURE__ */ z.object({ + // https://developers.cloudflare.com/queues/platform/configuration/#consumer + // https://developers.cloudflare.com/queues/platform/limits/ + maxBatchSize: z.number().min(0).max(100).optional(), + maxBatchTimeout: z.number().min(0).max(60).optional(), + // seconds + maxRetires: z.number().min(0).max(100).optional(), + // deprecated + maxRetries: z.number().min(0).max(100).optional(), + deadLetterQueue: z.ostring(), + retryDelay: QueueMessageDelaySchema +}).transform((queue) => (queue.maxRetires !== void 0 && (queue.maxRetries = queue.maxRetires), queue)), QueueConsumerSchema = /* @__PURE__ */ z.intersection( + QueueConsumerOptionsSchema, + z.object({ workerName: z.string() }) +), QueueConsumersSchema = /* @__PURE__ */ z.record(QueueConsumerSchema), QueueContentTypeSchema = /* @__PURE__ */ z.enum(["text", "json", "bytes", "v8"]).default("v8"), QueueIncomingMessageSchema = /* @__PURE__ */ z.object({ + contentType: QueueContentTypeSchema, + delaySecs: QueueMessageDelaySchema, + body: Base64DataSchema, + // When enqueuing messages on dead-letter queues, we want to reuse the same ID + // and timestamp + id: z.ostring(), + timestamp: z.onumber() +}), QueuesBatchRequestSchema = /* @__PURE__ */ z.object({ + messages: z.array(QueueIncomingMessageSchema) +}); + +// src/workers/queues/broker.worker.ts +var MAX_MESSAGE_SIZE_BYTES = 128 * 1e3, MAX_MESSAGE_BATCH_COUNT = 100, MAX_MESSAGE_BATCH_SIZE = 288 * 1e3, DEFAULT_BATCH_SIZE = 5, DEFAULT_BATCH_TIMEOUT = 1, DEFAULT_RETRIES = 2, exceptionQueueResponse = { + outcome: "exception", + retryBatch: { retry: !1 }, + ackAll: !1, + retryMessages: [], + explicitAcks: [] +}, PayloadTooLargeError = class extends HttpError { + constructor(message) { + super(413, message); + } +}; +function validateMessageSize(headers) { + let size = headers.get("Content-Length"); + if (size !== null && parseInt(size) > MAX_MESSAGE_SIZE_BYTES) + throw new PayloadTooLargeError( + `message length of ${size} bytes exceeds limit of ${MAX_MESSAGE_SIZE_BYTES}` + ); +} +function validateContentType(headers) { + let format = headers.get("X-Msg-Fmt") ?? void 0, result = QueueContentTypeSchema.safeParse(format); + if (!result.success) + throw new HttpError( + 400, + `message content type ${format} is invalid; if specified, must be one of 'text', 'json', 'bytes', or 'v8'` + ); + return result.data; +} +function validateMessageDelay(headers) { + let format = headers.get("X-Msg-Delay-Secs"); + if (!format) return; + let result = QueueMessageDelaySchema.safeParse(Number(format)); + if (!result.success) + throw new HttpError( + 400, + `message delay ${format} is invalid: ${result.error}` + ); + return result.data; +} +function validateBatchSize(headers) { + let count = headers.get("CF-Queue-Batch-Count"); + if (count !== null && parseInt(count) > MAX_MESSAGE_BATCH_COUNT) + throw new PayloadTooLargeError( + `batch message count of ${count} exceeds limit of ${MAX_MESSAGE_BATCH_COUNT}` + ); + let largestSize = headers.get("CF-Queue-Largest-Msg"); + if (largestSize !== null && parseInt(largestSize) > MAX_MESSAGE_SIZE_BYTES) + throw new PayloadTooLargeError( + `message in batch has length ${largestSize} bytes which exceeds single message size limit of ${MAX_MESSAGE_SIZE_BYTES}` + ); + let batchSize = headers.get("CF-Queue-Batch-Bytes"); + if (batchSize !== null && parseInt(batchSize) > MAX_MESSAGE_BATCH_SIZE) + throw new PayloadTooLargeError( + `batch size of ${batchSize} bytes exceeds limit of 256000` + ); +} +function deserialise({ contentType, body }) { + return contentType === "text" ? { contentType, body: body.toString() } : contentType === "json" ? { contentType, body: JSON.parse(body.toString()) } : contentType === "bytes" ? { contentType, body: viewToBuffer(body) } : { contentType, body }; +} +function serialise(msg) { + let body; + return msg.body.contentType === "text" ? body = Buffer2.from(msg.body.body) : msg.body.contentType === "json" ? body = Buffer2.from(JSON.stringify(msg.body.body)) : msg.body.contentType === "bytes" ? body = Buffer2.from(msg.body.body) : body = msg.body.body, { + id: msg.id, + timestamp: msg.timestamp.getTime(), + contentType: msg.body.contentType, + body: body.toString("base64") + }; +} +var QueueMessage = class { + constructor(id, timestamp, body) { + this.id = id; + this.timestamp = timestamp; + this.body = body; + } + #failedAttempts = 0; + incrementFailedAttempts() { + return ++this.#failedAttempts; + } + get failedAttempts() { + return this.#failedAttempts; + } +}; +function formatQueueResponse(queueName, acked, total, time) { + let colour; + acked === total ? colour = green : acked > 0 ? colour = yellow : colour = red; + let message = `${bold("QUEUE")} ${queueName} ${colour(`${acked}/${total}`)}`; + return time !== void 0 && (message += grey(` (${time}ms)`)), reset(message); +} +var QueueBrokerObject = class extends MiniflareDurableObject { + #producers; + #consumers; + #messages = []; + #pendingFlush; + constructor(state, env) { + super(state, env); + let maybeProducers = env[QueueBindings.MAYBE_JSON_QUEUE_PRODUCERS]; + maybeProducers === void 0 ? this.#producers = {} : this.#producers = QueueProducersSchema.parse(maybeProducers); + let maybeConsumers = env[QueueBindings.MAYBE_JSON_QUEUE_CONSUMERS]; + maybeConsumers === void 0 ? this.#consumers = {} : this.#consumers = QueueConsumersSchema.parse(maybeConsumers); + } + get #maybeProducer() { + return Object.values(this.#producers).find( + (p) => p?.queueName === this.name + ); + } + get #maybeConsumer() { + return this.#consumers[this.name]; + } + #dispatchBatch(workerName, batch) { + let bindingName = `${QueueBindings.SERVICE_WORKER_PREFIX}${workerName}`, maybeService = this.env[bindingName]; + assert( + maybeService !== void 0, + `Expected ${bindingName} service binding` + ); + let messages = batch.map(({ id, timestamp, body, failedAttempts }) => { + let attempts = failedAttempts + 1; + return body.contentType === "v8" ? { id, timestamp, serializedBody: body.body, attempts } : { id, timestamp, body: body.body, attempts }; + }); + return maybeService.queue(this.name, messages); + } + #flush = async () => { + let consumer = this.#maybeConsumer; + assert(consumer !== void 0); + let batchSize = consumer.maxBatchSize ?? DEFAULT_BATCH_SIZE, maxAttempts = (consumer.maxRetries ?? DEFAULT_RETRIES) + 1, maxAttemptsS = maxAttempts === 1 ? "" : "s", batch = this.#messages.splice(0, batchSize), startTime = Date.now(), endTime, response; + try { + response = await this.#dispatchBatch(consumer.workerName, batch), endTime = Date.now(); + } catch (e) { + endTime = Date.now(), await this.logWithLevel(LogLevel.ERROR, String(e)), response = exceptionQueueResponse; + } + let retryAll = response.retryBatch.retry || response.outcome !== "ok", retryMessages = new Map( + response.retryMessages?.map((r) => [r.msgId, r.delaySeconds]) + ), globalDelay = response.retryBatch.delaySeconds ?? consumer.retryDelay ?? 0, failedMessages = 0, toDeadLetterQueue = []; + for (let message of batch) + if (retryAll || retryMessages.has(message.id)) + if (failedMessages++, message.incrementFailedAttempts() < maxAttempts) { + await this.logWithLevel( + LogLevel.DEBUG, + `Retrying message "${message.id}" on queue "${this.name}"...` + ); + let fn = () => { + this.#messages.push(message), this.#ensurePendingFlush(); + }, delay = retryMessages.get(message.id) ?? globalDelay; + this.timers.setTimeout(fn, delay * 1e3); + } else consumer.deadLetterQueue !== void 0 ? (await this.logWithLevel( + LogLevel.WARN, + `Moving message "${message.id}" on queue "${this.name}" to dead letter queue "${consumer.deadLetterQueue}" after ${maxAttempts} failed attempt${maxAttemptsS}...` + ), toDeadLetterQueue.push(message)) : await this.logWithLevel( + LogLevel.WARN, + `Dropped message "${message.id}" on queue "${this.name}" after ${maxAttempts} failed attempt${maxAttemptsS}!` + ); + let acked = batch.length - failedMessages; + if (await this.logWithLevel( + LogLevel.INFO, + formatQueueResponse(this.name, acked, batch.length, endTime - startTime) + ), this.#pendingFlush = void 0, this.#messages.length > 0 && this.#ensurePendingFlush(), toDeadLetterQueue.length > 0) { + let name = consumer.deadLetterQueue; + assert(name !== void 0); + let ns = this.env[SharedBindings.DURABLE_OBJECT_NAMESPACE_OBJECT], id = ns.idFromName(name), stub = ns.get(id), cf = { miniflare: { name } }, batchRequest = { + messages: toDeadLetterQueue.map(serialise) + }, res = await stub.fetch("http://placeholder/batch", { + method: "POST", + body: JSON.stringify(batchRequest), + cf + }); + assert(res.ok); + } + }; + #ensurePendingFlush() { + let consumer = this.#maybeConsumer; + assert(consumer !== void 0); + let batchSize = consumer.maxBatchSize ?? DEFAULT_BATCH_SIZE, batchTimeout = consumer.maxBatchTimeout ?? DEFAULT_BATCH_TIMEOUT, batchHasSpace = this.#messages.length < batchSize; + if (this.#pendingFlush !== void 0) { + if (this.#pendingFlush.immediate || batchHasSpace) return; + this.timers.clearTimeout(this.#pendingFlush.timeout), this.#pendingFlush = void 0; + } + let delay = batchHasSpace ? batchTimeout * 1e3 : 0, timeout = this.timers.setTimeout(this.#flush, delay); + this.#pendingFlush = { immediate: delay === 0, timeout }; + } + #enqueue(messages, globalDelay = 0) { + for (let message of messages) { + let randomness = crypto.getRandomValues(new Uint8Array(16)), id = message.id ?? Buffer2.from(randomness).toString("hex"), timestamp = new Date(message.timestamp ?? this.timers.now()), body = deserialise(message), msg = new QueueMessage(id, timestamp, body), fn = () => { + this.#messages.push(msg), this.#ensurePendingFlush(); + }, delay = message.delaySecs ?? globalDelay; + this.timers.setTimeout(fn, delay * 1e3); + } + } + message = async (req) => { + if (this.#maybeConsumer === void 0) return new Response(); + validateMessageSize(req.headers); + let contentType = validateContentType(req.headers), delay = validateMessageDelay(req.headers) ?? this.#maybeProducer?.deliveryDelay, body = Buffer2.from(await req.arrayBuffer()); + return this.#enqueue( + [{ contentType, delaySecs: delay, body }], + this.#maybeProducer?.deliveryDelay + ), new Response(); + }; + batch = async (req) => { + if (this.#maybeConsumer === void 0) return new Response(); + validateBatchSize(req.headers); + let delay = validateMessageDelay(req.headers) ?? this.#maybeProducer?.deliveryDelay, body = QueuesBatchRequestSchema.parse(await req.json()); + return this.#enqueue(body.messages, delay), new Response(); + }; +}; +__decorateClass([ + POST("/message") +], QueueBrokerObject.prototype, "message", 2), __decorateClass([ + POST("/batch") +], QueueBrokerObject.prototype, "batch", 2); +export { + QueueBrokerObject +}; +//# sourceMappingURL=broker.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/queues/broker.worker.js.map b/node_modules/miniflare/dist/src/workers/queues/broker.worker.js.map new file mode 100644 index 0000000..6d54e99 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/queues/broker.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../src/workers/queues/broker.worker.ts", "../../../../../../node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/colors.mjs", "../../../../src/workers/queues/constants.ts", "../../../../src/workers/queues/schemas.ts"], + "mappings": ";;;;;;;;;AAAA,OAAO,YAAY;AACnB,SAAS,UAAAA,eAAc;;;ACDvB,IAAI,aAAa,qBAAqB,UAAU,MAAM,QAAM;AACxD,OAAO,UAAY,QACrB,EAAE,aAAa,qBAAqB,UAAU,KAAK,IAAI,QAAQ,OAAO,CAAC,GACxE,QAAQ,QAAQ,UAA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AO,KAAK,MAAM,IAAI,YAAY,CAAC;AAEhD,gBAAK;AAAA,MACJ,CAAC,EAAE,aAAa,WAAW,OAAO,KAAK,CAAC;AAAA,MACxC,KAAK,gBAAgB;AAAA,IACtB,GACO,IAAI,SAAS;AAAA,EACrB;AAAA,EAGA,QAAsB,OAAO,QAAQ;AAGpC,QADiB,KAAK,mBACL,OAAW,QAAO,IAAI,SAAS;AAMhD,sBAAkB,IAAI,OAAO;AAC7B,QAAM,QACL,qBAAqB,IAAI,OAAO,KAAK,KAAK,gBAAgB,eACrD,OAAO,yBAAyB,MAAM,MAAM,IAAI,KAAK,CAAC;AAE5D,gBAAK,SAAS,KAAK,UAAU,KAAK,GAC3B,IAAI,SAAS;AAAA,EACrB;AACD;AApCC;AAAA,EADC,KAAK,UAAU;AAAA,GAtLJ,kBAuLZ,0BAmBA;AAAA,EADC,KAAK,QAAQ;AAAA,GAzMF,kBA0MZ;", + "names": ["Buffer", "Buffer"] +} diff --git a/node_modules/miniflare/dist/src/workers/r2/bucket.worker.js b/node_modules/miniflare/dist/src/workers/r2/bucket.worker.js new file mode 100644 index 0000000..6a48392 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/r2/bucket.worker.js @@ -0,0 +1,1134 @@ +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __decorateClass = (decorators, target, key, kind) => { + for (var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target, i = decorators.length - 1, decorator; i >= 0; i--) + (decorator = decorators[i]) && (result = (kind ? decorator(target, key, result) : decorator(result)) || result); + return kind && result && __defProp(target, key, result), result; +}; + +// src/workers/r2/bucket.worker.ts +import assert2 from "node:assert"; +import { Buffer as Buffer3 } from "node:buffer"; +import { createHash } from "node:crypto"; +import { + all, + base64Decode, + base64Encode, + DeferredPromise, + GET, + get, + maybeApply, + MiniflareDurableObject, + PUT, + readPrefix, + WaitGroup +} from "miniflare:shared"; + +// src/workers/r2/constants.ts +var R2Limits = { + MAX_LIST_KEYS: 1e3, + MAX_KEY_SIZE: 1024, + // https://developers.cloudflare.com/r2/platform/limits/ + MAX_VALUE_SIZE: 5363466240, + // 5 GiB - 5 MiB + MAX_METADATA_SIZE: 2048, + // 2048 B + MIN_MULTIPART_PART_SIZE: 5242880, + MIN_MULTIPART_PART_SIZE_TEST: 50 +}, R2Headers = { + ERROR: "cf-r2-error", + REQUEST: "cf-r2-request", + METADATA_SIZE: "cf-r2-metadata-size" +}; + +// src/workers/r2/errors.worker.ts +import { HttpError } from "miniflare:shared"; +var R2ErrorCode = { + INTERNAL_ERROR: 10001, + NO_SUCH_OBJECT_KEY: 10007, + ENTITY_TOO_LARGE: 100100, + ENTITY_TOO_SMALL: 10011, + METADATA_TOO_LARGE: 10012, + INVALID_OBJECT_NAME: 10020, + INVALID_MAX_KEYS: 10022, + NO_SUCH_UPLOAD: 10024, + INVALID_PART: 10025, + INVALID_ARGUMENT: 10029, + PRECONDITION_FAILED: 10031, + BAD_DIGEST: 10037, + INVALID_RANGE: 10039, + BAD_UPLOAD: 10048 +}, R2Error = class extends HttpError { + constructor(code, message, v4Code) { + super(code, message); + this.v4Code = v4Code; + } + object; + toResponse() { + if (this.object !== void 0) { + let { metadataSize, value } = this.object.encode(); + return new Response(value, { + status: this.code, + headers: { + [R2Headers.METADATA_SIZE]: `${metadataSize}`, + "Content-Type": "application/json", + [R2Headers.ERROR]: JSON.stringify({ + message: this.message, + version: 1, + // Note the lowercase 'c', which the runtime expects + v4code: this.v4Code + }) + } + }); + } + return new Response(null, { + status: this.code, + headers: { + [R2Headers.ERROR]: JSON.stringify({ + message: this.message, + version: 1, + // Note the lowercase 'c', which the runtime expects + v4code: this.v4Code + }) + } + }); + } + context(info) { + return this.message += ` (${info})`, this; + } + attach(object) { + return this.object = object, this; + } +}, InvalidMetadata = class extends R2Error { + constructor() { + super(400, "Metadata missing or invalid", R2ErrorCode.INVALID_ARGUMENT); + } +}, InternalError = class extends R2Error { + constructor() { + super( + 500, + "We encountered an internal error. Please try again.", + R2ErrorCode.INTERNAL_ERROR + ); + } +}, NoSuchKey = class extends R2Error { + constructor() { + super( + 404, + "The specified key does not exist.", + R2ErrorCode.NO_SUCH_OBJECT_KEY + ); + } +}, EntityTooLarge = class extends R2Error { + constructor() { + super( + 400, + "Your proposed upload exceeds the maximum allowed object size.", + R2ErrorCode.ENTITY_TOO_LARGE + ); + } +}, EntityTooSmall = class extends R2Error { + constructor() { + super( + 400, + "Your proposed upload is smaller than the minimum allowed object size.", + R2ErrorCode.ENTITY_TOO_SMALL + ); + } +}, MetadataTooLarge = class extends R2Error { + constructor() { + super( + 400, + "Your metadata headers exceed the maximum allowed metadata size.", + R2ErrorCode.METADATA_TOO_LARGE + ); + } +}, BadDigest = class extends R2Error { + constructor(algorithm, provided, calculated) { + super( + 400, + [ + `The ${algorithm} checksum you specified did not match what we received.`, + `You provided a ${algorithm} checksum with value: ${provided.toString( + "hex" + )}`, + `Actual ${algorithm} was: ${calculated.toString("hex")}` + ].join(` +`), + R2ErrorCode.BAD_DIGEST + ); + } +}, InvalidObjectName = class extends R2Error { + constructor() { + super( + 400, + "The specified object name is not valid.", + R2ErrorCode.INVALID_OBJECT_NAME + ); + } +}, InvalidMaxKeys = class extends R2Error { + constructor() { + super( + 400, + "MaxKeys params must be positive integer <= 1000.", + R2ErrorCode.INVALID_MAX_KEYS + ); + } +}, NoSuchUpload = class extends R2Error { + constructor() { + super( + 400, + "The specified multipart upload does not exist.", + R2ErrorCode.NO_SUCH_UPLOAD + ); + } +}, InvalidPart = class extends R2Error { + constructor() { + super( + 400, + "One or more of the specified parts could not be found.", + R2ErrorCode.INVALID_PART + ); + } +}, PreconditionFailed = class extends R2Error { + constructor() { + super( + 412, + "At least one of the pre-conditions you specified did not hold.", + R2ErrorCode.PRECONDITION_FAILED + ); + } +}, InvalidRange = class extends R2Error { + constructor() { + super( + 416, + "The requested range is not satisfiable", + R2ErrorCode.INVALID_RANGE + ); + } +}, BadUpload = class extends R2Error { + constructor() { + super( + 500, + "There was a problem with the multipart upload.", + R2ErrorCode.BAD_UPLOAD + ); + } +}; + +// src/workers/r2/r2Object.worker.ts +import { HEX_REGEXP } from "miniflare:zod"; +var InternalR2Object = class { + key; + version; + size; + etag; + uploaded; + httpMetadata; + customMetadata; + range; + checksums; + constructor(row, range) { + this.key = row.key, this.version = row.version, this.size = row.size, this.etag = row.etag, this.uploaded = row.uploaded, this.httpMetadata = JSON.parse(row.http_metadata), this.customMetadata = JSON.parse(row.custom_metadata), this.range = range; + let checksums = JSON.parse(row.checksums); + this.etag.length === 32 && HEX_REGEXP.test(this.etag) && (checksums.md5 = row.etag), this.checksums = checksums; + } + // Format for return to the Workers Runtime + #rawProperties() { + return { + name: this.key, + version: this.version, + size: this.size, + etag: this.etag, + uploaded: this.uploaded, + httpFields: this.httpMetadata, + customFields: Object.entries(this.customMetadata).map(([k, v]) => ({ + k, + v + })), + range: this.range, + checksums: { + 0: this.checksums.md5, + 1: this.checksums.sha1, + 2: this.checksums.sha256, + 3: this.checksums.sha384, + 4: this.checksums.sha512 + } + }; + } + encode() { + let json = JSON.stringify(this.#rawProperties()), blob = new Blob([json]); + return { metadataSize: blob.size, value: blob.stream(), size: blob.size }; + } + static encodeMultiple(objects) { + let json = JSON.stringify({ + ...objects, + objects: objects.objects.map((o) => o.#rawProperties()) + }), blob = new Blob([json]); + return { metadataSize: blob.size, value: blob.stream(), size: blob.size }; + } +}, InternalR2ObjectBody = class extends InternalR2Object { + constructor(metadata, body, range) { + super(metadata, range); + this.body = body; + } + encode() { + let { metadataSize, value: metadata } = super.encode(), size = this.range?.length ?? this.size, identity2 = new FixedLengthStream(size + metadataSize); + return metadata.pipeTo(identity2.writable, { preventClose: !0 }).then(() => this.body.pipeTo(identity2.writable)), { + metadataSize, + value: identity2.readable, + size + }; + } +}; + +// src/workers/r2/schemas.worker.ts +import { Base64DataSchema, HexDataSchema, z } from "miniflare:zod"; +var MultipartUploadState = { + IN_PROGRESS: 0, + COMPLETED: 1, + ABORTED: 2 +}, SQL_SCHEMA = ` +CREATE TABLE IF NOT EXISTS _mf_objects ( + key TEXT PRIMARY KEY, + blob_id TEXT, + version TEXT NOT NULL, + size INTEGER NOT NULL, + etag TEXT NOT NULL, + uploaded INTEGER NOT NULL, + checksums TEXT NOT NULL, + http_metadata TEXT NOT NULL, + custom_metadata TEXT NOT NULL +); +CREATE TABLE IF NOT EXISTS _mf_multipart_uploads ( + upload_id TEXT PRIMARY KEY, + key TEXT NOT NULL, + http_metadata TEXT NOT NULL, + custom_metadata TEXT NOT NULL, + state TINYINT DEFAULT 0 NOT NULL +); +CREATE TABLE IF NOT EXISTS _mf_multipart_parts ( + upload_id TEXT NOT NULL REFERENCES _mf_multipart_uploads(upload_id), + part_number INTEGER NOT NULL, + blob_id TEXT NOT NULL, + size INTEGER NOT NULL, + etag TEXT NOT NULL, + checksum_md5 TEXT NOT NULL, + object_key TEXT REFERENCES _mf_objects(key) DEFERRABLE INITIALLY DEFERRED, + PRIMARY KEY (upload_id, part_number) +); +`, DateSchema = z.coerce.number().transform((value) => new Date(value)), RecordSchema = z.object({ + k: z.string(), + v: z.string() +}).array().transform( + (entries) => Object.fromEntries(entries.map(({ k, v }) => [k, v])) +), R2RangeSchema = z.object({ + offset: z.coerce.number().optional(), + length: z.coerce.number().optional(), + suffix: z.coerce.number().optional() +}), R2EtagSchema = z.discriminatedUnion("type", [ + z.object({ type: z.literal("strong"), value: z.string() }), + z.object({ type: z.literal("weak"), value: z.string() }), + z.object({ type: z.literal("wildcard") }) +]), R2EtagMatchSchema = R2EtagSchema.array().min(1).optional(), R2ConditionalSchema = z.object({ + // Performs the operation if the object's ETag matches the given string + etagMatches: R2EtagMatchSchema, + // "If-Match" + // Performs the operation if the object's ETag does NOT match the given string + etagDoesNotMatch: R2EtagMatchSchema, + // "If-None-Match" + // Performs the operation if the object was uploaded BEFORE the given date + uploadedBefore: DateSchema.optional(), + // "If-Unmodified-Since" + // Performs the operation if the object was uploaded AFTER the given date + uploadedAfter: DateSchema.optional(), + // "If-Modified-Since" + // Truncates dates to seconds before performing comparisons + secondsGranularity: z.oboolean() +}), R2ChecksumsSchema = z.object({ + 0: HexDataSchema.optional(), + 1: HexDataSchema.optional(), + 2: HexDataSchema.optional(), + 3: HexDataSchema.optional(), + 4: HexDataSchema.optional() +}).transform((checksums) => ({ + md5: checksums[0], + sha1: checksums[1], + sha256: checksums[2], + sha384: checksums[3], + sha512: checksums[4] +})), R2PublishedPartSchema = z.object({ + etag: z.string(), + part: z.number() +}), R2HttpFieldsSchema = z.object({ + contentType: z.ostring(), + contentLanguage: z.ostring(), + contentDisposition: z.ostring(), + contentEncoding: z.ostring(), + cacheControl: z.ostring(), + cacheExpiry: z.coerce.number().optional() +}), R2HeadRequestSchema = z.object({ + method: z.literal("head"), + object: z.string() +}), R2GetRequestSchema = z.object({ + method: z.literal("get"), + object: z.string(), + // Specifies that only a specific length (from an optional offset) or suffix + // of bytes from the object should be returned. Refer to + // https://developers.cloudflare.com/r2/runtime-apis/#ranged-reads. + range: R2RangeSchema.optional(), + rangeHeader: z.ostring(), + // Specifies that the object should only be returned given satisfaction of + // certain conditions in the R2Conditional. Refer to R2Conditional above. + onlyIf: R2ConditionalSchema.optional() +}), R2PutRequestSchema = z.object({ + method: z.literal("put"), + object: z.string(), + customFields: RecordSchema.optional(), + // (renamed in transform) + httpFields: R2HttpFieldsSchema.optional(), + // (renamed in transform) + onlyIf: R2ConditionalSchema.optional(), + md5: Base64DataSchema.optional(), + // (intentionally base64, not hex) + sha1: HexDataSchema.optional(), + sha256: HexDataSchema.optional(), + sha384: HexDataSchema.optional(), + sha512: HexDataSchema.optional() +}).transform((value) => ({ + method: value.method, + object: value.object, + customMetadata: value.customFields, + httpMetadata: value.httpFields, + onlyIf: value.onlyIf, + md5: value.md5, + sha1: value.sha1, + sha256: value.sha256, + sha384: value.sha384, + sha512: value.sha512 +})), R2CreateMultipartUploadRequestSchema = z.object({ + method: z.literal("createMultipartUpload"), + object: z.string(), + customFields: RecordSchema.optional(), + // (renamed in transform) + httpFields: R2HttpFieldsSchema.optional() + // (renamed in transform) +}).transform((value) => ({ + method: value.method, + object: value.object, + customMetadata: value.customFields, + httpMetadata: value.httpFields +})), R2UploadPartRequestSchema = z.object({ + method: z.literal("uploadPart"), + object: z.string(), + uploadId: z.string(), + partNumber: z.number() +}), R2CompleteMultipartUploadRequestSchema = z.object({ + method: z.literal("completeMultipartUpload"), + object: z.string(), + uploadId: z.string(), + parts: R2PublishedPartSchema.array() +}), R2AbortMultipartUploadRequestSchema = z.object({ + method: z.literal("abortMultipartUpload"), + object: z.string(), + uploadId: z.string() +}), R2ListRequestSchema = z.object({ + method: z.literal("list"), + limit: z.onumber(), + prefix: z.ostring(), + cursor: z.ostring(), + delimiter: z.ostring(), + startAfter: z.ostring(), + include: z.union([z.literal(0), z.literal(1)]).transform((value) => value === 0 ? "httpMetadata" : "customMetadata").array().optional() +}), R2DeleteRequestSchema = z.intersection( + z.object({ method: z.literal("delete") }), + z.union([ + z.object({ object: z.string() }), + z.object({ objects: z.string().array() }) + ]) +), R2BindingRequestSchema = z.union([ + R2HeadRequestSchema, + R2GetRequestSchema, + R2PutRequestSchema, + R2CreateMultipartUploadRequestSchema, + R2UploadPartRequestSchema, + R2CompleteMultipartUploadRequestSchema, + R2AbortMultipartUploadRequestSchema, + R2ListRequestSchema, + R2DeleteRequestSchema +]); + +// src/workers/r2/validator.worker.ts +import assert from "node:assert"; +import { Buffer as Buffer2 } from "node:buffer"; +import { parseRanges } from "miniflare:shared"; +function identity(ms) { + return ms; +} +function truncateToSeconds(ms) { + return Math.floor(ms / 1e3) * 1e3; +} +function includesEtag(conditions, etag, comparison) { + for (let condition of conditions) + if (condition.type === "wildcard" || condition.value === etag && (condition.type === "strong" || comparison === "weak")) + return !0; + return !1; +} +function _testR2Conditional(cond, metadata) { + if (metadata === void 0) { + let ifMatch2 = cond.etagMatches === void 0, ifModifiedSince2 = cond.uploadedAfter === void 0; + return ifMatch2 && ifModifiedSince2; + } + let { etag, uploaded: lastModifiedRaw } = metadata, ifMatch = cond.etagMatches === void 0 || includesEtag(cond.etagMatches, etag, "strong"), ifNoneMatch = cond.etagDoesNotMatch === void 0 || !includesEtag(cond.etagDoesNotMatch, etag, "weak"), maybeTruncate = cond.secondsGranularity ? truncateToSeconds : identity, lastModified = maybeTruncate(lastModifiedRaw), ifModifiedSince = cond.uploadedAfter === void 0 || maybeTruncate(cond.uploadedAfter.getTime()) < lastModified || cond.etagDoesNotMatch !== void 0 && ifNoneMatch, ifUnmodifiedSince = cond.uploadedBefore === void 0 || lastModified < maybeTruncate(cond.uploadedBefore.getTime()) || cond.etagMatches !== void 0 && ifMatch; + return ifMatch && ifNoneMatch && ifModifiedSince && ifUnmodifiedSince; +} +var R2_HASH_ALGORITHMS = [ + { name: "MD5", field: "md5" }, + { name: "SHA-1", field: "sha1" }, + { name: "SHA-256", field: "sha256" }, + { name: "SHA-384", field: "sha384" }, + { name: "SHA-512", field: "sha512" } +]; +function serialisedLength(x) { + for (let i = 0; i < x.length; i++) + if (x.charCodeAt(i) >= 256) return x.length * 2; + return x.length; +} +var Validator = class { + hash(digests, hashes) { + let checksums = {}; + for (let { name, field } of R2_HASH_ALGORITHMS) { + let providedHash = hashes[field]; + if (providedHash !== void 0) { + let computedHash = digests.get(name); + if (assert(computedHash !== void 0), !providedHash.equals(computedHash)) + throw new BadDigest(name, providedHash, computedHash); + checksums[field] = computedHash.toString("hex"); + } + } + return checksums; + } + condition(meta, onlyIf) { + if (onlyIf !== void 0 && !_testR2Conditional(onlyIf, meta)) + throw new PreconditionFailed(); + return this; + } + range(options, size) { + if (options.rangeHeader !== void 0) { + let ranges = parseRanges(options.rangeHeader, size); + if (ranges?.length === 1) return ranges[0]; + } else if (options.range !== void 0) { + let { offset, length, suffix } = options.range; + if (suffix !== void 0) { + if (suffix <= 0) throw new InvalidRange(); + suffix > size && (suffix = size), offset = size - suffix, length = suffix; + } + if (offset === void 0 && (offset = 0), length === void 0 && (length = size - offset), offset < 0 || offset > size || length <= 0) throw new InvalidRange(); + return offset + length > size && (length = size - offset), { start: offset, end: offset + length - 1 }; + } + } + size(size) { + if (size > R2Limits.MAX_VALUE_SIZE) + throw new EntityTooLarge(); + return this; + } + metadataSize(customMetadata) { + if (customMetadata === void 0) return this; + let metadataLength = 0; + for (let [key, value] of Object.entries(customMetadata)) + metadataLength += serialisedLength(key) + serialisedLength(value); + if (metadataLength > R2Limits.MAX_METADATA_SIZE) + throw new MetadataTooLarge(); + return this; + } + key(key) { + if (Buffer2.byteLength(key) > R2Limits.MAX_KEY_SIZE) + throw new InvalidObjectName(); + return this; + } + limit(limit) { + if (limit !== void 0 && (limit < 1 || limit > R2Limits.MAX_LIST_KEYS)) + throw new InvalidMaxKeys(); + return this; + } +}; + +// src/workers/r2/bucket.worker.ts +var DigestingStream = class extends TransformStream { + digests; + constructor(algorithms) { + let digests = new DeferredPromise(), hashes = algorithms.map((alg) => { + let stream = new crypto.DigestStream(alg), writer = stream.getWriter(); + return { stream, writer }; + }); + super({ + async transform(chunk, controller) { + for (let hash of hashes) await hash.writer.write(chunk); + controller.enqueue(chunk); + }, + async flush() { + let result = /* @__PURE__ */ new Map(); + for (let i = 0; i < hashes.length; i++) + await hashes[i].writer.close(), result.set(algorithms[i], Buffer3.from(await hashes[i].stream.digest)); + digests.resolve(result); + } + }), this.digests = digests; + } +}, validate = new Validator(), decoder = new TextDecoder(); +function generateVersion() { + return Buffer3.from(crypto.getRandomValues(new Uint8Array(16))).toString( + "hex" + ); +} +function generateId() { + return Buffer3.from(crypto.getRandomValues(new Uint8Array(128))).toString( + "base64url" + ); +} +function generateMultipartEtag(md5Hexes) { + let hash = createHash("md5"); + for (let md5Hex of md5Hexes) hash.update(md5Hex, "hex"); + return `${hash.digest("hex")}-${md5Hexes.length}`; +} +function rangeOverlaps(a, b) { + return a.start <= b.end && b.start <= a.end; +} +async function decodeMetadata(req) { + let metadataSize = parseInt(req.headers.get(R2Headers.METADATA_SIZE)); + if (Number.isNaN(metadataSize)) throw new InvalidMetadata(); + assert2(req.body !== null); + let body = req.body, [metadataBuffer, value] = await readPrefix(body, metadataSize), metadataJson = decoder.decode(metadataBuffer); + return { metadata: R2BindingRequestSchema.parse(JSON.parse(metadataJson)), metadataSize, value }; +} +function decodeHeaderMetadata(req) { + let header = req.headers.get(R2Headers.REQUEST); + if (header === null) throw new InvalidMetadata(); + return R2BindingRequestSchema.parse(JSON.parse(header)); +} +function encodeResult(result) { + let encoded; + return result instanceof InternalR2Object ? encoded = result.encode() : encoded = InternalR2Object.encodeMultiple(result), new Response(encoded.value, { + headers: { + [R2Headers.METADATA_SIZE]: `${encoded.metadataSize}`, + "Content-Type": "application/json", + "Content-Length": `${encoded.size}` + } + }); +} +function encodeJSONResult(result) { + let encoded = JSON.stringify(result); + return new Response(encoded, { + headers: { + [R2Headers.METADATA_SIZE]: `${Buffer3.byteLength(encoded)}`, + "Content-Type": "application/json" + } + }); +} +function sqlStmts(db) { + let stmtGetPreviousByKey = db.stmt("SELECT blob_id, etag, uploaded FROM _mf_objects WHERE key = :key"), stmtGetByKey = db.stmt(` + SELECT key, blob_id, version, size, etag, uploaded, checksums, http_metadata, custom_metadata + FROM _mf_objects WHERE key = :key + `), stmtPut = db.stmt(` + INSERT OR REPLACE INTO _mf_objects (key, blob_id, version, size, etag, uploaded, checksums, http_metadata, custom_metadata) + VALUES (:key, :blob_id, :version, :size, :etag, :uploaded, :checksums, :http_metadata, :custom_metadata) + `), stmtDelete = db.stmt("DELETE FROM _mf_objects WHERE key = :key RETURNING blob_id"); + function stmtListWithoutDelimiter(...extraColumns) { + let columns = [ + "key", + "version", + "size", + "etag", + "uploaded", + "checksums", + ...extraColumns + ]; + return db.stmt(` + SELECT ${columns.join(", ")} + FROM _mf_objects + WHERE substr(key, 1, length(:prefix)) = :prefix + AND (:start_after IS NULL OR key > :start_after) + ORDER BY key LIMIT :limit + `); + } + let stmtGetUploadState = db.stmt( + // For checking current upload state + "SELECT state FROM _mf_multipart_uploads WHERE upload_id = :upload_id AND key = :key" + ), stmtGetUploadMetadata = db.stmt( + // For checking current upload state, and getting metadata for completion + "SELECT http_metadata, custom_metadata, state FROM _mf_multipart_uploads WHERE upload_id = :upload_id AND key = :key" + ), stmtUpdateUploadState = db.stmt( + // For completing/aborting uploads + "UPDATE _mf_multipart_uploads SET state = :state WHERE upload_id = :upload_id" + ), stmtGetPreviousPartByNumber = db.stmt( + // For getting part number's previous blob ID to garbage collect + "SELECT blob_id FROM _mf_multipart_parts WHERE upload_id = :upload_id AND part_number = :part_number" + ), stmtPutPart = db.stmt( + // For recording metadata when uploading parts + `INSERT OR REPLACE INTO _mf_multipart_parts (upload_id, part_number, blob_id, size, etag, checksum_md5) + VALUES (:upload_id, :part_number, :blob_id, :size, :etag, :checksum_md5)` + ), stmtLinkPart = db.stmt( + // For linking parts with an object when completing uploads + `UPDATE _mf_multipart_parts SET object_key = :object_key + WHERE upload_id = :upload_id AND part_number = :part_number` + ), stmtDeletePartsByUploadId = db.stmt( + // For deleting parts when aborting uploads + "DELETE FROM _mf_multipart_parts WHERE upload_id = :upload_id RETURNING blob_id" + ), stmtDeleteUnlinkedPartsByUploadId = db.stmt( + // For deleting unused parts when completing uploads + "DELETE FROM _mf_multipart_parts WHERE upload_id = :upload_id AND object_key IS NULL RETURNING blob_id" + ), stmtDeletePartsByKey = db.stmt( + // For deleting dangling parts when overwriting an existing key + "DELETE FROM _mf_multipart_parts WHERE object_key = :object_key RETURNING blob_id" + ), stmtListPartsByUploadId = db.stmt( + // For getting part metadata when completing uploads + `SELECT upload_id, part_number, blob_id, size, etag, checksum_md5, object_key + FROM _mf_multipart_parts WHERE upload_id = :upload_id` + ), stmtListPartsByKey = db.stmt( + // For getting part metadata when getting values, size included for range + // requests, so we only need to read blobs containing the required data + "SELECT blob_id, size FROM _mf_multipart_parts WHERE object_key = :object_key ORDER BY part_number" + ); + return { + getByKey: stmtGetByKey, + getPartsByKey: db.txn((key) => { + let row = get(stmtGetByKey({ key })); + if (row !== void 0) + if (row.blob_id === null) { + let partsRows = all(stmtListPartsByKey({ object_key: key })); + return { row, parts: partsRows }; + } else + return { row }; + }), + put: db.txn((newRow, onlyIf) => { + let key = newRow.key, row = get(stmtGetPreviousByKey({ key })); + onlyIf !== void 0 && validate.condition(row, onlyIf), stmtPut(newRow); + let maybeOldBlobId = row?.blob_id; + return maybeOldBlobId === void 0 ? [] : maybeOldBlobId === null ? all(stmtDeletePartsByKey({ object_key: key })).map(({ blob_id }) => blob_id) : [maybeOldBlobId]; + }), + deleteByKeys: db.txn((keys) => { + let oldBlobIds = []; + for (let key of keys) { + let maybeOldBlobId = get(stmtDelete({ key }))?.blob_id; + if (maybeOldBlobId === null) { + let partRows = stmtDeletePartsByKey({ object_key: key }); + for (let partRow of partRows) oldBlobIds.push(partRow.blob_id); + } else maybeOldBlobId !== void 0 && oldBlobIds.push(maybeOldBlobId); + } + return oldBlobIds; + }), + listWithoutDelimiter: stmtListWithoutDelimiter(), + listHttpMetadataWithoutDelimiter: stmtListWithoutDelimiter("http_metadata"), + listCustomMetadataWithoutDelimiter: stmtListWithoutDelimiter("custom_metadata"), + listHttpCustomMetadataWithoutDelimiter: stmtListWithoutDelimiter( + "http_metadata", + "custom_metadata" + ), + listMetadata: db.stmt(` + SELECT + -- When grouping by a delimited prefix, this will give us the last key with that prefix. + -- NOTE: we'll use this for the next cursor. If we didn't return the last key, the next page may return the + -- same delimited prefix. Essentially, we're skipping over all keys with this group's delimited prefix. + -- When grouping by a key, this will just give us the key. + max(key) AS last_key, + iif( + -- Try get 1-indexed position \`i\` of :delimiter in rest of key after :prefix... + instr(substr(key, length(:prefix) + 1), :delimiter), + -- ...if found, we have a delimited prefix of the :prefix followed by the rest of key up to and including the :delimiter + 'dlp:' || substr(key, 1, length(:prefix) + instr(substr(key, length(:prefix) + 1), :delimiter) + length(:delimiter) - 1), + -- ...otherwise, we just have a regular key + 'key:' || key + ) AS delimited_prefix_or_key, + -- NOTE: we'll ignore metadata for delimited prefix rows, so it doesn't matter which keys' we return + version, size, etag, uploaded, checksums, http_metadata, custom_metadata + FROM _mf_objects + WHERE substr(key, 1, length(:prefix)) = :prefix + AND (:start_after IS NULL OR key > :start_after) + GROUP BY delimited_prefix_or_key -- Group keys with same delimited prefix into a row, leaving others in their own rows + ORDER BY last_key LIMIT :limit; + `), + createMultipartUpload: db.stmt(` + INSERT INTO _mf_multipart_uploads (upload_id, key, http_metadata, custom_metadata) + VALUES (:upload_id, :key, :http_metadata, :custom_metadata) + `), + putPart: db.txn( + (key, newRow) => { + if (get( + stmtGetUploadState({ + key, + upload_id: newRow.upload_id + }) + )?.state !== MultipartUploadState.IN_PROGRESS) + throw new NoSuchUpload(); + let partRow = get( + stmtGetPreviousPartByNumber({ + upload_id: newRow.upload_id, + part_number: newRow.part_number + }) + ); + return stmtPutPart(newRow), partRow?.blob_id; + } + ), + completeMultipartUpload: db.txn( + (key, upload_id, selectedParts, minPartSize) => { + let uploadRow = get(stmtGetUploadMetadata({ key, upload_id })); + if (uploadRow === void 0) + throw new InternalError(); + if (uploadRow.state > MultipartUploadState.IN_PROGRESS) + throw new NoSuchUpload(); + let partNumberSet = /* @__PURE__ */ new Set(); + for (let { part } of selectedParts) { + if (partNumberSet.has(part)) throw new InternalError(); + partNumberSet.add(part); + } + let uploadedPartRows = stmtListPartsByUploadId({ upload_id }), uploadedParts = /* @__PURE__ */ new Map(); + for (let row of uploadedPartRows) + uploadedParts.set(row.part_number, row); + let parts = selectedParts.map((selectedPart) => { + let uploadedPart = uploadedParts.get(selectedPart.part); + if (uploadedPart?.etag !== selectedPart.etag) + throw new InvalidPart(); + return uploadedPart; + }); + for (let part of parts.slice(0, -1)) + if (part.size < minPartSize) + throw new EntityTooSmall(); + parts.sort((a, b) => a.part_number - b.part_number); + let partSize; + for (let part of parts.slice(0, -1)) + if (partSize ??= part.size, part.size < minPartSize || part.size !== partSize) + throw new BadUpload(); + if (partSize !== void 0 && parts[parts.length - 1].size > partSize) + throw new BadUpload(); + let oldBlobIds = [], maybeOldBlobId = get(stmtGetPreviousByKey({ key }))?.blob_id; + if (maybeOldBlobId === null) { + let partRows2 = stmtDeletePartsByKey({ object_key: key }); + for (let partRow of partRows2) oldBlobIds.push(partRow.blob_id); + } else maybeOldBlobId !== void 0 && oldBlobIds.push(maybeOldBlobId); + let totalSize = parts.reduce((acc, { size }) => acc + size, 0), etag = generateMultipartEtag( + parts.map(({ checksum_md5 }) => checksum_md5) + ), newRow = { + key, + blob_id: null, + version: generateVersion(), + size: totalSize, + etag, + uploaded: Date.now(), + checksums: "{}", + http_metadata: uploadRow.http_metadata, + custom_metadata: uploadRow.custom_metadata + }; + stmtPut(newRow); + for (let part of parts) + stmtLinkPart({ + upload_id, + part_number: part.part_number, + object_key: key + }); + let partRows = stmtDeleteUnlinkedPartsByUploadId({ upload_id }); + for (let partRow of partRows) oldBlobIds.push(partRow.blob_id); + return stmtUpdateUploadState({ + upload_id, + state: MultipartUploadState.COMPLETED + }), { newRow, oldBlobIds }; + } + ), + abortMultipartUpload: db.txn((key, upload_id) => { + let uploadRow = get(stmtGetUploadState({ key, upload_id })); + if (uploadRow === void 0) + throw new InternalError(); + if (uploadRow.state > MultipartUploadState.IN_PROGRESS) + return []; + let oldBlobIds = all(stmtDeletePartsByUploadId({ upload_id })).map(({ blob_id }) => blob_id); + return stmtUpdateUploadState({ + upload_id, + state: MultipartUploadState.ABORTED + }), oldBlobIds; + }) + }; +} +var R2BucketObject = class extends MiniflareDurableObject { + #stmts; + // Multipart uploads are stored as multiple blobs. Therefore, when reading a + // multipart upload, we'll be reading multiple blobs. When an object is + // deleted, all its blobs are deleted in the background. + // + // Normally for single part objects, this is fine, since we'd open a handle to + // a single blob, which we'd have until we closed it, at which point the blob + // may be deleted. With multipart, we don't want to open handles for all blobs + // as we could hit open file descriptor limits. Similarly, we don't want to + // read all blobs first, as we'd have to buffer them. + // + // Instead, we set up in-process locking on blobs needed for multipart reads. + // When we start a multipart read, we acquire all the blobs we need, then + // release them as we've streamed each part. Multiple multipart reads may be + // in-progress at any given time, so we use a wait group. + // + // This assumes we only ever have a single Miniflare instance operating on a + // blob store, which is always true for in-memory stores, and usually true for + // on-disk ones. If we really wanted to do this properly, we could store the + // bookkeeping for the wait group in SQLite, but then we'd have to implement + // some inter-process signalling/subscription system. + #inUseBlobs = /* @__PURE__ */ new Map(); + constructor(state, env) { + super(state, env), this.db.exec("PRAGMA case_sensitive_like = TRUE"), this.db.exec(SQL_SCHEMA), this.#stmts = sqlStmts(this.db); + } + #acquireBlob(blobId) { + let waitGroup = this.#inUseBlobs.get(blobId); + waitGroup === void 0 ? (waitGroup = new WaitGroup(), this.#inUseBlobs.set(blobId, waitGroup), waitGroup.add(), waitGroup.wait().then(() => this.#inUseBlobs.delete(blobId))) : waitGroup.add(); + } + #releaseBlob(blobId) { + this.#inUseBlobs.get(blobId)?.done(); + } + #backgroundDelete(blobId) { + this.timers.queueMicrotask(async () => (await this.#inUseBlobs.get(blobId)?.wait(), this.blob.delete(blobId).catch((e) => { + console.error("R2BucketObject##backgroundDelete():", e); + }))); + } + #assembleMultipartValue(parts, queryRange) { + let requiredParts = [], start = 0; + for (let part of parts) { + let partRange = { start, end: start + part.size - 1 }; + if (rangeOverlaps(partRange, queryRange)) { + let range = { + start: Math.max(partRange.start, queryRange.start) - partRange.start, + end: Math.min(partRange.end, queryRange.end) - partRange.start + }; + this.#acquireBlob(part.blob_id), requiredParts.push({ blobId: part.blob_id, range }); + } + start = partRange.end + 1; + } + let identity2 = new TransformStream(); + return (async () => { + let i = 0; + try { + for (; i < requiredParts.length; i++) { + let { blobId, range } = requiredParts[i], value = await this.blob.get(blobId, range), msg = `Expected to find blob "${blobId}" for multipart value`; + assert2(value !== null, msg), await value.pipeTo(identity2.writable, { preventClose: !0 }), this.#releaseBlob(blobId); + } + await identity2.writable.close(); + } catch (e) { + await identity2.writable.abort(e); + } finally { + for (; i < requiredParts.length; i++) + this.#releaseBlob(requiredParts[i].blobId); + } + })(), identity2.readable; + } + async #head(key) { + validate.key(key); + let row = get(this.#stmts.getByKey({ key })); + if (row === void 0) throw new NoSuchKey(); + let range = { offset: 0, length: row.size }; + return new InternalR2Object(row, range); + } + async #get(key, opts) { + validate.key(key); + let result = this.#stmts.getPartsByKey(key); + if (result === void 0) throw new NoSuchKey(); + let { row, parts } = result, defaultR2Range = { offset: 0, length: row.size }; + try { + validate.condition(row, opts.onlyIf); + } catch (e) { + throw e instanceof PreconditionFailed && e.attach(new InternalR2Object(row, defaultR2Range)), e; + } + let range = validate.range(opts, row.size), r2Range; + if (range === void 0) + r2Range = defaultR2Range; + else { + let start = range.start, end = Math.min(range.end, row.size); + r2Range = { offset: start, length: end - start + 1 }; + } + let value; + if (row.blob_id === null) { + assert2(parts !== void 0); + let defaultRange = { start: 0, end: row.size - 1 }; + value = this.#assembleMultipartValue(parts, range ?? defaultRange); + } else if (value = await this.blob.get(row.blob_id, range), value === null) throw new NoSuchKey(); + return new InternalR2ObjectBody(row, value, r2Range); + } + async #put(key, value, valueSize, opts) { + let algorithms = []; + for (let { name, field } of R2_HASH_ALGORITHMS) + (field === "md5" || opts[field] !== void 0) && algorithms.push(name); + let digesting = new DigestingStream(algorithms), blobId = await this.blob.put(value.pipeThrough(digesting)), digests = await digesting.digests, md5Digest = digests.get("MD5"); + assert2(md5Digest !== void 0); + let md5DigestHex = md5Digest.toString("hex"), checksums = validate.key(key).size(valueSize).metadataSize(opts.customMetadata).hash(digests, opts), row = { + key, + blob_id: blobId, + version: generateVersion(), + size: valueSize, + etag: md5DigestHex, + uploaded: Date.now(), + checksums: JSON.stringify(checksums), + http_metadata: JSON.stringify(opts.httpMetadata ?? {}), + custom_metadata: JSON.stringify(opts.customMetadata ?? {}) + }, oldBlobIds; + try { + oldBlobIds = this.#stmts.put(row, opts.onlyIf); + } catch (e) { + throw this.#backgroundDelete(blobId), e; + } + if (oldBlobIds !== void 0) + for (let blobId2 of oldBlobIds) this.#backgroundDelete(blobId2); + return new InternalR2Object(row); + } + #delete(keys) { + Array.isArray(keys) || (keys = [keys]); + for (let key of keys) validate.key(key); + let oldBlobIds = this.#stmts.deleteByKeys(keys); + for (let blobId of oldBlobIds) this.#backgroundDelete(blobId); + } + #listWithoutDelimiterQuery(excludeHttp, excludeCustom) { + return excludeHttp && excludeCustom ? this.#stmts.listWithoutDelimiter : excludeHttp ? this.#stmts.listCustomMetadataWithoutDelimiter : excludeCustom ? this.#stmts.listHttpMetadataWithoutDelimiter : this.#stmts.listHttpCustomMetadataWithoutDelimiter; + } + async #list(opts) { + let prefix = opts.prefix ?? "", limit = opts.limit ?? R2Limits.MAX_LIST_KEYS; + validate.limit(limit); + let include = opts.include ?? []; + include.length > 0 && (limit = Math.min(limit, 100)); + let excludeHttp = !include.includes("httpMetadata"), excludeCustom = !include.includes("customMetadata"), rowObject = (row) => ((row.http_metadata === void 0 || excludeHttp) && (row.http_metadata = "{}"), (row.custom_metadata === void 0 || excludeCustom) && (row.custom_metadata = "{}"), new InternalR2Object(row)), startAfter = opts.startAfter; + if (opts.cursor !== void 0) { + let cursorStartAfter = base64Decode(opts.cursor); + (startAfter === void 0 || cursorStartAfter > startAfter) && (startAfter = cursorStartAfter); + } + let delimiter = opts.delimiter; + delimiter === "" && (delimiter = void 0); + let params = { + prefix, + start_after: startAfter ?? null, + // Increase the queried limit by 1, if we return this many results, we + // know there are more rows. We'll truncate to the original limit before + // returning results. + limit: limit + 1 + }, objects, delimitedPrefixes = [], nextCursorStartAfter; + if (delimiter !== void 0) { + let rows = all(this.#stmts.listMetadata({ ...params, delimiter })), hasMoreRows = rows.length === limit + 1; + rows.splice(limit, 1), objects = []; + for (let row of rows) + row.delimited_prefix_or_key.startsWith("dlp:") ? delimitedPrefixes.push(row.delimited_prefix_or_key.substring(4)) : objects.push(rowObject({ ...row, key: row.last_key })); + hasMoreRows && (nextCursorStartAfter = rows[limit - 1].last_key); + } else { + let query = this.#listWithoutDelimiterQuery(excludeHttp, excludeCustom), rows = all(query(params)), hasMoreRows = rows.length === limit + 1; + rows.splice(limit, 1), objects = rows.map(rowObject), hasMoreRows && (nextCursorStartAfter = rows[limit - 1].key); + } + let nextCursor = maybeApply(base64Encode, nextCursorStartAfter); + return { + objects, + truncated: nextCursor !== void 0, + cursor: nextCursor, + delimitedPrefixes + }; + } + async #createMultipartUpload(key, opts) { + validate.key(key); + let uploadId = generateId(); + return this.#stmts.createMultipartUpload({ + key, + upload_id: uploadId, + http_metadata: JSON.stringify(opts.httpMetadata ?? {}), + custom_metadata: JSON.stringify(opts.customMetadata ?? {}) + }), { uploadId }; + } + async #uploadPart(key, uploadId, partNumber, value, valueSize) { + validate.key(key); + let digesting = new DigestingStream(["MD5"]), blobId = await this.blob.put(value.pipeThrough(digesting)), md5Digest = (await digesting.digests).get("MD5"); + assert2(md5Digest !== void 0); + let etag = generateId(), maybeOldBlobId; + try { + maybeOldBlobId = this.#stmts.putPart(key, { + upload_id: uploadId, + part_number: partNumber, + blob_id: blobId, + size: valueSize, + etag, + checksum_md5: md5Digest.toString("hex") + }); + } catch (e) { + throw this.#backgroundDelete(blobId), e; + } + return maybeOldBlobId !== void 0 && this.#backgroundDelete(maybeOldBlobId), { etag }; + } + async #completeMultipartUpload(key, uploadId, parts) { + validate.key(key); + let minPartSize = this.beingTested ? R2Limits.MIN_MULTIPART_PART_SIZE_TEST : R2Limits.MIN_MULTIPART_PART_SIZE, { newRow, oldBlobIds } = this.#stmts.completeMultipartUpload( + key, + uploadId, + parts, + minPartSize + ); + for (let blobId of oldBlobIds) this.#backgroundDelete(blobId); + return new InternalR2Object(newRow); + } + async #abortMultipartUpload(key, uploadId) { + validate.key(key); + let oldBlobIds = this.#stmts.abortMultipartUpload(key, uploadId); + for (let blobId of oldBlobIds) this.#backgroundDelete(blobId); + } + get = async (req) => { + let metadata = decodeHeaderMetadata(req), result; + if (metadata.method === "head") + result = await this.#head(metadata.object); + else if (metadata.method === "get") + result = await this.#get(metadata.object, metadata); + else if (metadata.method === "list") + result = await this.#list(metadata); + else + throw new InternalError(); + return encodeResult(result); + }; + put = async (req) => { + let { metadata, metadataSize, value } = await decodeMetadata(req); + if (metadata.method === "delete") + return await this.#delete( + "object" in metadata ? metadata.object : metadata.objects + ), new Response(); + if (metadata.method === "put") { + let contentLength = parseInt(req.headers.get("Content-Length")); + assert2(!isNaN(contentLength)); + let valueSize = contentLength - metadataSize, result = await this.#put( + metadata.object, + value, + valueSize, + metadata + ); + return encodeResult(result); + } else if (metadata.method === "createMultipartUpload") { + let result = await this.#createMultipartUpload( + metadata.object, + metadata + ); + return encodeJSONResult(result); + } else if (metadata.method === "uploadPart") { + let contentLength = parseInt(req.headers.get("Content-Length")); + assert2(!isNaN(contentLength)); + let valueSize = contentLength - metadataSize, result = await this.#uploadPart( + metadata.object, + metadata.uploadId, + metadata.partNumber, + value, + valueSize + ); + return encodeJSONResult(result); + } else if (metadata.method === "completeMultipartUpload") { + let result = await this.#completeMultipartUpload( + metadata.object, + metadata.uploadId, + metadata.parts + ); + return encodeResult(result); + } else { + if (metadata.method === "abortMultipartUpload") + return await this.#abortMultipartUpload(metadata.object, metadata.uploadId), new Response(); + throw new InternalError(); + } + }; +}; +__decorateClass([ + GET("/") +], R2BucketObject.prototype, "get", 2), __decorateClass([ + PUT("/") +], R2BucketObject.prototype, "put", 2); +export { + R2BucketObject +}; +//# sourceMappingURL=bucket.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/r2/bucket.worker.js.map b/node_modules/miniflare/dist/src/workers/r2/bucket.worker.js.map new file mode 100644 index 0000000..1821aa9 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/r2/bucket.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../src/workers/r2/bucket.worker.ts", "../../../../src/workers/r2/constants.ts", "../../../../src/workers/r2/errors.worker.ts", "../../../../src/workers/r2/r2Object.worker.ts", "../../../../src/workers/r2/schemas.worker.ts", "../../../../src/workers/r2/validator.worker.ts"], + "mappings": ";;;;;;;;;AAAA,OAAOA,aAAY;AACnB,SAAS,UAAAC,eAAc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,cAC5B,SAAS,MAAM,KAAK;AAAA,QACzB,SAAS;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,MACD;AACA,aAAO,aAAa,MAAM;AAAA,IAC3B,WAAW,SAAS,WAAW,yBAAyB;AACvD,UAAM,SAAS,MAAM,KAAK;AAAA,QACzB,SAAS;AAAA,QACT;AAAA,MACD;AACA,aAAO,iBAAiB,MAAM;AAAA,IAC/B,WAAW,SAAS,WAAW,cAAc;AAG5C,UAAM,gBAAgB,SAAS,IAAI,QAAQ,IAAI,gBAAgB,CAAE;AAEjE,MAAAA,QAAO,CAAC,MAAM,aAAa,CAAC;AAC5B,UAAM,YAAY,gBAAgB,cAC5B,SAAS,MAAM,KAAK;AAAA,QACzB,SAAS;AAAA,QACT,SAAS;AAAA,QACT,SAAS;AAAA,QACT;AAAA,QACA;AAAA,MACD;AACA,aAAO,iBAAiB,MAAM;AAAA,IAC/B,WAAW,SAAS,WAAW,2BAA2B;AACzD,UAAM,SAAS,MAAM,KAAK;AAAA,QACzB,SAAS;AAAA,QACT,SAAS;AAAA,QACT,SAAS;AAAA,MACV;AACA,aAAO,aAAa,MAAM;AAAA,IAC3B,OAAO;AAAA,UAAI,SAAS,WAAW;AAC9B,qBAAM,KAAK,sBAAsB,SAAS,QAAQ,SAAS,QAAQ,GAC5D,IAAI,SAAS;AAEpB,YAAM,IAAI,cAAc;AAAA;AAAA,EAE1B;AACD;AA7EC;AAAA,EADC,IAAI,GAAG;AAAA,GAvaI,eAwaZ,sBAkBA;AAAA,EADC,IAAI,GAAG;AAAA,GAzbI,eA0bZ;", + "names": ["assert", "Buffer", "identity", "Buffer", "ifMatch", "ifModifiedSince", "Buffer", "Buffer", "assert", "partRows", "identity", "blobId"] +} diff --git a/node_modules/miniflare/dist/src/workers/ratelimit/ratelimit.worker.js b/node_modules/miniflare/dist/src/workers/ratelimit/ratelimit.worker.js new file mode 100644 index 0000000..fb5e4d8 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/ratelimit/ratelimit.worker.js @@ -0,0 +1,54 @@ +// src/workers/ratelimit/ratelimit.worker.ts +var RatelimitOptionKeys = ["key", "limit", "period"], RatelimitPeriodValues = [10, 60]; +function validate(test, message) { + if (!test) + throw new Error(message); +} +var Ratelimit = class { + namespaceId; + limitVal; + period; + buckets; + epoch; + constructor(config) { + this.namespaceId = config.namespaceId, this.limitVal = config.limit, this.period = config.period, this.buckets = /* @__PURE__ */ new Map(), this.epoch = 0; + } + // method that counts and checks against the limit in in-memory buckets + async limit(options) { + validate( + typeof options == "object" && options !== null, + "invalid rate limit options" + ); + let invalidProps = Object.keys(options ?? {}).filter( + (key2) => !RatelimitOptionKeys.includes(key2) + ); + validate( + invalidProps.length == 0, + `bad rate limit options: [${invalidProps.join(",")}]` + ); + let { + key = "", + limit = this.limitVal, + period = this.period + } = options; + validate(typeof key == "string", `invalid key: ${key}`), validate(typeof limit == "number", `limit must be a number: ${limit}`), validate(typeof period == "number", `period must be a number: ${period}`), validate( + RatelimitPeriodValues.includes(period), + `unsupported period: ${period}` + ); + let epoch = Math.floor(Date.now() / (period * 1e3)); + epoch != this.epoch && (this.epoch = epoch, this.buckets.clear()); + let val = this.buckets.get(key) || 0; + return val >= limit ? { + success: !1 + } : (this.buckets.set(key, val + 1), { + success: !0 + }); + } +}; +function ratelimit_worker_default(env) { + return new Ratelimit(env); +} +export { + ratelimit_worker_default as default +}; +//# sourceMappingURL=ratelimit.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/ratelimit/ratelimit.worker.js.map b/node_modules/miniflare/dist/src/workers/ratelimit/ratelimit.worker.js.map new file mode 100644 index 0000000..19c81bf --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/ratelimit/ratelimit.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../src/workers/ratelimit/ratelimit.worker.ts"], + "mappings": ";AAWA,IAAM,sBAAsB,CAAC,OAAO,SAAS,QAAQ,GAC/C,wBAAwB,CAAC,IAAI,EAAE;AAQrC,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AA,MACN,SAAS;AAAA,IACV;AAAA,EACD;AACD;AAGe,SAAR,yBAAkB,KAAsB;AAC9C,SAAO,IAAI,UAAU,GAAG;AACzB;", + "names": ["key"] +} diff --git a/node_modules/miniflare/dist/src/workers/secrets-store/secret.worker.js b/node_modules/miniflare/dist/src/workers/secrets-store/secret.worker.js new file mode 100644 index 0000000..5704454 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/secrets-store/secret.worker.js @@ -0,0 +1,65 @@ +// src/workers/secrets-store/secret.worker.ts +import { WorkerEntrypoint } from "cloudflare:workers"; + +// src/workers/secrets-store/constants.ts +var ADMIN_API = "SecretsStoreSecret::admin_api"; + +// src/workers/secrets-store/secret.worker.ts +var SecretsStoreSecret = class extends WorkerEntrypoint { + async get() { + let value = await this.env.store.get(this.env.secret_name, "text"); + if (value === null) + throw new Error(`Secret "${this.env.secret_name}" not found`); + return value; + } + [ADMIN_API]() { + return { + create: async (value) => { + let id = crypto.randomUUID().replaceAll("-", ""); + return await this.env.store.put(this.env.secret_name, value, { + metadata: { uuid: id } + }), id; + }, + update: async (value, id) => { + let { keys } = await this.env.store.list(), secret = keys.find((k) => k.metadata?.uuid === id); + if (!secret) + throw new Error("Secret not found"); + return await this.env.store.put(secret?.name, value, { + metadata: { uuid: id } + }), id; + }, + duplicate: async (id, newName) => { + let { keys } = await this.env.store.list(), secret = keys.find((k) => k.metadata?.uuid === id); + if (!secret) + throw new Error("Secret not found"); + let existingValue = await this.env.store.get(secret.name); + if (!existingValue) + throw new Error("Secret not found"); + let newId = crypto.randomUUID(); + return await this.env.store.put(newName, existingValue, { + metadata: { uuid: newId } + }), newId; + }, + delete: async (id) => { + let { keys } = await this.env.store.list(), secret = keys.find((k) => k.metadata?.uuid === id); + if (!secret) + throw new Error("Secret not found"); + await this.env.store.delete(secret?.name); + }, + list: async () => { + let { keys } = await this.env.store.list(); + return keys; + }, + get: async (id) => { + let { keys } = await this.env.store.list(), secret = keys.find((k) => k.metadata?.uuid === id); + if (!secret) + throw new Error("Secret not found"); + return secret.name; + } + }; + } +}; +export { + SecretsStoreSecret +}; +//# sourceMappingURL=secret.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/secrets-store/secret.worker.js.map b/node_modules/miniflare/dist/src/workers/secrets-store/secret.worker.js.map new file mode 100644 index 0000000..ced1518 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/secrets-store/secret.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../src/workers/secrets-store/secret.worker.ts", "../../../../src/workers/secrets-store/constants.ts"], + "mappings": ";AAEA,SAAS,wBAAwB;;;ACF1B,IAAM,YAAY;;;ADWlB,IAAM,qBAAN,cAAiC,iBAAsB;AAAA,EAC7D,MAAM,MAAuB;AAC5B,QAAM,QAAQ,MAAM,KAAK,IAAI,MAAM,IAAI,KAAK,IAAI,aAAa,MAAM;AAEnE,QAAI,UAAU;AACb,YAAM,IAAI,MAAM,WAAW,KAAK,IAAI,WAAW,aAAa;AAG7D,WAAO;AAAA,EACR;AAAA,EAEA,CAAC,SAAS,IAAI;AACb,WAAO;AAAA,MACN,QAAQ,OAAO,UAAkB;AAChC,YAAM,KAAK,OAAO,WAAW,EAAE,WAAW,KAAK,EAAE;AACjD,qBAAM,KAAK,IAAI,MAAM,IAAI,KAAK,IAAI,aAAa,OAAO;AAAA,UACrD,UAAU,EAAE,MAAM,GAAG;AAAA,QACtB,CAAC,GACM;AAAA,MACR;AAAA,MACA,QAAQ,OAAO,OAAe,OAAe;AAC5C,YAAM,EAAE,KAAK,IAAI,MAAM,KAAK,IAAI,MAAM,KAAuB,GACvD,SAAS,KAAK,KAAK,CAAC,MAAM,EAAE,UAAU,SAAS,EAAE;AACvD,YAAI,CAAC;AACJ,gBAAM,IAAI,MAAM,kBAAkB;AAEnC,qBAAM,KAAK,IAAI,MAAM,IAAI,QAAQ,MAAM,OAAO;AAAA,UAC7C,UAAU,EAAE,MAAM,GAAG;AAAA,QACtB,CAAC,GACM;AAAA,MACR;AAAA,MACA,WAAW,OAAO,IAAY,YAAoB;AACjD,YAAM,EAAE,KAAK,IAAI,MAAM,KAAK,IAAI,MAAM,KAAuB,GACvD,SAAS,KAAK,KAAK,CAAC,MAAM,EAAE,UAAU,SAAS,EAAE;AACvD,YAAI,CAAC;AACJ,gBAAM,IAAI,MAAM,kBAAkB;AAEnC,YAAM,gBAAgB,MAAM,KAAK,IAAI,MAAM,IAAI,OAAO,IAAI;AAC1D,YAAI,CAAC;AACJ,gBAAM,IAAI,MAAM,kBAAkB;AAEnC,YAAM,QAAQ,OAAO,WAAW;AAChC,qBAAM,KAAK,IAAI,MAAM,IAAI,SAAS,eAAe;AAAA,UAChD,UAAU,EAAE,MAAM,MAAM;AAAA,QACzB,CAAC,GACM;AAAA,MACR;AAAA,MACA,QAAQ,OAAO,OAAe;AAC7B,YAAM,EAAE,KAAK,IAAI,MAAM,KAAK,IAAI,MAAM,KAAuB,GACvD,SAAS,KAAK,KAAK,CAAC,MAAM,EAAE,UAAU,SAAS,EAAE;AACvD,YAAI,CAAC;AACJ,gBAAM,IAAI,MAAM,kBAAkB;AAEnC,cAAM,KAAK,IAAI,MAAM,OAAO,QAAQ,IAAI;AAAA,MACzC;AAAA,MACA,MAAM,YAAY;AACjB,YAAM,EAAE,KAAK,IAAI,MAAM,KAAK,IAAI,MAAM,KAAuB;AAC7D,eAAO;AAAA,MACR;AAAA,MACA,KAAK,OAAO,OAAe;AAC1B,YAAM,EAAE,KAAK,IAAI,MAAM,KAAK,IAAI,MAAM,KAAuB,GACvD,SAAS,KAAK,KAAK,CAAC,MAAM,EAAE,UAAU,SAAS,EAAE;AACvD,YAAI,CAAC;AACJ,gBAAM,IAAI,MAAM,kBAAkB;AAEnC,eAAO,OAAO;AAAA,MACf;AAAA,IACD;AAAA,EACD;AACD;", + "names": [] +} diff --git a/node_modules/miniflare/dist/src/workers/shared/index.worker.js b/node_modules/miniflare/dist/src/workers/shared/index.worker.js new file mode 100644 index 0000000..b4a8b68 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/shared/index.worker.js @@ -0,0 +1,683 @@ +// src/workers/shared/blob.worker.ts +import assert from "node-internal:internal_assert"; +import { Buffer as Buffer2 } from "node-internal:internal_buffer"; + +// src/workers/shared/data.ts +import { Buffer } from "node-internal:internal_buffer"; +function viewToBuffer(view) { + return view.buffer.slice( + view.byteOffset, + view.byteOffset + view.byteLength + ); +} +function base64Encode(value) { + return Buffer.from(value, "utf8").toString("base64"); +} +function base64Decode(encoded) { + return Buffer.from(encoded, "base64").toString("utf8"); +} +var dotRegexp = /(^|\/|\\)(\.+)(\/|\\|$)/g, illegalRegexp = /[?<>*"'^/\\:|\x00-\x1f\x80-\x9f]/g, windowsReservedRegexp = /^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i, leadingRegexp = /^[ /\\]+/, trailingRegexp = /[ /\\]+$/; +function dotReplacement(match, g1, g2, g3) { + return `${g1}${"".padStart(g2.length, "_")}${g3}`; +} +function underscoreReplacement(match) { + return "".padStart(match.length, "_"); +} +function sanitisePath(unsafe) { + return unsafe.replace(dotRegexp, dotReplacement).replace(dotRegexp, dotReplacement).replace(illegalRegexp, "_").replace(windowsReservedRegexp, "_").replace(leadingRegexp, underscoreReplacement).replace(trailingRegexp, underscoreReplacement).substring(0, 255); +} + +// src/workers/shared/blob.worker.ts +var ENCODER = new TextEncoder(); +async function readPrefix(stream, prefixLength) { + let reader = await stream.getReader({ mode: "byob" }), result = await reader.readAtLeast( + prefixLength, + new Uint8Array(prefixLength) + ); + assert(result.value !== void 0), reader.releaseLock(); + let rest = stream.pipeThrough(new IdentityTransformStream()); + return [result.value, rest]; +} +function rangeHeaders(range) { + return { Range: `bytes=${range.start}-${range.end}` }; +} +function assertFullRangeRequest(range, contentLength) { + assert( + range.start === 0 && range.end === contentLength - 1, + "Received full content, but requested partial content" + ); +} +async function fetchSingleRange(fetcher, url, range) { + let headers = range === void 0 ? {} : rangeHeaders(range), res = await fetcher.fetch(url, { headers }); + if (res.status === 404) return null; + if (assert(res.ok && res.body !== null), range !== void 0 && res.status !== 206) { + let contentLength = parseInt(res.headers.get("Content-Length")); + assert(!Number.isNaN(contentLength)), assertFullRangeRequest(range, contentLength); + } + return res.body; +} +async function writeMultipleRanges(fetcher, url, ranges, boundary, writable, contentLength, contentType) { + for (let i = 0; i < ranges.length; i++) { + let range = ranges[i], writer2 = writable.getWriter(); + i > 0 && await writer2.write(ENCODER.encode(`\r +`)), await writer2.write(ENCODER.encode(`--${boundary}\r +`)), contentType !== void 0 && await writer2.write(ENCODER.encode(`Content-Type: ${contentType}\r +`)); + let start = range.start, end = Math.min(range.end, contentLength - 1); + await writer2.write( + ENCODER.encode( + `Content-Range: bytes ${start}-${end}/${contentLength}\r +\r +` + ) + ), writer2.releaseLock(); + let res = await fetcher.fetch(url, { headers: rangeHeaders(range) }); + assert( + res.ok && res.body !== null, + `Failed to fetch ${url}[${range.start},${range.end}], received ${res.status} ${res.statusText}` + ), res.status !== 206 && assertFullRangeRequest(range, contentLength), await res.body.pipeTo(writable, { preventClose: !0 }); + } + let writer = writable.getWriter(); + ranges.length > 0 && await writer.write(ENCODER.encode(`\r +`)), await writer.write(ENCODER.encode(`--${boundary}--`)), await writer.close(); +} +async function fetchMultipleRanges(fetcher, url, ranges, opts) { + let res = await fetcher.fetch(url, { method: "HEAD" }); + if (res.status === 404) return null; + assert(res.ok); + let contentLength = parseInt(res.headers.get("Content-Length")); + assert(!Number.isNaN(contentLength)); + let boundary = `miniflare-boundary-${crypto.randomUUID()}`, multipartContentType = `multipart/byteranges; boundary=${boundary}`, { readable, writable } = new IdentityTransformStream(); + return writeMultipleRanges( + fetcher, + url, + ranges, + boundary, + writable, + contentLength, + opts?.contentType + ).catch((e) => console.error("Error writing multipart stream:", e)), { multipartContentType, body: readable }; +} +async function fetchRange(fetcher, url, range, opts) { + return Array.isArray(range) ? fetchMultipleRanges(fetcher, url, range, opts) : fetchSingleRange(fetcher, url, range); +} +function generateBlobId() { + let idBuffer = Buffer2.alloc(40); + return crypto.getRandomValues( + new Uint8Array(idBuffer.buffer, idBuffer.byteOffset, 32) + ), idBuffer.writeBigInt64BE( + BigInt(performance.timeOrigin + performance.now()), + 32 + ), idBuffer.toString("hex"); +} +var BlobStore = class { + // Database for binary large objects. Provides single and multi-ranged + // streaming reads and writes. + // + // Blobs have unguessable identifiers, can be deleted, but are otherwise + // immutable. These properties make it possible to perform atomic updates with + // the SQLite metadata store. No other operations will be able to interact + // with the blob until it's committed to the metadata store, because they + // won't be able to guess the ID, and we don't allow listing blobs. + // + // For example, if we put a blob in the store, then fail to insert the blob ID + // into the SQLite database for some reason during a transaction (e.g. + // `onlyIf` condition failed), no other operations can read that blob because + // the ID is lost (we'll just background-delete the blob in this case). + #fetcher; + #baseURL; + #stickyBlobs; + constructor(fetcher, namespace, stickyBlobs) { + namespace = encodeURIComponent(sanitisePath(namespace)), this.#fetcher = fetcher, this.#baseURL = `http://placeholder/${namespace}/blobs/`, this.#stickyBlobs = stickyBlobs; + } + idURL(id) { + let url = new URL(this.#baseURL + id); + return url.toString().startsWith(this.#baseURL) ? url : null; + } + async get(id, range, opts) { + let idURL = this.idURL(id); + return idURL === null ? null : fetchRange(this.#fetcher, idURL, range, opts); + } + async put(stream) { + let id = generateBlobId(), idURL = this.idURL(id); + return assert(idURL !== null), await this.#fetcher.fetch(idURL, { + method: "PUT", + body: stream + }), id; + } + async delete(id) { + if (this.#stickyBlobs) return; + let idURL = this.idURL(id); + if (idURL === null) return; + let res = await this.#fetcher.fetch(idURL, { method: "DELETE" }); + assert(res.ok || res.status === 404); + } +}; + +// src/workers/shared/constants.ts +var SharedHeaders = { + LOG_LEVEL: "MF-Log-Level" +}, SharedBindings = { + TEXT_NAMESPACE: "MINIFLARE_NAMESPACE", + DURABLE_OBJECT_NAMESPACE_OBJECT: "MINIFLARE_OBJECT", + MAYBE_SERVICE_BLOBS: "MINIFLARE_BLOBS", + MAYBE_SERVICE_LOOPBACK: "MINIFLARE_LOOPBACK", + MAYBE_JSON_ENABLE_CONTROL_ENDPOINTS: "MINIFLARE_ENABLE_CONTROL_ENDPOINTS", + MAYBE_JSON_ENABLE_STICKY_BLOBS: "MINIFLARE_STICKY_BLOBS" +}, LogLevel = /* @__PURE__ */ ((LogLevel3) => (LogLevel3[LogLevel3.NONE = 0] = "NONE", LogLevel3[LogLevel3.ERROR = 1] = "ERROR", LogLevel3[LogLevel3.WARN = 2] = "WARN", LogLevel3[LogLevel3.INFO = 3] = "INFO", LogLevel3[LogLevel3.DEBUG = 4] = "DEBUG", LogLevel3[LogLevel3.VERBOSE = 5] = "VERBOSE", LogLevel3))(LogLevel || {}); + +// src/workers/shared/keyvalue.worker.ts +import assert3 from "node-internal:internal_assert"; + +// src/workers/shared/sql.worker.ts +import assert2 from "node-internal:internal_assert"; +function isTypedValue(value) { + return value === null || typeof value == "string" || typeof value == "number" || value instanceof ArrayBuffer; +} +function createStatementFactory(sql) { + return (query) => { + let keyIndices = /* @__PURE__ */ new Map(); + query = query.replace(/[:@$]([a-z0-9_]+)/gi, (_, name) => { + let index = keyIndices.get(name); + return index === void 0 && (index = keyIndices.size, keyIndices.set(name, index)), `?${index + 1}`; + }); + let stmt = sql.prepare(query); + return (argsObject) => { + let entries = Object.entries(argsObject); + assert2.strictEqual( + entries.length, + keyIndices.size, + "Expected same number of keys in bindings and query" + ); + let argsArray = new Array(entries.length); + for (let [key, value] of entries) { + let index = keyIndices.get(key); + assert2(index !== void 0, `Unexpected binding key: ${key}`), argsArray[index] = value; + } + return stmt(...argsArray); + }; + }; +} +function createTransactionFactory(storage) { + return (closure) => (...args) => storage.transactionSync(() => closure(...args)); +} +function createTypedSql(storage) { + let sql = storage.sql; + return sql.stmt = createStatementFactory(sql), sql.txn = createTransactionFactory(storage), sql; +} +function get(cursor) { + let result; + for (let row of cursor) result ??= row; + return result; +} +function all(cursor) { + return Array.from(cursor); +} +function drain(cursor) { + for (let _ of cursor) + ; +} + +// src/workers/shared/keyvalue.worker.ts +var SQL_SCHEMA = ` +CREATE TABLE IF NOT EXISTS _mf_entries ( + key TEXT PRIMARY KEY, + blob_id TEXT NOT NULL, + expiration INTEGER, + metadata TEXT +); +CREATE INDEX IF NOT EXISTS _mf_entries_expiration_idx ON _mf_entries(expiration); +`; +function sqlStmts(db) { + let stmtGetBlobIdByKey = db.stmt( + "SELECT blob_id FROM _mf_entries WHERE key = :key" + ), stmtPut = db.stmt( + `INSERT OR REPLACE INTO _mf_entries (key, blob_id, expiration, metadata) + VALUES (:key, :blob_id, :expiration, :metadata)` + ); + return { + getByKey: db.prepare( + "SELECT key, blob_id, expiration, metadata FROM _mf_entries WHERE key = ?1" + ), + put: db.txn((newEntry) => { + let key = newEntry.key, previousEntry = get(stmtGetBlobIdByKey({ key })); + return stmtPut(newEntry), previousEntry?.blob_id; + }), + deleteByKey: db.stmt( + "DELETE FROM _mf_entries WHERE key = :key RETURNING blob_id, expiration" + ), + deleteExpired: db.stmt( + // `expiration` may be `NULL`, but `NULL < ...` should be falsy + "DELETE FROM _mf_entries WHERE expiration < :now RETURNING blob_id" + ), + list: db.stmt( + `SELECT key, expiration, metadata FROM _mf_entries + WHERE substr(key, 1, length(:prefix)) = :prefix + AND key > :start_after + AND (expiration IS NULL OR expiration >= :now) + ORDER BY key LIMIT :limit` + ) + }; +} +function rowEntry(entry) { + return { + key: entry.key, + expiration: entry.expiration ?? void 0, + metadata: entry.metadata === null ? void 0 : JSON.parse(entry.metadata) + }; +} +var KeyValueStorage = class { + #stmts; + #blob; + #timers; + constructor(object) { + object.db.exec("PRAGMA case_sensitive_like = TRUE"), object.db.exec(SQL_SCHEMA), this.#stmts = sqlStmts(object.db), this.#blob = object.blob, this.#timers = object.timers; + } + #hasExpired(entry) { + return entry.expiration !== null && entry.expiration <= this.#timers.now(); + } + #backgroundDelete(blobId) { + this.#timers.queueMicrotask( + () => this.#blob.delete(blobId).catch(() => { + }) + ); + } + async get(key, optsFactory) { + let row = get(this.#stmts.getByKey(key)); + if (row === void 0) return null; + if (this.#hasExpired(row)) + return drain(this.#stmts.deleteByKey({ key })), this.#backgroundDelete(row.blob_id), null; + let entry = rowEntry(row), opts = entry.metadata && optsFactory?.(entry.metadata); + if (opts?.ranges === void 0 || opts.ranges.length <= 1) { + let value = await this.#blob.get(row.blob_id, opts?.ranges?.[0]); + return value === null ? null : { ...entry, value }; + } else { + let value = await this.#blob.get(row.blob_id, opts.ranges, opts); + return value === null ? null : { ...entry, value }; + } + } + async put(entry) { + assert3(entry.key !== ""); + let blobId = await this.#blob.put(entry.value); + entry.signal?.aborted && (this.#backgroundDelete(blobId), entry.signal.throwIfAborted()); + let maybeOldBlobId = this.#stmts.put({ + key: entry.key, + blob_id: blobId, + expiration: entry.expiration ?? null, + metadata: entry.metadata === void 0 ? null : JSON.stringify(await entry.metadata) + }); + maybeOldBlobId !== void 0 && this.#backgroundDelete(maybeOldBlobId); + } + async delete(key) { + let cursor = this.#stmts.deleteByKey({ key }), row = get(cursor); + return row === void 0 ? !1 : (this.#backgroundDelete(row.blob_id), !this.#hasExpired(row)); + } + async list(opts) { + let now = this.#timers.now(), prefix = opts.prefix ?? "", start_after = opts.cursor === void 0 ? "" : base64Decode(opts.cursor), limit = opts.limit + 1, rowsCursor = this.#stmts.list({ + now, + prefix, + start_after, + limit + }), rows = Array.from(rowsCursor), expiredRows = this.#stmts.deleteExpired({ now }); + for (let row of expiredRows) this.#backgroundDelete(row.blob_id); + let hasMoreRows = rows.length === opts.limit + 1; + rows.splice(opts.limit, 1); + let keys = rows.map((row) => rowEntry(row)), nextCursor = hasMoreRows ? base64Encode(rows[opts.limit - 1].key) : void 0; + return { keys, cursor: nextCursor }; + } +}; + +// src/workers/shared/matcher.ts +function testRegExps(matcher, value) { + for (let exclude of matcher.exclude) if (exclude.test(value)) return !1; + for (let include of matcher.include) if (include.test(value)) return !0; + return !1; +} + +// src/workers/shared/object.worker.ts +import assert5 from "node-internal:internal_assert"; + +// src/workers/shared/router.worker.ts +var HttpError = class extends Error { + constructor(code, message) { + super(message); + this.code = code; + Object.setPrototypeOf(this, new.target.prototype), this.name = `${new.target.name} [${code}]`; + } + toResponse() { + return new Response(this.message, { + status: this.code, + // Custom statusMessage is required for runtime error messages + statusText: this.message.substring(0, 512) + }); + } +}, kRoutesTemplate = Symbol("kRoutesTemplate"), Router = class { + // Routes added by @METHOD decorators + #routes; + constructor() { + this.#routes = new.target.prototype[kRoutesTemplate]; + } + async fetch(req) { + let url = new URL(req.url), methodRoutes = this.#routes?.get(req.method); + if (methodRoutes === void 0) return new Response(null, { status: 405 }); + let handlers = this; + try { + for (let [path, key] of methodRoutes) { + let match = path.exec(url.pathname); + if (match !== null) return await handlers[key](req, match.groups, url); + } + return new Response(null, { status: 404 }); + } catch (e) { + if (e instanceof HttpError) + return e.toResponse(); + throw e; + } + } +}; +function pathToRegexp(path) { + return path === void 0 ? /^.*$/ : (path.endsWith("/") || (path += "/?"), path = path.replace(/\//g, "\\/"), path = path.replace(/:(\w+)/g, "(?<$1>[^\\/]+)"), new RegExp(`^${path}$`)); +} +var createRouteDecorator = (method) => (path) => (prototype, key) => { + let route = [pathToRegexp(path), key], routes = prototype[kRoutesTemplate] ??= /* @__PURE__ */ new Map(), methodRoutes = routes.get(method); + methodRoutes ? methodRoutes.push(route) : routes.set(method, [route]); +}, GET = createRouteDecorator("GET"), HEAD = createRouteDecorator("HEAD"), POST = createRouteDecorator("POST"), PUT = createRouteDecorator("PUT"), DELETE = createRouteDecorator("DELETE"), PURGE = createRouteDecorator("PURGE"), PATCH = createRouteDecorator("PATCH"); + +// src/workers/shared/timers.worker.ts +import assert4 from "node-internal:internal_assert"; +var kFakeTimerHandle = Symbol("kFakeTimerHandle"), Timers = class { + // Fake unix time in milliseconds. If defined, fake timers will be enabled. + #fakeTimestamp; + #fakeNextTimerHandle = 0; + #fakePendingTimeouts = /* @__PURE__ */ new Map(); + #fakeRunningTasks = /* @__PURE__ */ new Set(); + // Timers API + now = () => this.#fakeTimestamp ?? Date.now(); + setTimeout(closure, delay, ...args) { + if (this.#fakeTimestamp === void 0) + return setTimeout(closure, delay, ...args); + let handle = this.#fakeNextTimerHandle++, argsClosure = () => closure(...args); + if (delay === 0) + this.queueMicrotask(argsClosure); + else { + let timeout = { + triggerTimestamp: this.#fakeTimestamp + delay, + closure: argsClosure + }; + this.#fakePendingTimeouts.set(handle, timeout); + } + return { [kFakeTimerHandle]: handle }; + } + clearTimeout(handle) { + if (typeof handle == "number") return clearTimeout(handle); + this.#fakePendingTimeouts.delete(handle[kFakeTimerHandle]); + } + queueMicrotask(closure) { + if (this.#fakeTimestamp === void 0) return queueMicrotask(closure); + let result = closure(); + result instanceof Promise && (this.#fakeRunningTasks.add(result), result.finally(() => this.#fakeRunningTasks.delete(result))); + } + // Fake Timers Control API + #runPendingTimeouts() { + if (this.#fakeTimestamp !== void 0) + for (let [handle, timeout] of this.#fakePendingTimeouts) + timeout.triggerTimestamp <= this.#fakeTimestamp && (this.#fakePendingTimeouts.delete(handle), this.queueMicrotask(timeout.closure)); + } + enableFakeTimers(timestamp) { + this.#fakeTimestamp = timestamp, this.#runPendingTimeouts(); + } + disableFakeTimers() { + this.#fakeTimestamp = void 0, this.#fakePendingTimeouts.clear(); + } + advanceFakeTime(delta) { + assert4( + this.#fakeTimestamp !== void 0, + "Expected fake timers to be enabled before `advanceFakeTime()` call" + ), this.#fakeTimestamp += delta, this.#runPendingTimeouts(); + } + async waitForFakeTasks() { + for (; this.#fakeRunningTasks.size > 0; ) + await Promise.all(this.#fakeRunningTasks); + } +}; + +// src/workers/shared/types.ts +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) + }; +} +function maybeApply(f, maybeValue) { + return maybeValue === void 0 ? void 0 : f(maybeValue); +} + +// src/workers/shared/object.worker.ts +var MiniflareDurableObject = class extends Router { + constructor(state, env) { + super(); + this.state = state; + this.env = env; + } + timers = new Timers(); + // If this Durable Object receives a control op, assume it's being tested. + // We use this to adjust some limits in tests. + beingTested = !1; + #db; + get db() { + return this.#db ??= createTypedSql(this.state.storage); + } + #name; + get name() { + return assert5( + this.#name !== void 0, + "Expected `MiniflareDurableObject#fetch()` call before `name` access" + ), this.#name; + } + #blob; + get blob() { + if (this.#blob !== void 0) return this.#blob; + let maybeBlobsService = this.env[SharedBindings.MAYBE_SERVICE_BLOBS], stickyBlobs = !!this.env[SharedBindings.MAYBE_JSON_ENABLE_STICKY_BLOBS]; + return assert5( + maybeBlobsService !== void 0, + `Expected ${SharedBindings.MAYBE_SERVICE_BLOBS} service binding` + ), this.#blob = new BlobStore(maybeBlobsService, this.name, stickyBlobs), this.#blob; + } + async logWithLevel(level, message) { + await this.env[SharedBindings.MAYBE_SERVICE_LOOPBACK]?.fetch( + "http://localhost/core/log", + { + method: "POST", + headers: { [SharedHeaders.LOG_LEVEL]: level.toString() }, + body: message + } + ); + } + async #handleControlOp({ + name, + args + }) { + if (this.beingTested = !0, name === "sqlQuery") { + assert5(args !== void 0); + let [query, ...params] = args; + assert5(typeof query == "string"), assert5(params.every(isTypedValue)); + let results = all(this.db.prepare(query)(...params)); + return Response.json(results); + } else if (name === "getBlob") { + assert5(args !== void 0); + let [id] = args; + assert5(typeof id == "string"); + let stream = await this.blob.get(id); + return new Response(stream, { status: stream === null ? 404 : 200 }); + } else { + let func = this.timers[name]; + assert5(typeof func == "function"); + let result = await func.apply(this.timers, args); + return Response.json(result ?? null); + } + } + async fetch(req) { + if (this.env[SharedBindings.MAYBE_JSON_ENABLE_CONTROL_ENDPOINTS] === !0) { + let controlOp = req?.cf?.miniflare?.controlOp; + if (controlOp !== void 0) return this.#handleControlOp(controlOp); + } + let name = req.cf?.miniflare?.name; + assert5(name !== void 0, "Expected `cf.miniflare.name`"), this.#name = name; + try { + return await super.fetch(req); + } catch (e) { + let error = reduceError(e), fallback = error.stack ?? error.message, loopbackService = this.env[SharedBindings.MAYBE_SERVICE_LOOPBACK]; + return loopbackService !== void 0 ? loopbackService.fetch("http://localhost/core/error", { + method: "POST", + body: JSON.stringify(error) + }).catch(() => { + console.error(fallback); + }) : console.error(fallback), new Response(fallback, { status: 500 }); + } finally { + req.body !== null && !req.bodyUsed && await req.body.pipeTo(new WritableStream()); + } + } +}; + +// src/workers/shared/range.ts +var rangePrefixRegexp = /^ *bytes *=/i, rangeRegexp = /^ *(?\d+)? *- *(?\d+)? *$/; +function parseRanges(rangeHeader, length) { + let prefixMatch = rangePrefixRegexp.exec(rangeHeader); + if (prefixMatch === null) return; + if (rangeHeader = rangeHeader.substring(prefixMatch[0].length), rangeHeader.trimStart() === "") return []; + let ranges = rangeHeader.split(","), result = []; + for (let range of ranges) { + let match = rangeRegexp.exec(range); + if (match === null) return; + let { start, end } = match.groups; + if (start !== void 0 && end !== void 0) { + let rangeStart = parseInt(start), rangeEnd = parseInt(end); + if (rangeStart > rangeEnd || rangeStart >= length) return; + rangeEnd >= length && (rangeEnd = length - 1), result.push({ start: rangeStart, end: rangeEnd }); + } else if (start !== void 0 && end === void 0) { + let rangeStart = parseInt(start); + if (rangeStart >= length) return; + result.push({ start: rangeStart, end: length - 1 }); + } else if (start === void 0 && end !== void 0) { + let suffix = parseInt(end); + if (suffix >= length) return []; + if (suffix === 0) continue; + result.push({ start: length - suffix, end: length - 1 }); + } else + return; + } + return result; +} + +// src/workers/shared/sync.ts +import assert6 from "node-internal:internal_assert"; +var DeferredPromise = class extends Promise { + resolve; + reject; + constructor(executor = () => { + }) { + let promiseResolve, promiseReject; + super((resolve, reject) => (promiseResolve = resolve, promiseReject = reject, executor(resolve, reject))), this.resolve = promiseResolve, this.reject = promiseReject; + } +}, Mutex = class { + locked = !1; + resolveQueue = []; + drainQueue = []; + lock() { + if (!this.locked) { + this.locked = !0; + return; + } + return new Promise((resolve) => this.resolveQueue.push(resolve)); + } + unlock() { + if (assert6(this.locked), this.resolveQueue.length > 0) + this.resolveQueue.shift()?.(); + else { + this.locked = !1; + let resolve; + for (; (resolve = this.drainQueue.shift()) !== void 0; ) resolve(); + } + } + get hasWaiting() { + return this.resolveQueue.length > 0; + } + async runWith(closure) { + let acquireAwaitable = this.lock(); + acquireAwaitable instanceof Promise && await acquireAwaitable; + try { + let awaitable = closure(); + return awaitable instanceof Promise ? await awaitable : awaitable; + } finally { + this.unlock(); + } + } + async drained() { + if (!(this.resolveQueue.length === 0 && !this.locked)) + return new Promise((resolve) => this.drainQueue.push(resolve)); + } +}, WaitGroup = class { + counter = 0; + resolveQueue = []; + add() { + this.counter++; + } + done() { + if (assert6(this.counter > 0), this.counter--, this.counter === 0) { + let resolve; + for (; (resolve = this.resolveQueue.shift()) !== void 0; ) resolve(); + } + } + wait() { + return this.counter === 0 ? Promise.resolve() : new Promise((resolve) => this.resolveQueue.push(resolve)); + } +}; +export { + BlobStore, + DELETE, + DeferredPromise, + GET, + HEAD, + HttpError, + KeyValueStorage, + LogLevel, + MiniflareDurableObject, + Mutex, + PATCH, + POST, + PURGE, + PUT, + Router, + SharedBindings, + SharedHeaders, + Timers, + WaitGroup, + all, + base64Decode, + base64Encode, + drain, + get, + maybeApply, + parseRanges, + readPrefix, + reduceError, + testRegExps, + viewToBuffer +}; +/*! Path sanitisation regexps adapted from node-sanitize-filename: + * https://github.com/parshap/node-sanitize-filename/blob/209c39b914c8eb48ee27bcbde64b2c7822fdf3de/index.js#L4-L37 + * + * Licensed under the ISC license: + * + * Copyright Parsha Pourkhomami + * + * Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the + * above copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY + * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, + * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ +//# sourceMappingURL=index.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/shared/index.worker.js.map b/node_modules/miniflare/dist/src/workers/shared/index.worker.js.map new file mode 100644 index 0000000..4c894c5 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/shared/index.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../src/workers/shared/blob.worker.ts", "../../../../src/workers/shared/data.ts", "../../../../src/workers/shared/constants.ts", "../../../../src/workers/shared/keyvalue.worker.ts", "../../../../src/workers/shared/sql.worker.ts", "../../../../src/workers/shared/matcher.ts", "../../../../src/workers/shared/object.worker.ts", "../../../../src/workers/shared/router.worker.ts", "../../../../src/workers/shared/timers.worker.ts", "../../../../src/workers/shared/types.ts", "../../../../src/workers/shared/range.ts", "../../../../src/workers/shared/sync.ts"], + "mappings": ";AAAA,OAAO,YAAY;AACnB,SAAS,UAAAA,eAAc;;;ACDvB,SAAS,cAAc;AAEhB,SAAS,aAAa,MAAoC;AAChE,SAAO,KAAK,OAAO;AAAA,IAClB,KAAK;AAAA,IACL,KAAK,aAAa,KAAK;AAAA,EACxB;AACD;AAEO,SAAS,aAAa,OAAuB;AACnD,SAAO,OAAO,KAAK,OAAO,MAAM,EAAE,SAAS,QAAQ;AACpD;AACO,SAAS,aAAa,SAAyB;AACrD,SAAO,OAAO,KAAK,SAAS,QAAQ,EAAE,SAAS,MAAM;AACtD;AAiBA,IAAM,YAAY,4BACZ,gBAAgB,qCAChB,wBAAwB,iDACxB,gBAAgB,YAChB,iBAAiB;AAEvB,SAAS,eAAe,OAAe,IAAY,IAAY,IAAY;AAC1E,SAAO,GAAG,EAAE,GAAG,GAAG,SAAS,GAAG,QAAQ,GAAG,CAAC,GAAG,EAAE;AAChD;AAEA,SAAS,sBAAsB,OAAe;AAC7C,SAAO,GAAG,SAAS,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U,QAAQ,QAAQ,IACxC,IAAI,QAAQ,CAAC,YAAY,KAAK,aAAa,KAAK,OAAO,CAAC;AAAA,EAChE;AACD;", + "names": ["Buffer", "writer", "Buffer", "LogLevel", "assert", "assert", "assert", "assert", "assert", "assert", "assert"] +} diff --git a/node_modules/miniflare/dist/src/workers/shared/mixed-mode-client.worker.js b/node_modules/miniflare/dist/src/workers/shared/mixed-mode-client.worker.js new file mode 100644 index 0000000..9894570 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/shared/mixed-mode-client.worker.js @@ -0,0 +1,18 @@ +// src/workers/shared/mixed-mode-client.worker.ts +import { WorkerEntrypoint } from "cloudflare:workers"; +var Client = class extends WorkerEntrypoint { + async fetch(request) { + let proxiedHeaders = new Headers(); + for (let [name, value] of request.headers) + name === "upgrade" || name.startsWith("MF-") ? proxiedHeaders.set(name, value) : proxiedHeaders.set(`MF-Header-${name}`, value); + proxiedHeaders.set("MF-URL", request.url), proxiedHeaders.set("MF-Binding", this.env.binding); + let req = new Request(request, { + headers: proxiedHeaders + }); + return fetch(this.env.mixedModeConnectionString, req); + } +}; +export { + Client as default +}; +//# sourceMappingURL=mixed-mode-client.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/shared/mixed-mode-client.worker.js.map b/node_modules/miniflare/dist/src/workers/shared/mixed-mode-client.worker.js.map new file mode 100644 index 0000000..00434f6 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/shared/mixed-mode-client.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../src/workers/shared/mixed-mode-client.worker.ts"], + "mappings": ";AAAA,SAAS,wBAAwB;AAEjC,IAAqB,SAArB,cAAoC,iBAGjC;AAAA,EACF,MAAM,MAAM,SAAkB;AAC7B,QAAM,iBAAiB,IAAI,QAAQ;AACnC,aAAW,CAAC,MAAM,KAAK,KAAK,QAAQ;AAGnC,MAAI,SAAS,aAAa,KAAK,WAAW,KAAK,IAC9C,eAAe,IAAI,MAAM,KAAK,IAE9B,eAAe,IAAI,aAAa,IAAI,IAAI,KAAK;AAG/C,mBAAe,IAAI,UAAU,QAAQ,GAAG,GACxC,eAAe,IAAI,cAAc,KAAK,IAAI,OAAO;AACjD,QAAM,MAAM,IAAI,QAAQ,SAAS;AAAA,MAChC,SAAS;AAAA,IACV,CAAC;AAED,WAAO,MAAM,KAAK,IAAI,2BAA2B,GAAG;AAAA,EACrD;AACD;", + "names": [] +} diff --git a/node_modules/miniflare/dist/src/workers/shared/object-entry.worker.js b/node_modules/miniflare/dist/src/workers/shared/object-entry.worker.js new file mode 100644 index 0000000..824eed7 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/shared/object-entry.worker.js @@ -0,0 +1,21 @@ +// src/workers/shared/constants.ts +var SharedBindings = { + TEXT_NAMESPACE: "MINIFLARE_NAMESPACE", + DURABLE_OBJECT_NAMESPACE_OBJECT: "MINIFLARE_OBJECT", + MAYBE_SERVICE_BLOBS: "MINIFLARE_BLOBS", + MAYBE_SERVICE_LOOPBACK: "MINIFLARE_LOOPBACK", + MAYBE_JSON_ENABLE_CONTROL_ENDPOINTS: "MINIFLARE_ENABLE_CONTROL_ENDPOINTS", + MAYBE_JSON_ENABLE_STICKY_BLOBS: "MINIFLARE_STICKY_BLOBS" +}; + +// src/workers/shared/object-entry.worker.ts +var object_entry_worker_default = { + async fetch(request, env) { + let name = env[SharedBindings.TEXT_NAMESPACE], objectNamespace = env[SharedBindings.DURABLE_OBJECT_NAMESPACE_OBJECT], id = objectNamespace.idFromName(name), stub = objectNamespace.get(id), cf = { miniflare: { name } }; + return await stub.fetch(request, { cf }); + } +}; +export { + object_entry_worker_default as default +}; +//# sourceMappingURL=object-entry.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/shared/object-entry.worker.js.map b/node_modules/miniflare/dist/src/workers/shared/object-entry.worker.js.map new file mode 100644 index 0000000..45d138b --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/shared/object-entry.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../src/workers/shared/constants.ts", "../../../../src/workers/shared/object-entry.worker.ts"], + "mappings": ";AAIO,IAAM,iBAAiB;AAAA,EAC7B,gBAAgB;AAAA,EAChB,iCAAiC;AAAA,EACjC,qBAAqB;AAAA,EACrB,wBAAwB;AAAA,EACxB,qCAAqC;AAAA,EACrC,gCAAgC;AACjC;;;ACHA,IAAO,8BAA8B;AAAA,EACpC,MAAM,MAAM,SAAS,KAAK;AACzB,QAAM,OAAO,IAAI,eAAe,cAAc,GACxC,kBAAkB,IAAI,eAAe,+BAA+B,GACpE,KAAK,gBAAgB,WAAW,IAAI,GACpC,OAAO,gBAAgB,IAAI,EAAE,GAC7B,KAA+B,EAAE,WAAW,EAAE,KAAK,EAAE;AAC3D,WAAO,MAAM,KAAK,MAAM,SAAS,EAAE,GAAkC,CAAC;AAAA,EACvE;AACD;", + "names": [] +} diff --git a/node_modules/miniflare/dist/src/workers/shared/zod.worker.js b/node_modules/miniflare/dist/src/workers/shared/zod.worker.js new file mode 100644 index 0000000..3386804 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/shared/zod.worker.js @@ -0,0 +1,2715 @@ +// src/workers/shared/zod.worker.ts +import { Buffer } from "node-internal:internal_buffer"; + +// ../../node_modules/.pnpm/zod@3.22.3/node_modules/zod/lib/index.mjs +var util; +(function(util2) { + util2.assertEqual = (val) => val; + function assertIs(_arg) { + } + util2.assertIs = assertIs; + function assertNever(_x) { + throw new Error(); + } + util2.assertNever = assertNever, util2.arrayToEnum = (items) => { + let obj = {}; + for (let item of items) + obj[item] = item; + return obj; + }, util2.getValidEnumValues = (obj) => { + let validKeys = util2.objectKeys(obj).filter((k) => typeof obj[obj[k]] != "number"), filtered = {}; + for (let k of validKeys) + filtered[k] = obj[k]; + return util2.objectValues(filtered); + }, util2.objectValues = (obj) => util2.objectKeys(obj).map(function(e) { + return obj[e]; + }), util2.objectKeys = typeof Object.keys == "function" ? (obj) => Object.keys(obj) : (object) => { + let keys = []; + for (let key in object) + Object.prototype.hasOwnProperty.call(object, key) && keys.push(key); + return keys; + }, util2.find = (arr, checker) => { + for (let item of arr) + if (checker(item)) + return item; + }, util2.isInteger = typeof Number.isInteger == "function" ? (val) => Number.isInteger(val) : (val) => typeof val == "number" && isFinite(val) && Math.floor(val) === val; + function joinValues(array, separator = " | ") { + return array.map((val) => typeof val == "string" ? `'${val}'` : val).join(separator); + } + util2.joinValues = joinValues, util2.jsonStringifyReplacer = (_, value) => typeof value == "bigint" ? value.toString() : value; +})(util || (util = {})); +var objectUtil; +(function(objectUtil2) { + objectUtil2.mergeShapes = (first, second) => ({ + ...first, + ...second + // second overwrites first + }); +})(objectUtil || (objectUtil = {})); +var ZodParsedType = util.arrayToEnum([ + "string", + "nan", + "number", + "integer", + "float", + "boolean", + "date", + "bigint", + "symbol", + "function", + "undefined", + "null", + "array", + "object", + "unknown", + "promise", + "void", + "never", + "map", + "set" +]), getParsedType = (data) => { + switch (typeof data) { + case "undefined": + return ZodParsedType.undefined; + case "string": + return ZodParsedType.string; + case "number": + return isNaN(data) ? ZodParsedType.nan : ZodParsedType.number; + case "boolean": + return ZodParsedType.boolean; + case "function": + return ZodParsedType.function; + case "bigint": + return ZodParsedType.bigint; + case "symbol": + return ZodParsedType.symbol; + case "object": + return Array.isArray(data) ? ZodParsedType.array : data === null ? ZodParsedType.null : data.then && typeof data.then == "function" && data.catch && typeof data.catch == "function" ? ZodParsedType.promise : typeof Map < "u" && data instanceof Map ? ZodParsedType.map : typeof Set < "u" && data instanceof Set ? ZodParsedType.set : typeof Date < "u" && data instanceof Date ? ZodParsedType.date : ZodParsedType.object; + default: + return ZodParsedType.unknown; + } +}, ZodIssueCode = util.arrayToEnum([ + "invalid_type", + "invalid_literal", + "custom", + "invalid_union", + "invalid_union_discriminator", + "invalid_enum_value", + "unrecognized_keys", + "invalid_arguments", + "invalid_return_type", + "invalid_date", + "invalid_string", + "too_small", + "too_big", + "invalid_intersection_types", + "not_multiple_of", + "not_finite" +]), quotelessJson = (obj) => JSON.stringify(obj, null, 2).replace(/"([^"]+)":/g, "$1:"), ZodError = class extends Error { + constructor(issues) { + super(), this.issues = [], this.addIssue = (sub) => { + this.issues = [...this.issues, sub]; + }, this.addIssues = (subs = []) => { + this.issues = [...this.issues, ...subs]; + }; + let actualProto = new.target.prototype; + Object.setPrototypeOf ? Object.setPrototypeOf(this, actualProto) : this.__proto__ = actualProto, this.name = "ZodError", this.issues = issues; + } + get errors() { + return this.issues; + } + format(_mapper) { + let mapper = _mapper || function(issue) { + return issue.message; + }, fieldErrors = { _errors: [] }, processError = (error) => { + for (let issue of error.issues) + if (issue.code === "invalid_union") + issue.unionErrors.map(processError); + else if (issue.code === "invalid_return_type") + processError(issue.returnTypeError); + else if (issue.code === "invalid_arguments") + processError(issue.argumentsError); + else if (issue.path.length === 0) + fieldErrors._errors.push(mapper(issue)); + else { + let curr = fieldErrors, i = 0; + for (; i < issue.path.length; ) { + let el = issue.path[i]; + i === issue.path.length - 1 ? (curr[el] = curr[el] || { _errors: [] }, curr[el]._errors.push(mapper(issue))) : curr[el] = curr[el] || { _errors: [] }, curr = curr[el], i++; + } + } + }; + return processError(this), fieldErrors; + } + toString() { + return this.message; + } + get message() { + return JSON.stringify(this.issues, util.jsonStringifyReplacer, 2); + } + get isEmpty() { + return this.issues.length === 0; + } + flatten(mapper = (issue) => issue.message) { + let fieldErrors = {}, formErrors = []; + for (let sub of this.issues) + sub.path.length > 0 ? (fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [], fieldErrors[sub.path[0]].push(mapper(sub))) : formErrors.push(mapper(sub)); + return { formErrors, fieldErrors }; + } + get formErrors() { + return this.flatten(); + } +}; +ZodError.create = (issues) => new ZodError(issues); +var errorMap = (issue, _ctx) => { + let message; + switch (issue.code) { + case ZodIssueCode.invalid_type: + issue.received === ZodParsedType.undefined ? message = "Required" : message = `Expected ${issue.expected}, received ${issue.received}`; + break; + case ZodIssueCode.invalid_literal: + message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util.jsonStringifyReplacer)}`; + break; + case ZodIssueCode.unrecognized_keys: + message = `Unrecognized key(s) in object: ${util.joinValues(issue.keys, ", ")}`; + break; + case ZodIssueCode.invalid_union: + message = "Invalid input"; + break; + case ZodIssueCode.invalid_union_discriminator: + message = `Invalid discriminator value. Expected ${util.joinValues(issue.options)}`; + break; + case ZodIssueCode.invalid_enum_value: + message = `Invalid enum value. Expected ${util.joinValues(issue.options)}, received '${issue.received}'`; + break; + case ZodIssueCode.invalid_arguments: + message = "Invalid function arguments"; + break; + case ZodIssueCode.invalid_return_type: + message = "Invalid function return type"; + break; + case ZodIssueCode.invalid_date: + message = "Invalid date"; + break; + case ZodIssueCode.invalid_string: + typeof issue.validation == "object" ? "includes" in issue.validation ? (message = `Invalid input: must include "${issue.validation.includes}"`, typeof issue.validation.position == "number" && (message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`)) : "startsWith" in issue.validation ? message = `Invalid input: must start with "${issue.validation.startsWith}"` : "endsWith" in issue.validation ? message = `Invalid input: must end with "${issue.validation.endsWith}"` : util.assertNever(issue.validation) : issue.validation !== "regex" ? message = `Invalid ${issue.validation}` : message = "Invalid"; + break; + case ZodIssueCode.too_small: + issue.type === "array" ? message = `Array must contain ${issue.exact ? "exactly" : issue.inclusive ? "at least" : "more than"} ${issue.minimum} element(s)` : issue.type === "string" ? message = `String must contain ${issue.exact ? "exactly" : issue.inclusive ? "at least" : "over"} ${issue.minimum} character(s)` : issue.type === "number" ? message = `Number must be ${issue.exact ? "exactly equal to " : issue.inclusive ? "greater than or equal to " : "greater than "}${issue.minimum}` : issue.type === "date" ? message = `Date must be ${issue.exact ? "exactly equal to " : issue.inclusive ? "greater than or equal to " : "greater than "}${new Date(Number(issue.minimum))}` : message = "Invalid input"; + break; + case ZodIssueCode.too_big: + issue.type === "array" ? message = `Array must contain ${issue.exact ? "exactly" : issue.inclusive ? "at most" : "less than"} ${issue.maximum} element(s)` : issue.type === "string" ? message = `String must contain ${issue.exact ? "exactly" : issue.inclusive ? "at most" : "under"} ${issue.maximum} character(s)` : issue.type === "number" ? message = `Number must be ${issue.exact ? "exactly" : issue.inclusive ? "less than or equal to" : "less than"} ${issue.maximum}` : issue.type === "bigint" ? message = `BigInt must be ${issue.exact ? "exactly" : issue.inclusive ? "less than or equal to" : "less than"} ${issue.maximum}` : issue.type === "date" ? message = `Date must be ${issue.exact ? "exactly" : issue.inclusive ? "smaller than or equal to" : "smaller than"} ${new Date(Number(issue.maximum))}` : message = "Invalid input"; + break; + case ZodIssueCode.custom: + message = "Invalid input"; + break; + case ZodIssueCode.invalid_intersection_types: + message = "Intersection results could not be merged"; + break; + case ZodIssueCode.not_multiple_of: + message = `Number must be a multiple of ${issue.multipleOf}`; + break; + case ZodIssueCode.not_finite: + message = "Number must be finite"; + break; + default: + message = _ctx.defaultError, util.assertNever(issue); + } + return { message }; +}, overrideErrorMap = errorMap; +function setErrorMap(map) { + overrideErrorMap = map; +} +function getErrorMap() { + return overrideErrorMap; +} +var makeIssue = (params) => { + let { data, path, errorMaps, issueData } = params, fullPath = [...path, ...issueData.path || []], fullIssue = { + ...issueData, + path: fullPath + }, errorMessage = "", maps = errorMaps.filter((m) => !!m).slice().reverse(); + for (let map of maps) + errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message; + return { + ...issueData, + path: fullPath, + message: issueData.message || errorMessage + }; +}, EMPTY_PATH = []; +function addIssueToContext(ctx, issueData) { + let issue = makeIssue({ + issueData, + data: ctx.data, + path: ctx.path, + errorMaps: [ + ctx.common.contextualErrorMap, + ctx.schemaErrorMap, + getErrorMap(), + errorMap + // then global default map + ].filter((x) => !!x) + }); + ctx.common.issues.push(issue); +} +var ParseStatus = class _ParseStatus { + constructor() { + this.value = "valid"; + } + dirty() { + this.value === "valid" && (this.value = "dirty"); + } + abort() { + this.value !== "aborted" && (this.value = "aborted"); + } + static mergeArray(status, results) { + let arrayValue = []; + for (let s of results) { + if (s.status === "aborted") + return INVALID; + s.status === "dirty" && status.dirty(), arrayValue.push(s.value); + } + return { status: status.value, value: arrayValue }; + } + static async mergeObjectAsync(status, pairs) { + let syncPairs = []; + for (let pair of pairs) + syncPairs.push({ + key: await pair.key, + value: await pair.value + }); + return _ParseStatus.mergeObjectSync(status, syncPairs); + } + static mergeObjectSync(status, pairs) { + let finalObject = {}; + for (let pair of pairs) { + let { key, value } = pair; + if (key.status === "aborted" || value.status === "aborted") + return INVALID; + key.status === "dirty" && status.dirty(), value.status === "dirty" && status.dirty(), key.value !== "__proto__" && (typeof value.value < "u" || pair.alwaysSet) && (finalObject[key.value] = value.value); + } + return { status: status.value, value: finalObject }; + } +}, INVALID = Object.freeze({ + status: "aborted" +}), DIRTY = (value) => ({ status: "dirty", value }), OK = (value) => ({ status: "valid", value }), isAborted = (x) => x.status === "aborted", isDirty = (x) => x.status === "dirty", isValid = (x) => x.status === "valid", isAsync = (x) => typeof Promise < "u" && x instanceof Promise, errorUtil; +(function(errorUtil2) { + errorUtil2.errToObj = (message) => typeof message == "string" ? { message } : message || {}, errorUtil2.toString = (message) => typeof message == "string" ? message : message?.message; +})(errorUtil || (errorUtil = {})); +var ParseInputLazyPath = class { + constructor(parent, value, path, key) { + this._cachedPath = [], this.parent = parent, this.data = value, this._path = path, this._key = key; + } + get path() { + return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath; + } +}, handleResult = (ctx, result) => { + if (isValid(result)) + return { success: !0, data: result.value }; + if (!ctx.common.issues.length) + throw new Error("Validation failed but no issues detected."); + return { + success: !1, + get error() { + if (this._error) + return this._error; + let error = new ZodError(ctx.common.issues); + return this._error = error, this._error; + } + }; +}; +function processCreateParams(params) { + if (!params) + return {}; + let { errorMap: errorMap2, invalid_type_error, required_error, description } = params; + if (errorMap2 && (invalid_type_error || required_error)) + throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`); + return errorMap2 ? { errorMap: errorMap2, description } : { errorMap: (iss, ctx) => iss.code !== "invalid_type" ? { message: ctx.defaultError } : typeof ctx.data > "u" ? { message: required_error ?? ctx.defaultError } : { message: invalid_type_error ?? ctx.defaultError }, description }; +} +var ZodType = class { + constructor(def) { + this.spa = this.safeParseAsync, this._def = def, this.parse = this.parse.bind(this), this.safeParse = this.safeParse.bind(this), this.parseAsync = this.parseAsync.bind(this), this.safeParseAsync = this.safeParseAsync.bind(this), this.spa = this.spa.bind(this), this.refine = this.refine.bind(this), this.refinement = this.refinement.bind(this), this.superRefine = this.superRefine.bind(this), this.optional = this.optional.bind(this), this.nullable = this.nullable.bind(this), this.nullish = this.nullish.bind(this), this.array = this.array.bind(this), this.promise = this.promise.bind(this), this.or = this.or.bind(this), this.and = this.and.bind(this), this.transform = this.transform.bind(this), this.brand = this.brand.bind(this), this.default = this.default.bind(this), this.catch = this.catch.bind(this), this.describe = this.describe.bind(this), this.pipe = this.pipe.bind(this), this.readonly = this.readonly.bind(this), this.isNullable = this.isNullable.bind(this), this.isOptional = this.isOptional.bind(this); + } + get description() { + return this._def.description; + } + _getType(input) { + return getParsedType(input.data); + } + _getOrReturnCtx(input, ctx) { + return ctx || { + common: input.parent.common, + data: input.data, + parsedType: getParsedType(input.data), + schemaErrorMap: this._def.errorMap, + path: input.path, + parent: input.parent + }; + } + _processInputParams(input) { + return { + status: new ParseStatus(), + ctx: { + common: input.parent.common, + data: input.data, + parsedType: getParsedType(input.data), + schemaErrorMap: this._def.errorMap, + path: input.path, + parent: input.parent + } + }; + } + _parseSync(input) { + let result = this._parse(input); + if (isAsync(result)) + throw new Error("Synchronous parse encountered promise."); + return result; + } + _parseAsync(input) { + let result = this._parse(input); + return Promise.resolve(result); + } + parse(data, params) { + let result = this.safeParse(data, params); + if (result.success) + return result.data; + throw result.error; + } + safeParse(data, params) { + var _a; + let ctx = { + common: { + issues: [], + async: (_a = params?.async) !== null && _a !== void 0 ? _a : !1, + contextualErrorMap: params?.errorMap + }, + path: params?.path || [], + schemaErrorMap: this._def.errorMap, + parent: null, + data, + parsedType: getParsedType(data) + }, result = this._parseSync({ data, path: ctx.path, parent: ctx }); + return handleResult(ctx, result); + } + async parseAsync(data, params) { + let result = await this.safeParseAsync(data, params); + if (result.success) + return result.data; + throw result.error; + } + async safeParseAsync(data, params) { + let ctx = { + common: { + issues: [], + contextualErrorMap: params?.errorMap, + async: !0 + }, + path: params?.path || [], + schemaErrorMap: this._def.errorMap, + parent: null, + data, + parsedType: getParsedType(data) + }, maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx }), result = await (isAsync(maybeAsyncResult) ? maybeAsyncResult : Promise.resolve(maybeAsyncResult)); + return handleResult(ctx, result); + } + refine(check, message) { + let getIssueProperties = (val) => typeof message == "string" || typeof message > "u" ? { message } : typeof message == "function" ? message(val) : message; + return this._refinement((val, ctx) => { + let result = check(val), setError = () => ctx.addIssue({ + code: ZodIssueCode.custom, + ...getIssueProperties(val) + }); + return typeof Promise < "u" && result instanceof Promise ? result.then((data) => data ? !0 : (setError(), !1)) : result ? !0 : (setError(), !1); + }); + } + refinement(check, refinementData) { + return this._refinement((val, ctx) => check(val) ? !0 : (ctx.addIssue(typeof refinementData == "function" ? refinementData(val, ctx) : refinementData), !1)); + } + _refinement(refinement) { + return new ZodEffects({ + schema: this, + typeName: ZodFirstPartyTypeKind.ZodEffects, + effect: { type: "refinement", refinement } + }); + } + superRefine(refinement) { + return this._refinement(refinement); + } + optional() { + return ZodOptional.create(this, this._def); + } + nullable() { + return ZodNullable.create(this, this._def); + } + nullish() { + return this.nullable().optional(); + } + array() { + return ZodArray.create(this, this._def); + } + promise() { + return ZodPromise.create(this, this._def); + } + or(option) { + return ZodUnion.create([this, option], this._def); + } + and(incoming) { + return ZodIntersection.create(this, incoming, this._def); + } + transform(transform) { + return new ZodEffects({ + ...processCreateParams(this._def), + schema: this, + typeName: ZodFirstPartyTypeKind.ZodEffects, + effect: { type: "transform", transform } + }); + } + default(def) { + let defaultValueFunc = typeof def == "function" ? def : () => def; + return new ZodDefault({ + ...processCreateParams(this._def), + innerType: this, + defaultValue: defaultValueFunc, + typeName: ZodFirstPartyTypeKind.ZodDefault + }); + } + brand() { + return new ZodBranded({ + typeName: ZodFirstPartyTypeKind.ZodBranded, + type: this, + ...processCreateParams(this._def) + }); + } + catch(def) { + let catchValueFunc = typeof def == "function" ? def : () => def; + return new ZodCatch({ + ...processCreateParams(this._def), + innerType: this, + catchValue: catchValueFunc, + typeName: ZodFirstPartyTypeKind.ZodCatch + }); + } + describe(description) { + let This = this.constructor; + return new This({ + ...this._def, + description + }); + } + pipe(target) { + return ZodPipeline.create(this, target); + } + readonly() { + return ZodReadonly.create(this); + } + isOptional() { + return this.safeParse(void 0).success; + } + isNullable() { + return this.safeParse(null).success; + } +}, cuidRegex = /^c[^\s-]{8,}$/i, cuid2Regex = /^[a-z][a-z0-9]*$/, ulidRegex = /[0-9A-HJKMNP-TV-Z]{26}/, uuidRegex = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, emailRegex = /^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, emojiRegex = /^(\p{Extended_Pictographic}|\p{Emoji_Component})+$/u, ipv4Regex = /^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/, ipv6Regex = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, datetimeRegex = (args) => args.precision ? args.offset ? new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${args.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`) : new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${args.precision}}Z$`) : args.precision === 0 ? args.offset ? new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$") : new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$") : args.offset ? new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$") : new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"); +function isValidIP(ip, version) { + return !!((version === "v4" || !version) && ipv4Regex.test(ip) || (version === "v6" || !version) && ipv6Regex.test(ip)); +} +var ZodString = class _ZodString extends ZodType { + constructor() { + super(...arguments), this._regex = (regex, validation, message) => this.refinement((data) => regex.test(data), { + validation, + code: ZodIssueCode.invalid_string, + ...errorUtil.errToObj(message) + }), this.nonempty = (message) => this.min(1, errorUtil.errToObj(message)), this.trim = () => new _ZodString({ + ...this._def, + checks: [...this._def.checks, { kind: "trim" }] + }), this.toLowerCase = () => new _ZodString({ + ...this._def, + checks: [...this._def.checks, { kind: "toLowerCase" }] + }), this.toUpperCase = () => new _ZodString({ + ...this._def, + checks: [...this._def.checks, { kind: "toUpperCase" }] + }); + } + _parse(input) { + if (this._def.coerce && (input.data = String(input.data)), this._getType(input) !== ZodParsedType.string) { + let ctx2 = this._getOrReturnCtx(input); + return addIssueToContext( + ctx2, + { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.string, + received: ctx2.parsedType + } + // + ), INVALID; + } + let status = new ParseStatus(), ctx; + for (let check of this._def.checks) + if (check.kind === "min") + input.data.length < check.value && (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + code: ZodIssueCode.too_small, + minimum: check.value, + type: "string", + inclusive: !0, + exact: !1, + message: check.message + }), status.dirty()); + else if (check.kind === "max") + input.data.length > check.value && (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + code: ZodIssueCode.too_big, + maximum: check.value, + type: "string", + inclusive: !0, + exact: !1, + message: check.message + }), status.dirty()); + else if (check.kind === "length") { + let tooBig = input.data.length > check.value, tooSmall = input.data.length < check.value; + (tooBig || tooSmall) && (ctx = this._getOrReturnCtx(input, ctx), tooBig ? addIssueToContext(ctx, { + code: ZodIssueCode.too_big, + maximum: check.value, + type: "string", + inclusive: !0, + exact: !0, + message: check.message + }) : tooSmall && addIssueToContext(ctx, { + code: ZodIssueCode.too_small, + minimum: check.value, + type: "string", + inclusive: !0, + exact: !0, + message: check.message + }), status.dirty()); + } else if (check.kind === "email") + emailRegex.test(input.data) || (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + validation: "email", + code: ZodIssueCode.invalid_string, + message: check.message + }), status.dirty()); + else if (check.kind === "emoji") + emojiRegex.test(input.data) || (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + validation: "emoji", + code: ZodIssueCode.invalid_string, + message: check.message + }), status.dirty()); + else if (check.kind === "uuid") + uuidRegex.test(input.data) || (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + validation: "uuid", + code: ZodIssueCode.invalid_string, + message: check.message + }), status.dirty()); + else if (check.kind === "cuid") + cuidRegex.test(input.data) || (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + validation: "cuid", + code: ZodIssueCode.invalid_string, + message: check.message + }), status.dirty()); + else if (check.kind === "cuid2") + cuid2Regex.test(input.data) || (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + validation: "cuid2", + code: ZodIssueCode.invalid_string, + message: check.message + }), status.dirty()); + else if (check.kind === "ulid") + ulidRegex.test(input.data) || (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + validation: "ulid", + code: ZodIssueCode.invalid_string, + message: check.message + }), status.dirty()); + else if (check.kind === "url") + try { + new URL(input.data); + } catch { + ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + validation: "url", + code: ZodIssueCode.invalid_string, + message: check.message + }), status.dirty(); + } + else check.kind === "regex" ? (check.regex.lastIndex = 0, check.regex.test(input.data) || (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + validation: "regex", + code: ZodIssueCode.invalid_string, + message: check.message + }), status.dirty())) : check.kind === "trim" ? input.data = input.data.trim() : check.kind === "includes" ? input.data.includes(check.value, check.position) || (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + code: ZodIssueCode.invalid_string, + validation: { includes: check.value, position: check.position }, + message: check.message + }), status.dirty()) : check.kind === "toLowerCase" ? input.data = input.data.toLowerCase() : check.kind === "toUpperCase" ? input.data = input.data.toUpperCase() : check.kind === "startsWith" ? input.data.startsWith(check.value) || (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + code: ZodIssueCode.invalid_string, + validation: { startsWith: check.value }, + message: check.message + }), status.dirty()) : check.kind === "endsWith" ? input.data.endsWith(check.value) || (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + code: ZodIssueCode.invalid_string, + validation: { endsWith: check.value }, + message: check.message + }), status.dirty()) : check.kind === "datetime" ? datetimeRegex(check).test(input.data) || (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + code: ZodIssueCode.invalid_string, + validation: "datetime", + message: check.message + }), status.dirty()) : check.kind === "ip" ? isValidIP(input.data, check.version) || (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + validation: "ip", + code: ZodIssueCode.invalid_string, + message: check.message + }), status.dirty()) : util.assertNever(check); + return { status: status.value, value: input.data }; + } + _addCheck(check) { + return new _ZodString({ + ...this._def, + checks: [...this._def.checks, check] + }); + } + email(message) { + return this._addCheck({ kind: "email", ...errorUtil.errToObj(message) }); + } + url(message) { + return this._addCheck({ kind: "url", ...errorUtil.errToObj(message) }); + } + emoji(message) { + return this._addCheck({ kind: "emoji", ...errorUtil.errToObj(message) }); + } + uuid(message) { + return this._addCheck({ kind: "uuid", ...errorUtil.errToObj(message) }); + } + cuid(message) { + return this._addCheck({ kind: "cuid", ...errorUtil.errToObj(message) }); + } + cuid2(message) { + return this._addCheck({ kind: "cuid2", ...errorUtil.errToObj(message) }); + } + ulid(message) { + return this._addCheck({ kind: "ulid", ...errorUtil.errToObj(message) }); + } + ip(options) { + return this._addCheck({ kind: "ip", ...errorUtil.errToObj(options) }); + } + datetime(options) { + var _a; + return typeof options == "string" ? this._addCheck({ + kind: "datetime", + precision: null, + offset: !1, + message: options + }) : this._addCheck({ + kind: "datetime", + precision: typeof options?.precision > "u" ? null : options?.precision, + offset: (_a = options?.offset) !== null && _a !== void 0 ? _a : !1, + ...errorUtil.errToObj(options?.message) + }); + } + regex(regex, message) { + return this._addCheck({ + kind: "regex", + regex, + ...errorUtil.errToObj(message) + }); + } + includes(value, options) { + return this._addCheck({ + kind: "includes", + value, + position: options?.position, + ...errorUtil.errToObj(options?.message) + }); + } + startsWith(value, message) { + return this._addCheck({ + kind: "startsWith", + value, + ...errorUtil.errToObj(message) + }); + } + endsWith(value, message) { + return this._addCheck({ + kind: "endsWith", + value, + ...errorUtil.errToObj(message) + }); + } + min(minLength, message) { + return this._addCheck({ + kind: "min", + value: minLength, + ...errorUtil.errToObj(message) + }); + } + max(maxLength, message) { + return this._addCheck({ + kind: "max", + value: maxLength, + ...errorUtil.errToObj(message) + }); + } + length(len, message) { + return this._addCheck({ + kind: "length", + value: len, + ...errorUtil.errToObj(message) + }); + } + get isDatetime() { + return !!this._def.checks.find((ch) => ch.kind === "datetime"); + } + get isEmail() { + return !!this._def.checks.find((ch) => ch.kind === "email"); + } + get isURL() { + return !!this._def.checks.find((ch) => ch.kind === "url"); + } + get isEmoji() { + return !!this._def.checks.find((ch) => ch.kind === "emoji"); + } + get isUUID() { + return !!this._def.checks.find((ch) => ch.kind === "uuid"); + } + get isCUID() { + return !!this._def.checks.find((ch) => ch.kind === "cuid"); + } + get isCUID2() { + return !!this._def.checks.find((ch) => ch.kind === "cuid2"); + } + get isULID() { + return !!this._def.checks.find((ch) => ch.kind === "ulid"); + } + get isIP() { + return !!this._def.checks.find((ch) => ch.kind === "ip"); + } + get minLength() { + let min = null; + for (let ch of this._def.checks) + ch.kind === "min" && (min === null || ch.value > min) && (min = ch.value); + return min; + } + get maxLength() { + let max = null; + for (let ch of this._def.checks) + ch.kind === "max" && (max === null || ch.value < max) && (max = ch.value); + return max; + } +}; +ZodString.create = (params) => { + var _a; + return new ZodString({ + checks: [], + typeName: ZodFirstPartyTypeKind.ZodString, + coerce: (_a = params?.coerce) !== null && _a !== void 0 ? _a : !1, + ...processCreateParams(params) + }); +}; +function floatSafeRemainder(val, step) { + let valDecCount = (val.toString().split(".")[1] || "").length, stepDecCount = (step.toString().split(".")[1] || "").length, decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount, valInt = parseInt(val.toFixed(decCount).replace(".", "")), stepInt = parseInt(step.toFixed(decCount).replace(".", "")); + return valInt % stepInt / Math.pow(10, decCount); +} +var ZodNumber = class _ZodNumber extends ZodType { + constructor() { + super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf; + } + _parse(input) { + if (this._def.coerce && (input.data = Number(input.data)), this._getType(input) !== ZodParsedType.number) { + let ctx2 = this._getOrReturnCtx(input); + return addIssueToContext(ctx2, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.number, + received: ctx2.parsedType + }), INVALID; + } + let ctx, status = new ParseStatus(); + for (let check of this._def.checks) + check.kind === "int" ? util.isInteger(input.data) || (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: "integer", + received: "float", + message: check.message + }), status.dirty()) : check.kind === "min" ? (check.inclusive ? input.data < check.value : input.data <= check.value) && (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + code: ZodIssueCode.too_small, + minimum: check.value, + type: "number", + inclusive: check.inclusive, + exact: !1, + message: check.message + }), status.dirty()) : check.kind === "max" ? (check.inclusive ? input.data > check.value : input.data >= check.value) && (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + code: ZodIssueCode.too_big, + maximum: check.value, + type: "number", + inclusive: check.inclusive, + exact: !1, + message: check.message + }), status.dirty()) : check.kind === "multipleOf" ? floatSafeRemainder(input.data, check.value) !== 0 && (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + code: ZodIssueCode.not_multiple_of, + multipleOf: check.value, + message: check.message + }), status.dirty()) : check.kind === "finite" ? Number.isFinite(input.data) || (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + code: ZodIssueCode.not_finite, + message: check.message + }), status.dirty()) : util.assertNever(check); + return { status: status.value, value: input.data }; + } + gte(value, message) { + return this.setLimit("min", value, !0, errorUtil.toString(message)); + } + gt(value, message) { + return this.setLimit("min", value, !1, errorUtil.toString(message)); + } + lte(value, message) { + return this.setLimit("max", value, !0, errorUtil.toString(message)); + } + lt(value, message) { + return this.setLimit("max", value, !1, errorUtil.toString(message)); + } + setLimit(kind, value, inclusive, message) { + return new _ZodNumber({ + ...this._def, + checks: [ + ...this._def.checks, + { + kind, + value, + inclusive, + message: errorUtil.toString(message) + } + ] + }); + } + _addCheck(check) { + return new _ZodNumber({ + ...this._def, + checks: [...this._def.checks, check] + }); + } + int(message) { + return this._addCheck({ + kind: "int", + message: errorUtil.toString(message) + }); + } + positive(message) { + return this._addCheck({ + kind: "min", + value: 0, + inclusive: !1, + message: errorUtil.toString(message) + }); + } + negative(message) { + return this._addCheck({ + kind: "max", + value: 0, + inclusive: !1, + message: errorUtil.toString(message) + }); + } + nonpositive(message) { + return this._addCheck({ + kind: "max", + value: 0, + inclusive: !0, + message: errorUtil.toString(message) + }); + } + nonnegative(message) { + return this._addCheck({ + kind: "min", + value: 0, + inclusive: !0, + message: errorUtil.toString(message) + }); + } + multipleOf(value, message) { + return this._addCheck({ + kind: "multipleOf", + value, + message: errorUtil.toString(message) + }); + } + finite(message) { + return this._addCheck({ + kind: "finite", + message: errorUtil.toString(message) + }); + } + safe(message) { + return this._addCheck({ + kind: "min", + inclusive: !0, + value: Number.MIN_SAFE_INTEGER, + message: errorUtil.toString(message) + })._addCheck({ + kind: "max", + inclusive: !0, + value: Number.MAX_SAFE_INTEGER, + message: errorUtil.toString(message) + }); + } + get minValue() { + let min = null; + for (let ch of this._def.checks) + ch.kind === "min" && (min === null || ch.value > min) && (min = ch.value); + return min; + } + get maxValue() { + let max = null; + for (let ch of this._def.checks) + ch.kind === "max" && (max === null || ch.value < max) && (max = ch.value); + return max; + } + get isInt() { + return !!this._def.checks.find((ch) => ch.kind === "int" || ch.kind === "multipleOf" && util.isInteger(ch.value)); + } + get isFinite() { + let max = null, min = null; + for (let ch of this._def.checks) { + if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") + return !0; + ch.kind === "min" ? (min === null || ch.value > min) && (min = ch.value) : ch.kind === "max" && (max === null || ch.value < max) && (max = ch.value); + } + return Number.isFinite(min) && Number.isFinite(max); + } +}; +ZodNumber.create = (params) => new ZodNumber({ + checks: [], + typeName: ZodFirstPartyTypeKind.ZodNumber, + coerce: params?.coerce || !1, + ...processCreateParams(params) +}); +var ZodBigInt = class _ZodBigInt extends ZodType { + constructor() { + super(...arguments), this.min = this.gte, this.max = this.lte; + } + _parse(input) { + if (this._def.coerce && (input.data = BigInt(input.data)), this._getType(input) !== ZodParsedType.bigint) { + let ctx2 = this._getOrReturnCtx(input); + return addIssueToContext(ctx2, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.bigint, + received: ctx2.parsedType + }), INVALID; + } + let ctx, status = new ParseStatus(); + for (let check of this._def.checks) + check.kind === "min" ? (check.inclusive ? input.data < check.value : input.data <= check.value) && (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + code: ZodIssueCode.too_small, + type: "bigint", + minimum: check.value, + inclusive: check.inclusive, + message: check.message + }), status.dirty()) : check.kind === "max" ? (check.inclusive ? input.data > check.value : input.data >= check.value) && (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + code: ZodIssueCode.too_big, + type: "bigint", + maximum: check.value, + inclusive: check.inclusive, + message: check.message + }), status.dirty()) : check.kind === "multipleOf" ? input.data % check.value !== BigInt(0) && (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + code: ZodIssueCode.not_multiple_of, + multipleOf: check.value, + message: check.message + }), status.dirty()) : util.assertNever(check); + return { status: status.value, value: input.data }; + } + gte(value, message) { + return this.setLimit("min", value, !0, errorUtil.toString(message)); + } + gt(value, message) { + return this.setLimit("min", value, !1, errorUtil.toString(message)); + } + lte(value, message) { + return this.setLimit("max", value, !0, errorUtil.toString(message)); + } + lt(value, message) { + return this.setLimit("max", value, !1, errorUtil.toString(message)); + } + setLimit(kind, value, inclusive, message) { + return new _ZodBigInt({ + ...this._def, + checks: [ + ...this._def.checks, + { + kind, + value, + inclusive, + message: errorUtil.toString(message) + } + ] + }); + } + _addCheck(check) { + return new _ZodBigInt({ + ...this._def, + checks: [...this._def.checks, check] + }); + } + positive(message) { + return this._addCheck({ + kind: "min", + value: BigInt(0), + inclusive: !1, + message: errorUtil.toString(message) + }); + } + negative(message) { + return this._addCheck({ + kind: "max", + value: BigInt(0), + inclusive: !1, + message: errorUtil.toString(message) + }); + } + nonpositive(message) { + return this._addCheck({ + kind: "max", + value: BigInt(0), + inclusive: !0, + message: errorUtil.toString(message) + }); + } + nonnegative(message) { + return this._addCheck({ + kind: "min", + value: BigInt(0), + inclusive: !0, + message: errorUtil.toString(message) + }); + } + multipleOf(value, message) { + return this._addCheck({ + kind: "multipleOf", + value, + message: errorUtil.toString(message) + }); + } + get minValue() { + let min = null; + for (let ch of this._def.checks) + ch.kind === "min" && (min === null || ch.value > min) && (min = ch.value); + return min; + } + get maxValue() { + let max = null; + for (let ch of this._def.checks) + ch.kind === "max" && (max === null || ch.value < max) && (max = ch.value); + return max; + } +}; +ZodBigInt.create = (params) => { + var _a; + return new ZodBigInt({ + checks: [], + typeName: ZodFirstPartyTypeKind.ZodBigInt, + coerce: (_a = params?.coerce) !== null && _a !== void 0 ? _a : !1, + ...processCreateParams(params) + }); +}; +var ZodBoolean = class extends ZodType { + _parse(input) { + if (this._def.coerce && (input.data = !!input.data), this._getType(input) !== ZodParsedType.boolean) { + let ctx = this._getOrReturnCtx(input); + return addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.boolean, + received: ctx.parsedType + }), INVALID; + } + return OK(input.data); + } +}; +ZodBoolean.create = (params) => new ZodBoolean({ + typeName: ZodFirstPartyTypeKind.ZodBoolean, + coerce: params?.coerce || !1, + ...processCreateParams(params) +}); +var ZodDate = class _ZodDate extends ZodType { + _parse(input) { + if (this._def.coerce && (input.data = new Date(input.data)), this._getType(input) !== ZodParsedType.date) { + let ctx2 = this._getOrReturnCtx(input); + return addIssueToContext(ctx2, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.date, + received: ctx2.parsedType + }), INVALID; + } + if (isNaN(input.data.getTime())) { + let ctx2 = this._getOrReturnCtx(input); + return addIssueToContext(ctx2, { + code: ZodIssueCode.invalid_date + }), INVALID; + } + let status = new ParseStatus(), ctx; + for (let check of this._def.checks) + check.kind === "min" ? input.data.getTime() < check.value && (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + code: ZodIssueCode.too_small, + message: check.message, + inclusive: !0, + exact: !1, + minimum: check.value, + type: "date" + }), status.dirty()) : check.kind === "max" ? input.data.getTime() > check.value && (ctx = this._getOrReturnCtx(input, ctx), addIssueToContext(ctx, { + code: ZodIssueCode.too_big, + message: check.message, + inclusive: !0, + exact: !1, + maximum: check.value, + type: "date" + }), status.dirty()) : util.assertNever(check); + return { + status: status.value, + value: new Date(input.data.getTime()) + }; + } + _addCheck(check) { + return new _ZodDate({ + ...this._def, + checks: [...this._def.checks, check] + }); + } + min(minDate, message) { + return this._addCheck({ + kind: "min", + value: minDate.getTime(), + message: errorUtil.toString(message) + }); + } + max(maxDate, message) { + return this._addCheck({ + kind: "max", + value: maxDate.getTime(), + message: errorUtil.toString(message) + }); + } + get minDate() { + let min = null; + for (let ch of this._def.checks) + ch.kind === "min" && (min === null || ch.value > min) && (min = ch.value); + return min != null ? new Date(min) : null; + } + get maxDate() { + let max = null; + for (let ch of this._def.checks) + ch.kind === "max" && (max === null || ch.value < max) && (max = ch.value); + return max != null ? new Date(max) : null; + } +}; +ZodDate.create = (params) => new ZodDate({ + checks: [], + coerce: params?.coerce || !1, + typeName: ZodFirstPartyTypeKind.ZodDate, + ...processCreateParams(params) +}); +var ZodSymbol = class extends ZodType { + _parse(input) { + if (this._getType(input) !== ZodParsedType.symbol) { + let ctx = this._getOrReturnCtx(input); + return addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.symbol, + received: ctx.parsedType + }), INVALID; + } + return OK(input.data); + } +}; +ZodSymbol.create = (params) => new ZodSymbol({ + typeName: ZodFirstPartyTypeKind.ZodSymbol, + ...processCreateParams(params) +}); +var ZodUndefined = class extends ZodType { + _parse(input) { + if (this._getType(input) !== ZodParsedType.undefined) { + let ctx = this._getOrReturnCtx(input); + return addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.undefined, + received: ctx.parsedType + }), INVALID; + } + return OK(input.data); + } +}; +ZodUndefined.create = (params) => new ZodUndefined({ + typeName: ZodFirstPartyTypeKind.ZodUndefined, + ...processCreateParams(params) +}); +var ZodNull = class extends ZodType { + _parse(input) { + if (this._getType(input) !== ZodParsedType.null) { + let ctx = this._getOrReturnCtx(input); + return addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.null, + received: ctx.parsedType + }), INVALID; + } + return OK(input.data); + } +}; +ZodNull.create = (params) => new ZodNull({ + typeName: ZodFirstPartyTypeKind.ZodNull, + ...processCreateParams(params) +}); +var ZodAny = class extends ZodType { + constructor() { + super(...arguments), this._any = !0; + } + _parse(input) { + return OK(input.data); + } +}; +ZodAny.create = (params) => new ZodAny({ + typeName: ZodFirstPartyTypeKind.ZodAny, + ...processCreateParams(params) +}); +var ZodUnknown = class extends ZodType { + constructor() { + super(...arguments), this._unknown = !0; + } + _parse(input) { + return OK(input.data); + } +}; +ZodUnknown.create = (params) => new ZodUnknown({ + typeName: ZodFirstPartyTypeKind.ZodUnknown, + ...processCreateParams(params) +}); +var ZodNever = class extends ZodType { + _parse(input) { + let ctx = this._getOrReturnCtx(input); + return addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.never, + received: ctx.parsedType + }), INVALID; + } +}; +ZodNever.create = (params) => new ZodNever({ + typeName: ZodFirstPartyTypeKind.ZodNever, + ...processCreateParams(params) +}); +var ZodVoid = class extends ZodType { + _parse(input) { + if (this._getType(input) !== ZodParsedType.undefined) { + let ctx = this._getOrReturnCtx(input); + return addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.void, + received: ctx.parsedType + }), INVALID; + } + return OK(input.data); + } +}; +ZodVoid.create = (params) => new ZodVoid({ + typeName: ZodFirstPartyTypeKind.ZodVoid, + ...processCreateParams(params) +}); +var ZodArray = class _ZodArray extends ZodType { + _parse(input) { + let { ctx, status } = this._processInputParams(input), def = this._def; + if (ctx.parsedType !== ZodParsedType.array) + return addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.array, + received: ctx.parsedType + }), INVALID; + if (def.exactLength !== null) { + let tooBig = ctx.data.length > def.exactLength.value, tooSmall = ctx.data.length < def.exactLength.value; + (tooBig || tooSmall) && (addIssueToContext(ctx, { + code: tooBig ? ZodIssueCode.too_big : ZodIssueCode.too_small, + minimum: tooSmall ? def.exactLength.value : void 0, + maximum: tooBig ? def.exactLength.value : void 0, + type: "array", + inclusive: !0, + exact: !0, + message: def.exactLength.message + }), status.dirty()); + } + if (def.minLength !== null && ctx.data.length < def.minLength.value && (addIssueToContext(ctx, { + code: ZodIssueCode.too_small, + minimum: def.minLength.value, + type: "array", + inclusive: !0, + exact: !1, + message: def.minLength.message + }), status.dirty()), def.maxLength !== null && ctx.data.length > def.maxLength.value && (addIssueToContext(ctx, { + code: ZodIssueCode.too_big, + maximum: def.maxLength.value, + type: "array", + inclusive: !0, + exact: !1, + message: def.maxLength.message + }), status.dirty()), ctx.common.async) + return Promise.all([...ctx.data].map((item, i) => def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i)))).then((result2) => ParseStatus.mergeArray(status, result2)); + let result = [...ctx.data].map((item, i) => def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i))); + return ParseStatus.mergeArray(status, result); + } + get element() { + return this._def.type; + } + min(minLength, message) { + return new _ZodArray({ + ...this._def, + minLength: { value: minLength, message: errorUtil.toString(message) } + }); + } + max(maxLength, message) { + return new _ZodArray({ + ...this._def, + maxLength: { value: maxLength, message: errorUtil.toString(message) } + }); + } + length(len, message) { + return new _ZodArray({ + ...this._def, + exactLength: { value: len, message: errorUtil.toString(message) } + }); + } + nonempty(message) { + return this.min(1, message); + } +}; +ZodArray.create = (schema, params) => new ZodArray({ + type: schema, + minLength: null, + maxLength: null, + exactLength: null, + typeName: ZodFirstPartyTypeKind.ZodArray, + ...processCreateParams(params) +}); +function deepPartialify(schema) { + if (schema instanceof ZodObject) { + let newShape = {}; + for (let key in schema.shape) { + let fieldSchema = schema.shape[key]; + newShape[key] = ZodOptional.create(deepPartialify(fieldSchema)); + } + return new ZodObject({ + ...schema._def, + shape: () => newShape + }); + } else return schema instanceof ZodArray ? new ZodArray({ + ...schema._def, + type: deepPartialify(schema.element) + }) : schema instanceof ZodOptional ? ZodOptional.create(deepPartialify(schema.unwrap())) : schema instanceof ZodNullable ? ZodNullable.create(deepPartialify(schema.unwrap())) : schema instanceof ZodTuple ? ZodTuple.create(schema.items.map((item) => deepPartialify(item))) : schema; +} +var ZodObject = class _ZodObject extends ZodType { + constructor() { + super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend; + } + _getCached() { + if (this._cached !== null) + return this._cached; + let shape = this._def.shape(), keys = util.objectKeys(shape); + return this._cached = { shape, keys }; + } + _parse(input) { + if (this._getType(input) !== ZodParsedType.object) { + let ctx2 = this._getOrReturnCtx(input); + return addIssueToContext(ctx2, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.object, + received: ctx2.parsedType + }), INVALID; + } + let { status, ctx } = this._processInputParams(input), { shape, keys: shapeKeys } = this._getCached(), extraKeys = []; + if (!(this._def.catchall instanceof ZodNever && this._def.unknownKeys === "strip")) + for (let key in ctx.data) + shapeKeys.includes(key) || extraKeys.push(key); + let pairs = []; + for (let key of shapeKeys) { + let keyValidator = shape[key], value = ctx.data[key]; + pairs.push({ + key: { status: "valid", value: key }, + value: keyValidator._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)), + alwaysSet: key in ctx.data + }); + } + if (this._def.catchall instanceof ZodNever) { + let unknownKeys = this._def.unknownKeys; + if (unknownKeys === "passthrough") + for (let key of extraKeys) + pairs.push({ + key: { status: "valid", value: key }, + value: { status: "valid", value: ctx.data[key] } + }); + else if (unknownKeys === "strict") + extraKeys.length > 0 && (addIssueToContext(ctx, { + code: ZodIssueCode.unrecognized_keys, + keys: extraKeys + }), status.dirty()); + else if (unknownKeys !== "strip") throw new Error("Internal ZodObject error: invalid unknownKeys value."); + } else { + let catchall = this._def.catchall; + for (let key of extraKeys) { + let value = ctx.data[key]; + pairs.push({ + key: { status: "valid", value: key }, + value: catchall._parse( + new ParseInputLazyPath(ctx, value, ctx.path, key) + //, ctx.child(key), value, getParsedType(value) + ), + alwaysSet: key in ctx.data + }); + } + } + return ctx.common.async ? Promise.resolve().then(async () => { + let syncPairs = []; + for (let pair of pairs) { + let key = await pair.key; + syncPairs.push({ + key, + value: await pair.value, + alwaysSet: pair.alwaysSet + }); + } + return syncPairs; + }).then((syncPairs) => ParseStatus.mergeObjectSync(status, syncPairs)) : ParseStatus.mergeObjectSync(status, pairs); + } + get shape() { + return this._def.shape(); + } + strict(message) { + return errorUtil.errToObj, new _ZodObject({ + ...this._def, + unknownKeys: "strict", + ...message !== void 0 ? { + errorMap: (issue, ctx) => { + var _a, _b, _c, _d; + let defaultError = (_c = (_b = (_a = this._def).errorMap) === null || _b === void 0 ? void 0 : _b.call(_a, issue, ctx).message) !== null && _c !== void 0 ? _c : ctx.defaultError; + return issue.code === "unrecognized_keys" ? { + message: (_d = errorUtil.errToObj(message).message) !== null && _d !== void 0 ? _d : defaultError + } : { + message: defaultError + }; + } + } : {} + }); + } + strip() { + return new _ZodObject({ + ...this._def, + unknownKeys: "strip" + }); + } + passthrough() { + return new _ZodObject({ + ...this._def, + unknownKeys: "passthrough" + }); + } + // const AugmentFactory = + // (def: Def) => + // ( + // augmentation: Augmentation + // ): ZodObject< + // extendShape, Augmentation>, + // Def["unknownKeys"], + // Def["catchall"] + // > => { + // return new ZodObject({ + // ...def, + // shape: () => ({ + // ...def.shape(), + // ...augmentation, + // }), + // }) as any; + // }; + extend(augmentation) { + return new _ZodObject({ + ...this._def, + shape: () => ({ + ...this._def.shape(), + ...augmentation + }) + }); + } + /** + * Prior to zod@1.0.12 there was a bug in the + * inferred type of merged objects. Please + * upgrade if you are experiencing issues. + */ + merge(merging) { + return new _ZodObject({ + unknownKeys: merging._def.unknownKeys, + catchall: merging._def.catchall, + shape: () => ({ + ...this._def.shape(), + ...merging._def.shape() + }), + typeName: ZodFirstPartyTypeKind.ZodObject + }); + } + // merge< + // Incoming extends AnyZodObject, + // Augmentation extends Incoming["shape"], + // NewOutput extends { + // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation + // ? Augmentation[k]["_output"] + // : k extends keyof Output + // ? Output[k] + // : never; + // }, + // NewInput extends { + // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation + // ? Augmentation[k]["_input"] + // : k extends keyof Input + // ? Input[k] + // : never; + // } + // >( + // merging: Incoming + // ): ZodObject< + // extendShape>, + // Incoming["_def"]["unknownKeys"], + // Incoming["_def"]["catchall"], + // NewOutput, + // NewInput + // > { + // const merged: any = new ZodObject({ + // unknownKeys: merging._def.unknownKeys, + // catchall: merging._def.catchall, + // shape: () => + // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()), + // typeName: ZodFirstPartyTypeKind.ZodObject, + // }) as any; + // return merged; + // } + setKey(key, schema) { + return this.augment({ [key]: schema }); + } + // merge( + // merging: Incoming + // ): //ZodObject = (merging) => { + // ZodObject< + // extendShape>, + // Incoming["_def"]["unknownKeys"], + // Incoming["_def"]["catchall"] + // > { + // // const mergedShape = objectUtil.mergeShapes( + // // this._def.shape(), + // // merging._def.shape() + // // ); + // const merged: any = new ZodObject({ + // unknownKeys: merging._def.unknownKeys, + // catchall: merging._def.catchall, + // shape: () => + // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()), + // typeName: ZodFirstPartyTypeKind.ZodObject, + // }) as any; + // return merged; + // } + catchall(index) { + return new _ZodObject({ + ...this._def, + catchall: index + }); + } + pick(mask) { + let shape = {}; + return util.objectKeys(mask).forEach((key) => { + mask[key] && this.shape[key] && (shape[key] = this.shape[key]); + }), new _ZodObject({ + ...this._def, + shape: () => shape + }); + } + omit(mask) { + let shape = {}; + return util.objectKeys(this.shape).forEach((key) => { + mask[key] || (shape[key] = this.shape[key]); + }), new _ZodObject({ + ...this._def, + shape: () => shape + }); + } + /** + * @deprecated + */ + deepPartial() { + return deepPartialify(this); + } + partial(mask) { + let newShape = {}; + return util.objectKeys(this.shape).forEach((key) => { + let fieldSchema = this.shape[key]; + mask && !mask[key] ? newShape[key] = fieldSchema : newShape[key] = fieldSchema.optional(); + }), new _ZodObject({ + ...this._def, + shape: () => newShape + }); + } + required(mask) { + let newShape = {}; + return util.objectKeys(this.shape).forEach((key) => { + if (mask && !mask[key]) + newShape[key] = this.shape[key]; + else { + let newField = this.shape[key]; + for (; newField instanceof ZodOptional; ) + newField = newField._def.innerType; + newShape[key] = newField; + } + }), new _ZodObject({ + ...this._def, + shape: () => newShape + }); + } + keyof() { + return createZodEnum(util.objectKeys(this.shape)); + } +}; +ZodObject.create = (shape, params) => new ZodObject({ + shape: () => shape, + unknownKeys: "strip", + catchall: ZodNever.create(), + typeName: ZodFirstPartyTypeKind.ZodObject, + ...processCreateParams(params) +}); +ZodObject.strictCreate = (shape, params) => new ZodObject({ + shape: () => shape, + unknownKeys: "strict", + catchall: ZodNever.create(), + typeName: ZodFirstPartyTypeKind.ZodObject, + ...processCreateParams(params) +}); +ZodObject.lazycreate = (shape, params) => new ZodObject({ + shape, + unknownKeys: "strip", + catchall: ZodNever.create(), + typeName: ZodFirstPartyTypeKind.ZodObject, + ...processCreateParams(params) +}); +var ZodUnion = class extends ZodType { + _parse(input) { + let { ctx } = this._processInputParams(input), options = this._def.options; + function handleResults(results) { + for (let result of results) + if (result.result.status === "valid") + return result.result; + for (let result of results) + if (result.result.status === "dirty") + return ctx.common.issues.push(...result.ctx.common.issues), result.result; + let unionErrors = results.map((result) => new ZodError(result.ctx.common.issues)); + return addIssueToContext(ctx, { + code: ZodIssueCode.invalid_union, + unionErrors + }), INVALID; + } + if (ctx.common.async) + return Promise.all(options.map(async (option) => { + let childCtx = { + ...ctx, + common: { + ...ctx.common, + issues: [] + }, + parent: null + }; + return { + result: await option._parseAsync({ + data: ctx.data, + path: ctx.path, + parent: childCtx + }), + ctx: childCtx + }; + })).then(handleResults); + { + let dirty, issues = []; + for (let option of options) { + let childCtx = { + ...ctx, + common: { + ...ctx.common, + issues: [] + }, + parent: null + }, result = option._parseSync({ + data: ctx.data, + path: ctx.path, + parent: childCtx + }); + if (result.status === "valid") + return result; + result.status === "dirty" && !dirty && (dirty = { result, ctx: childCtx }), childCtx.common.issues.length && issues.push(childCtx.common.issues); + } + if (dirty) + return ctx.common.issues.push(...dirty.ctx.common.issues), dirty.result; + let unionErrors = issues.map((issues2) => new ZodError(issues2)); + return addIssueToContext(ctx, { + code: ZodIssueCode.invalid_union, + unionErrors + }), INVALID; + } + } + get options() { + return this._def.options; + } +}; +ZodUnion.create = (types, params) => new ZodUnion({ + options: types, + typeName: ZodFirstPartyTypeKind.ZodUnion, + ...processCreateParams(params) +}); +var getDiscriminator = (type) => type instanceof ZodLazy ? getDiscriminator(type.schema) : type instanceof ZodEffects ? getDiscriminator(type.innerType()) : type instanceof ZodLiteral ? [type.value] : type instanceof ZodEnum ? type.options : type instanceof ZodNativeEnum ? Object.keys(type.enum) : type instanceof ZodDefault ? getDiscriminator(type._def.innerType) : type instanceof ZodUndefined ? [void 0] : type instanceof ZodNull ? [null] : null, ZodDiscriminatedUnion = class _ZodDiscriminatedUnion extends ZodType { + _parse(input) { + let { ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType.object) + return addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.object, + received: ctx.parsedType + }), INVALID; + let discriminator = this.discriminator, discriminatorValue = ctx.data[discriminator], option = this.optionsMap.get(discriminatorValue); + return option ? ctx.common.async ? option._parseAsync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }) : option._parseSync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }) : (addIssueToContext(ctx, { + code: ZodIssueCode.invalid_union_discriminator, + options: Array.from(this.optionsMap.keys()), + path: [discriminator] + }), INVALID); + } + get discriminator() { + return this._def.discriminator; + } + get options() { + return this._def.options; + } + get optionsMap() { + return this._def.optionsMap; + } + /** + * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor. + * However, it only allows a union of objects, all of which need to share a discriminator property. This property must + * have a different value for each object in the union. + * @param discriminator the name of the discriminator property + * @param types an array of object schemas + * @param params + */ + static create(discriminator, options, params) { + let optionsMap = /* @__PURE__ */ new Map(); + for (let type of options) { + let discriminatorValues = getDiscriminator(type.shape[discriminator]); + if (!discriminatorValues) + throw new Error(`A discriminator value for key \`${discriminator}\` could not be extracted from all schema options`); + for (let value of discriminatorValues) { + if (optionsMap.has(value)) + throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`); + optionsMap.set(value, type); + } + } + return new _ZodDiscriminatedUnion({ + typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion, + discriminator, + options, + optionsMap, + ...processCreateParams(params) + }); + } +}; +function mergeValues(a, b) { + let aType = getParsedType(a), bType = getParsedType(b); + if (a === b) + return { valid: !0, data: a }; + if (aType === ZodParsedType.object && bType === ZodParsedType.object) { + let bKeys = util.objectKeys(b), sharedKeys = util.objectKeys(a).filter((key) => bKeys.indexOf(key) !== -1), newObj = { ...a, ...b }; + for (let key of sharedKeys) { + let sharedValue = mergeValues(a[key], b[key]); + if (!sharedValue.valid) + return { valid: !1 }; + newObj[key] = sharedValue.data; + } + return { valid: !0, data: newObj }; + } else if (aType === ZodParsedType.array && bType === ZodParsedType.array) { + if (a.length !== b.length) + return { valid: !1 }; + let newArray = []; + for (let index = 0; index < a.length; index++) { + let itemA = a[index], itemB = b[index], sharedValue = mergeValues(itemA, itemB); + if (!sharedValue.valid) + return { valid: !1 }; + newArray.push(sharedValue.data); + } + return { valid: !0, data: newArray }; + } else return aType === ZodParsedType.date && bType === ZodParsedType.date && +a == +b ? { valid: !0, data: a } : { valid: !1 }; +} +var ZodIntersection = class extends ZodType { + _parse(input) { + let { status, ctx } = this._processInputParams(input), handleParsed = (parsedLeft, parsedRight) => { + if (isAborted(parsedLeft) || isAborted(parsedRight)) + return INVALID; + let merged = mergeValues(parsedLeft.value, parsedRight.value); + return merged.valid ? ((isDirty(parsedLeft) || isDirty(parsedRight)) && status.dirty(), { status: status.value, value: merged.data }) : (addIssueToContext(ctx, { + code: ZodIssueCode.invalid_intersection_types + }), INVALID); + }; + return ctx.common.async ? Promise.all([ + this._def.left._parseAsync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }), + this._def.right._parseAsync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }) + ]).then(([left, right]) => handleParsed(left, right)) : handleParsed(this._def.left._parseSync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }), this._def.right._parseSync({ + data: ctx.data, + path: ctx.path, + parent: ctx + })); + } +}; +ZodIntersection.create = (left, right, params) => new ZodIntersection({ + left, + right, + typeName: ZodFirstPartyTypeKind.ZodIntersection, + ...processCreateParams(params) +}); +var ZodTuple = class _ZodTuple extends ZodType { + _parse(input) { + let { status, ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType.array) + return addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.array, + received: ctx.parsedType + }), INVALID; + if (ctx.data.length < this._def.items.length) + return addIssueToContext(ctx, { + code: ZodIssueCode.too_small, + minimum: this._def.items.length, + inclusive: !0, + exact: !1, + type: "array" + }), INVALID; + !this._def.rest && ctx.data.length > this._def.items.length && (addIssueToContext(ctx, { + code: ZodIssueCode.too_big, + maximum: this._def.items.length, + inclusive: !0, + exact: !1, + type: "array" + }), status.dirty()); + let items = [...ctx.data].map((item, itemIndex) => { + let schema = this._def.items[itemIndex] || this._def.rest; + return schema ? schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex)) : null; + }).filter((x) => !!x); + return ctx.common.async ? Promise.all(items).then((results) => ParseStatus.mergeArray(status, results)) : ParseStatus.mergeArray(status, items); + } + get items() { + return this._def.items; + } + rest(rest) { + return new _ZodTuple({ + ...this._def, + rest + }); + } +}; +ZodTuple.create = (schemas, params) => { + if (!Array.isArray(schemas)) + throw new Error("You must pass an array of schemas to z.tuple([ ... ])"); + return new ZodTuple({ + items: schemas, + typeName: ZodFirstPartyTypeKind.ZodTuple, + rest: null, + ...processCreateParams(params) + }); +}; +var ZodRecord = class _ZodRecord extends ZodType { + get keySchema() { + return this._def.keyType; + } + get valueSchema() { + return this._def.valueType; + } + _parse(input) { + let { status, ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType.object) + return addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.object, + received: ctx.parsedType + }), INVALID; + let pairs = [], keyType = this._def.keyType, valueType = this._def.valueType; + for (let key in ctx.data) + pairs.push({ + key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)), + value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)) + }); + return ctx.common.async ? ParseStatus.mergeObjectAsync(status, pairs) : ParseStatus.mergeObjectSync(status, pairs); + } + get element() { + return this._def.valueType; + } + static create(first, second, third) { + return second instanceof ZodType ? new _ZodRecord({ + keyType: first, + valueType: second, + typeName: ZodFirstPartyTypeKind.ZodRecord, + ...processCreateParams(third) + }) : new _ZodRecord({ + keyType: ZodString.create(), + valueType: first, + typeName: ZodFirstPartyTypeKind.ZodRecord, + ...processCreateParams(second) + }); + } +}, ZodMap = class extends ZodType { + get keySchema() { + return this._def.keyType; + } + get valueSchema() { + return this._def.valueType; + } + _parse(input) { + let { status, ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType.map) + return addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.map, + received: ctx.parsedType + }), INVALID; + let keyType = this._def.keyType, valueType = this._def.valueType, pairs = [...ctx.data.entries()].map(([key, value], index) => ({ + key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index, "key"])), + value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index, "value"])) + })); + if (ctx.common.async) { + let finalMap = /* @__PURE__ */ new Map(); + return Promise.resolve().then(async () => { + for (let pair of pairs) { + let key = await pair.key, value = await pair.value; + if (key.status === "aborted" || value.status === "aborted") + return INVALID; + (key.status === "dirty" || value.status === "dirty") && status.dirty(), finalMap.set(key.value, value.value); + } + return { status: status.value, value: finalMap }; + }); + } else { + let finalMap = /* @__PURE__ */ new Map(); + for (let pair of pairs) { + let key = pair.key, value = pair.value; + if (key.status === "aborted" || value.status === "aborted") + return INVALID; + (key.status === "dirty" || value.status === "dirty") && status.dirty(), finalMap.set(key.value, value.value); + } + return { status: status.value, value: finalMap }; + } + } +}; +ZodMap.create = (keyType, valueType, params) => new ZodMap({ + valueType, + keyType, + typeName: ZodFirstPartyTypeKind.ZodMap, + ...processCreateParams(params) +}); +var ZodSet = class _ZodSet extends ZodType { + _parse(input) { + let { status, ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType.set) + return addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.set, + received: ctx.parsedType + }), INVALID; + let def = this._def; + def.minSize !== null && ctx.data.size < def.minSize.value && (addIssueToContext(ctx, { + code: ZodIssueCode.too_small, + minimum: def.minSize.value, + type: "set", + inclusive: !0, + exact: !1, + message: def.minSize.message + }), status.dirty()), def.maxSize !== null && ctx.data.size > def.maxSize.value && (addIssueToContext(ctx, { + code: ZodIssueCode.too_big, + maximum: def.maxSize.value, + type: "set", + inclusive: !0, + exact: !1, + message: def.maxSize.message + }), status.dirty()); + let valueType = this._def.valueType; + function finalizeSet(elements2) { + let parsedSet = /* @__PURE__ */ new Set(); + for (let element of elements2) { + if (element.status === "aborted") + return INVALID; + element.status === "dirty" && status.dirty(), parsedSet.add(element.value); + } + return { status: status.value, value: parsedSet }; + } + let elements = [...ctx.data.values()].map((item, i) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i))); + return ctx.common.async ? Promise.all(elements).then((elements2) => finalizeSet(elements2)) : finalizeSet(elements); + } + min(minSize, message) { + return new _ZodSet({ + ...this._def, + minSize: { value: minSize, message: errorUtil.toString(message) } + }); + } + max(maxSize, message) { + return new _ZodSet({ + ...this._def, + maxSize: { value: maxSize, message: errorUtil.toString(message) } + }); + } + size(size, message) { + return this.min(size, message).max(size, message); + } + nonempty(message) { + return this.min(1, message); + } +}; +ZodSet.create = (valueType, params) => new ZodSet({ + valueType, + minSize: null, + maxSize: null, + typeName: ZodFirstPartyTypeKind.ZodSet, + ...processCreateParams(params) +}); +var ZodFunction = class _ZodFunction extends ZodType { + constructor() { + super(...arguments), this.validate = this.implement; + } + _parse(input) { + let { ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType.function) + return addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.function, + received: ctx.parsedType + }), INVALID; + function makeArgsIssue(args, error) { + return makeIssue({ + data: args, + path: ctx.path, + errorMaps: [ + ctx.common.contextualErrorMap, + ctx.schemaErrorMap, + getErrorMap(), + errorMap + ].filter((x) => !!x), + issueData: { + code: ZodIssueCode.invalid_arguments, + argumentsError: error + } + }); + } + function makeReturnsIssue(returns, error) { + return makeIssue({ + data: returns, + path: ctx.path, + errorMaps: [ + ctx.common.contextualErrorMap, + ctx.schemaErrorMap, + getErrorMap(), + errorMap + ].filter((x) => !!x), + issueData: { + code: ZodIssueCode.invalid_return_type, + returnTypeError: error + } + }); + } + let params = { errorMap: ctx.common.contextualErrorMap }, fn = ctx.data; + if (this._def.returns instanceof ZodPromise) { + let me = this; + return OK(async function(...args) { + let error = new ZodError([]), parsedArgs = await me._def.args.parseAsync(args, params).catch((e) => { + throw error.addIssue(makeArgsIssue(args, e)), error; + }), result = await Reflect.apply(fn, this, parsedArgs); + return await me._def.returns._def.type.parseAsync(result, params).catch((e) => { + throw error.addIssue(makeReturnsIssue(result, e)), error; + }); + }); + } else { + let me = this; + return OK(function(...args) { + let parsedArgs = me._def.args.safeParse(args, params); + if (!parsedArgs.success) + throw new ZodError([makeArgsIssue(args, parsedArgs.error)]); + let result = Reflect.apply(fn, this, parsedArgs.data), parsedReturns = me._def.returns.safeParse(result, params); + if (!parsedReturns.success) + throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]); + return parsedReturns.data; + }); + } + } + parameters() { + return this._def.args; + } + returnType() { + return this._def.returns; + } + args(...items) { + return new _ZodFunction({ + ...this._def, + args: ZodTuple.create(items).rest(ZodUnknown.create()) + }); + } + returns(returnType) { + return new _ZodFunction({ + ...this._def, + returns: returnType + }); + } + implement(func) { + return this.parse(func); + } + strictImplement(func) { + return this.parse(func); + } + static create(args, returns, params) { + return new _ZodFunction({ + args: args || ZodTuple.create([]).rest(ZodUnknown.create()), + returns: returns || ZodUnknown.create(), + typeName: ZodFirstPartyTypeKind.ZodFunction, + ...processCreateParams(params) + }); + } +}, ZodLazy = class extends ZodType { + get schema() { + return this._def.getter(); + } + _parse(input) { + let { ctx } = this._processInputParams(input); + return this._def.getter()._parse({ data: ctx.data, path: ctx.path, parent: ctx }); + } +}; +ZodLazy.create = (getter, params) => new ZodLazy({ + getter, + typeName: ZodFirstPartyTypeKind.ZodLazy, + ...processCreateParams(params) +}); +var ZodLiteral = class extends ZodType { + _parse(input) { + if (input.data !== this._def.value) { + let ctx = this._getOrReturnCtx(input); + return addIssueToContext(ctx, { + received: ctx.data, + code: ZodIssueCode.invalid_literal, + expected: this._def.value + }), INVALID; + } + return { status: "valid", value: input.data }; + } + get value() { + return this._def.value; + } +}; +ZodLiteral.create = (value, params) => new ZodLiteral({ + value, + typeName: ZodFirstPartyTypeKind.ZodLiteral, + ...processCreateParams(params) +}); +function createZodEnum(values, params) { + return new ZodEnum({ + values, + typeName: ZodFirstPartyTypeKind.ZodEnum, + ...processCreateParams(params) + }); +} +var ZodEnum = class _ZodEnum extends ZodType { + _parse(input) { + if (typeof input.data != "string") { + let ctx = this._getOrReturnCtx(input), expectedValues = this._def.values; + return addIssueToContext(ctx, { + expected: util.joinValues(expectedValues), + received: ctx.parsedType, + code: ZodIssueCode.invalid_type + }), INVALID; + } + if (this._def.values.indexOf(input.data) === -1) { + let ctx = this._getOrReturnCtx(input), expectedValues = this._def.values; + return addIssueToContext(ctx, { + received: ctx.data, + code: ZodIssueCode.invalid_enum_value, + options: expectedValues + }), INVALID; + } + return OK(input.data); + } + get options() { + return this._def.values; + } + get enum() { + let enumValues = {}; + for (let val of this._def.values) + enumValues[val] = val; + return enumValues; + } + get Values() { + let enumValues = {}; + for (let val of this._def.values) + enumValues[val] = val; + return enumValues; + } + get Enum() { + let enumValues = {}; + for (let val of this._def.values) + enumValues[val] = val; + return enumValues; + } + extract(values) { + return _ZodEnum.create(values); + } + exclude(values) { + return _ZodEnum.create(this.options.filter((opt) => !values.includes(opt))); + } +}; +ZodEnum.create = createZodEnum; +var ZodNativeEnum = class extends ZodType { + _parse(input) { + let nativeEnumValues = util.getValidEnumValues(this._def.values), ctx = this._getOrReturnCtx(input); + if (ctx.parsedType !== ZodParsedType.string && ctx.parsedType !== ZodParsedType.number) { + let expectedValues = util.objectValues(nativeEnumValues); + return addIssueToContext(ctx, { + expected: util.joinValues(expectedValues), + received: ctx.parsedType, + code: ZodIssueCode.invalid_type + }), INVALID; + } + if (nativeEnumValues.indexOf(input.data) === -1) { + let expectedValues = util.objectValues(nativeEnumValues); + return addIssueToContext(ctx, { + received: ctx.data, + code: ZodIssueCode.invalid_enum_value, + options: expectedValues + }), INVALID; + } + return OK(input.data); + } + get enum() { + return this._def.values; + } +}; +ZodNativeEnum.create = (values, params) => new ZodNativeEnum({ + values, + typeName: ZodFirstPartyTypeKind.ZodNativeEnum, + ...processCreateParams(params) +}); +var ZodPromise = class extends ZodType { + unwrap() { + return this._def.type; + } + _parse(input) { + let { ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType.promise && ctx.common.async === !1) + return addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.promise, + received: ctx.parsedType + }), INVALID; + let promisified = ctx.parsedType === ZodParsedType.promise ? ctx.data : Promise.resolve(ctx.data); + return OK(promisified.then((data) => this._def.type.parseAsync(data, { + path: ctx.path, + errorMap: ctx.common.contextualErrorMap + }))); + } +}; +ZodPromise.create = (schema, params) => new ZodPromise({ + type: schema, + typeName: ZodFirstPartyTypeKind.ZodPromise, + ...processCreateParams(params) +}); +var ZodEffects = class extends ZodType { + innerType() { + return this._def.schema; + } + sourceType() { + return this._def.schema._def.typeName === ZodFirstPartyTypeKind.ZodEffects ? this._def.schema.sourceType() : this._def.schema; + } + _parse(input) { + let { status, ctx } = this._processInputParams(input), effect = this._def.effect || null, checkCtx = { + addIssue: (arg) => { + addIssueToContext(ctx, arg), arg.fatal ? status.abort() : status.dirty(); + }, + get path() { + return ctx.path; + } + }; + if (checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx), effect.type === "preprocess") { + let processed = effect.transform(ctx.data, checkCtx); + return ctx.common.issues.length ? { + status: "dirty", + value: ctx.data + } : ctx.common.async ? Promise.resolve(processed).then((processed2) => this._def.schema._parseAsync({ + data: processed2, + path: ctx.path, + parent: ctx + })) : this._def.schema._parseSync({ + data: processed, + path: ctx.path, + parent: ctx + }); + } + if (effect.type === "refinement") { + let executeRefinement = (acc) => { + let result = effect.refinement(acc, checkCtx); + if (ctx.common.async) + return Promise.resolve(result); + if (result instanceof Promise) + throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead."); + return acc; + }; + if (ctx.common.async === !1) { + let inner = this._def.schema._parseSync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }); + return inner.status === "aborted" ? INVALID : (inner.status === "dirty" && status.dirty(), executeRefinement(inner.value), { status: status.value, value: inner.value }); + } else + return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((inner) => inner.status === "aborted" ? INVALID : (inner.status === "dirty" && status.dirty(), executeRefinement(inner.value).then(() => ({ status: status.value, value: inner.value })))); + } + if (effect.type === "transform") + if (ctx.common.async === !1) { + let base = this._def.schema._parseSync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }); + if (!isValid(base)) + return base; + let result = effect.transform(base.value, checkCtx); + if (result instanceof Promise) + throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead."); + return { status: status.value, value: result }; + } else + return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base) => isValid(base) ? Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ status: status.value, value: result })) : base); + util.assertNever(effect); + } +}; +ZodEffects.create = (schema, effect, params) => new ZodEffects({ + schema, + typeName: ZodFirstPartyTypeKind.ZodEffects, + effect, + ...processCreateParams(params) +}); +ZodEffects.createWithPreprocess = (preprocess, schema, params) => new ZodEffects({ + schema, + effect: { type: "preprocess", transform: preprocess }, + typeName: ZodFirstPartyTypeKind.ZodEffects, + ...processCreateParams(params) +}); +var ZodOptional = class extends ZodType { + _parse(input) { + return this._getType(input) === ZodParsedType.undefined ? OK(void 0) : this._def.innerType._parse(input); + } + unwrap() { + return this._def.innerType; + } +}; +ZodOptional.create = (type, params) => new ZodOptional({ + innerType: type, + typeName: ZodFirstPartyTypeKind.ZodOptional, + ...processCreateParams(params) +}); +var ZodNullable = class extends ZodType { + _parse(input) { + return this._getType(input) === ZodParsedType.null ? OK(null) : this._def.innerType._parse(input); + } + unwrap() { + return this._def.innerType; + } +}; +ZodNullable.create = (type, params) => new ZodNullable({ + innerType: type, + typeName: ZodFirstPartyTypeKind.ZodNullable, + ...processCreateParams(params) +}); +var ZodDefault = class extends ZodType { + _parse(input) { + let { ctx } = this._processInputParams(input), data = ctx.data; + return ctx.parsedType === ZodParsedType.undefined && (data = this._def.defaultValue()), this._def.innerType._parse({ + data, + path: ctx.path, + parent: ctx + }); + } + removeDefault() { + return this._def.innerType; + } +}; +ZodDefault.create = (type, params) => new ZodDefault({ + innerType: type, + typeName: ZodFirstPartyTypeKind.ZodDefault, + defaultValue: typeof params.default == "function" ? params.default : () => params.default, + ...processCreateParams(params) +}); +var ZodCatch = class extends ZodType { + _parse(input) { + let { ctx } = this._processInputParams(input), newCtx = { + ...ctx, + common: { + ...ctx.common, + issues: [] + } + }, result = this._def.innerType._parse({ + data: newCtx.data, + path: newCtx.path, + parent: { + ...newCtx + } + }); + return isAsync(result) ? result.then((result2) => ({ + status: "valid", + value: result2.status === "valid" ? result2.value : this._def.catchValue({ + get error() { + return new ZodError(newCtx.common.issues); + }, + input: newCtx.data + }) + })) : { + status: "valid", + value: result.status === "valid" ? result.value : this._def.catchValue({ + get error() { + return new ZodError(newCtx.common.issues); + }, + input: newCtx.data + }) + }; + } + removeCatch() { + return this._def.innerType; + } +}; +ZodCatch.create = (type, params) => new ZodCatch({ + innerType: type, + typeName: ZodFirstPartyTypeKind.ZodCatch, + catchValue: typeof params.catch == "function" ? params.catch : () => params.catch, + ...processCreateParams(params) +}); +var ZodNaN = class extends ZodType { + _parse(input) { + if (this._getType(input) !== ZodParsedType.nan) { + let ctx = this._getOrReturnCtx(input); + return addIssueToContext(ctx, { + code: ZodIssueCode.invalid_type, + expected: ZodParsedType.nan, + received: ctx.parsedType + }), INVALID; + } + return { status: "valid", value: input.data }; + } +}; +ZodNaN.create = (params) => new ZodNaN({ + typeName: ZodFirstPartyTypeKind.ZodNaN, + ...processCreateParams(params) +}); +var BRAND = Symbol("zod_brand"), ZodBranded = class extends ZodType { + _parse(input) { + let { ctx } = this._processInputParams(input), data = ctx.data; + return this._def.type._parse({ + data, + path: ctx.path, + parent: ctx + }); + } + unwrap() { + return this._def.type; + } +}, ZodPipeline = class _ZodPipeline extends ZodType { + _parse(input) { + let { status, ctx } = this._processInputParams(input); + if (ctx.common.async) + return (async () => { + let inResult = await this._def.in._parseAsync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }); + return inResult.status === "aborted" ? INVALID : inResult.status === "dirty" ? (status.dirty(), DIRTY(inResult.value)) : this._def.out._parseAsync({ + data: inResult.value, + path: ctx.path, + parent: ctx + }); + })(); + { + let inResult = this._def.in._parseSync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }); + return inResult.status === "aborted" ? INVALID : inResult.status === "dirty" ? (status.dirty(), { + status: "dirty", + value: inResult.value + }) : this._def.out._parseSync({ + data: inResult.value, + path: ctx.path, + parent: ctx + }); + } + } + static create(a, b) { + return new _ZodPipeline({ + in: a, + out: b, + typeName: ZodFirstPartyTypeKind.ZodPipeline + }); + } +}, ZodReadonly = class extends ZodType { + _parse(input) { + let result = this._def.innerType._parse(input); + return isValid(result) && (result.value = Object.freeze(result.value)), result; + } +}; +ZodReadonly.create = (type, params) => new ZodReadonly({ + innerType: type, + typeName: ZodFirstPartyTypeKind.ZodReadonly, + ...processCreateParams(params) +}); +var custom = (check, params = {}, fatal) => check ? ZodAny.create().superRefine((data, ctx) => { + var _a, _b; + if (!check(data)) { + let p = typeof params == "function" ? params(data) : typeof params == "string" ? { message: params } : params, _fatal = (_b = (_a = p.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : !0, p2 = typeof p == "string" ? { message: p } : p; + ctx.addIssue({ code: "custom", ...p2, fatal: _fatal }); + } +}) : ZodAny.create(), late = { + object: ZodObject.lazycreate +}, ZodFirstPartyTypeKind; +(function(ZodFirstPartyTypeKind2) { + ZodFirstPartyTypeKind2.ZodString = "ZodString", ZodFirstPartyTypeKind2.ZodNumber = "ZodNumber", ZodFirstPartyTypeKind2.ZodNaN = "ZodNaN", ZodFirstPartyTypeKind2.ZodBigInt = "ZodBigInt", ZodFirstPartyTypeKind2.ZodBoolean = "ZodBoolean", ZodFirstPartyTypeKind2.ZodDate = "ZodDate", ZodFirstPartyTypeKind2.ZodSymbol = "ZodSymbol", ZodFirstPartyTypeKind2.ZodUndefined = "ZodUndefined", ZodFirstPartyTypeKind2.ZodNull = "ZodNull", ZodFirstPartyTypeKind2.ZodAny = "ZodAny", ZodFirstPartyTypeKind2.ZodUnknown = "ZodUnknown", ZodFirstPartyTypeKind2.ZodNever = "ZodNever", ZodFirstPartyTypeKind2.ZodVoid = "ZodVoid", ZodFirstPartyTypeKind2.ZodArray = "ZodArray", ZodFirstPartyTypeKind2.ZodObject = "ZodObject", ZodFirstPartyTypeKind2.ZodUnion = "ZodUnion", ZodFirstPartyTypeKind2.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", ZodFirstPartyTypeKind2.ZodIntersection = "ZodIntersection", ZodFirstPartyTypeKind2.ZodTuple = "ZodTuple", ZodFirstPartyTypeKind2.ZodRecord = "ZodRecord", ZodFirstPartyTypeKind2.ZodMap = "ZodMap", ZodFirstPartyTypeKind2.ZodSet = "ZodSet", ZodFirstPartyTypeKind2.ZodFunction = "ZodFunction", ZodFirstPartyTypeKind2.ZodLazy = "ZodLazy", ZodFirstPartyTypeKind2.ZodLiteral = "ZodLiteral", ZodFirstPartyTypeKind2.ZodEnum = "ZodEnum", ZodFirstPartyTypeKind2.ZodEffects = "ZodEffects", ZodFirstPartyTypeKind2.ZodNativeEnum = "ZodNativeEnum", ZodFirstPartyTypeKind2.ZodOptional = "ZodOptional", ZodFirstPartyTypeKind2.ZodNullable = "ZodNullable", ZodFirstPartyTypeKind2.ZodDefault = "ZodDefault", ZodFirstPartyTypeKind2.ZodCatch = "ZodCatch", ZodFirstPartyTypeKind2.ZodPromise = "ZodPromise", ZodFirstPartyTypeKind2.ZodBranded = "ZodBranded", ZodFirstPartyTypeKind2.ZodPipeline = "ZodPipeline", ZodFirstPartyTypeKind2.ZodReadonly = "ZodReadonly"; +})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {})); +var instanceOfType = (cls, params = { + message: `Input not instance of ${cls.name}` +}) => custom((data) => data instanceof cls, params), stringType = ZodString.create, numberType = ZodNumber.create, nanType = ZodNaN.create, bigIntType = ZodBigInt.create, booleanType = ZodBoolean.create, dateType = ZodDate.create, symbolType = ZodSymbol.create, undefinedType = ZodUndefined.create, nullType = ZodNull.create, anyType = ZodAny.create, unknownType = ZodUnknown.create, neverType = ZodNever.create, voidType = ZodVoid.create, arrayType = ZodArray.create, objectType = ZodObject.create, strictObjectType = ZodObject.strictCreate, unionType = ZodUnion.create, discriminatedUnionType = ZodDiscriminatedUnion.create, intersectionType = ZodIntersection.create, tupleType = ZodTuple.create, recordType = ZodRecord.create, mapType = ZodMap.create, setType = ZodSet.create, functionType = ZodFunction.create, lazyType = ZodLazy.create, literalType = ZodLiteral.create, enumType = ZodEnum.create, nativeEnumType = ZodNativeEnum.create, promiseType = ZodPromise.create, effectsType = ZodEffects.create, optionalType = ZodOptional.create, nullableType = ZodNullable.create, preprocessType = ZodEffects.createWithPreprocess, pipelineType = ZodPipeline.create, ostring = () => stringType().optional(), onumber = () => numberType().optional(), oboolean = () => booleanType().optional(), coerce = { + string: (arg) => ZodString.create({ ...arg, coerce: !0 }), + number: (arg) => ZodNumber.create({ ...arg, coerce: !0 }), + boolean: (arg) => ZodBoolean.create({ + ...arg, + coerce: !0 + }), + bigint: (arg) => ZodBigInt.create({ ...arg, coerce: !0 }), + date: (arg) => ZodDate.create({ ...arg, coerce: !0 }) +}, NEVER = INVALID, z = /* @__PURE__ */ Object.freeze({ + __proto__: null, + defaultErrorMap: errorMap, + setErrorMap, + getErrorMap, + makeIssue, + EMPTY_PATH, + addIssueToContext, + ParseStatus, + INVALID, + DIRTY, + OK, + isAborted, + isDirty, + isValid, + isAsync, + get util() { + return util; + }, + get objectUtil() { + return objectUtil; + }, + ZodParsedType, + getParsedType, + ZodType, + ZodString, + ZodNumber, + ZodBigInt, + ZodBoolean, + ZodDate, + ZodSymbol, + ZodUndefined, + ZodNull, + ZodAny, + ZodUnknown, + ZodNever, + ZodVoid, + ZodArray, + ZodObject, + ZodUnion, + ZodDiscriminatedUnion, + ZodIntersection, + ZodTuple, + ZodRecord, + ZodMap, + ZodSet, + ZodFunction, + ZodLazy, + ZodLiteral, + ZodEnum, + ZodNativeEnum, + ZodPromise, + ZodEffects, + ZodTransformer: ZodEffects, + ZodOptional, + ZodNullable, + ZodDefault, + ZodCatch, + ZodNaN, + BRAND, + ZodBranded, + ZodPipeline, + ZodReadonly, + custom, + Schema: ZodType, + ZodSchema: ZodType, + late, + get ZodFirstPartyTypeKind() { + return ZodFirstPartyTypeKind; + }, + coerce, + any: anyType, + array: arrayType, + bigint: bigIntType, + boolean: booleanType, + date: dateType, + discriminatedUnion: discriminatedUnionType, + effect: effectsType, + enum: enumType, + function: functionType, + instanceof: instanceOfType, + intersection: intersectionType, + lazy: lazyType, + literal: literalType, + map: mapType, + nan: nanType, + nativeEnum: nativeEnumType, + never: neverType, + null: nullType, + nullable: nullableType, + number: numberType, + object: objectType, + oboolean, + onumber, + optional: optionalType, + ostring, + pipeline: pipelineType, + preprocess: preprocessType, + promise: promiseType, + record: recordType, + set: setType, + strictObject: strictObjectType, + string: stringType, + symbol: symbolType, + transformer: effectsType, + tuple: tupleType, + undefined: undefinedType, + union: unionType, + unknown: unknownType, + void: voidType, + NEVER, + ZodIssueCode, + quotelessJson, + ZodError +}); + +// src/workers/shared/zod.worker.ts +var HEX_REGEXP = /^[0-9a-f]*$/i, BASE64_REGEXP = /^[0-9a-z+/=]*$/i, HexDataSchema = z.string().regex(HEX_REGEXP).transform((hex) => Buffer.from(hex, "hex")), Base64DataSchema = z.string().regex(BASE64_REGEXP).transform((base64) => Buffer.from(base64, "base64")); +export { + BASE64_REGEXP, + Base64DataSchema, + HEX_REGEXP, + HexDataSchema, + z +}; +//# sourceMappingURL=zod.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/shared/zod.worker.js.map b/node_modules/miniflare/dist/src/workers/shared/zod.worker.js.map new file mode 100644 index 0000000..16da15e --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/shared/zod.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../src/workers/shared/zod.worker.ts", "../../../../../../node_modules/.pnpm/zod@3.22.3/node_modules/zod/lib/index.mjs"], + "mappings": ";AAAA,SAAS,cAAc;;;ACAvB,IAAI;AAAA,CACH,SAAUA,OAAM;AACb,EAAAA,MAAK,cAAc,CAAC,QAAQ;AAC5B,WAAS,SAAS,MAAM;AAAA,EAAE;AAC1B,EAAAA,MAAK,WAAW;AAChB,WAAS,YAAY,IAAI;AACrB,UAAM,IAAI,MAAM;AAAA,EACpB;AACA,EAAAA,MAAK,cAAc,aACnBA,MAAK,cAAc,CAAC,UAAU;AAC1B,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,EAC9B,OAAO,EACP,MAAM,aAAa,EACnB,UAAU,CAAC,WAAW,OAAO,KAAK,QAAQ,QAAQ,CAAC;", + "names": ["util", "objectUtil", "errorUtil", "errorMap", "ctx", "result", "issues", "elements", "processed", "ZodFirstPartyTypeKind"] +} diff --git a/node_modules/miniflare/dist/src/workers/workflows/binding.worker.js b/node_modules/miniflare/dist/src/workers/workflows/binding.worker.js new file mode 100644 index 0000000..1a85969 --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/workflows/binding.worker.js @@ -0,0 +1,2103 @@ +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty; +var __commonJS = (cb, mod) => function() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from == "object" || typeof from == "function") + for (let key of __getOwnPropNames(from)) + !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target, + mod +)); + +// ../../node_modules/.pnpm/heap-js@2.5.0/node_modules/heap-js/dist/heap-js.umd.js +var require_heap_js_umd = __commonJS({ + "../../node_modules/.pnpm/heap-js@2.5.0/node_modules/heap-js/dist/heap-js.umd.js"(exports, module) { + (function(global, factory) { + typeof exports == "object" && typeof module < "u" ? factory(exports) : typeof define == "function" && define.amd ? define(["exports"], factory) : (global = typeof globalThis < "u" ? globalThis : global || self, factory(global.heap = {})); + })(exports, function(exports2) { + "use strict"; + var __awaiter = function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator.throw(value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }, __generator$1 = function(thisArg, body) { + var _ = { label: 0, sent: function() { + if (t[0] & 1) throw t[1]; + return t[1]; + }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), throw: verb(1), return: verb(2) }, typeof Symbol == "function" && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n2) { + return function(v) { + return step([n2, v]); + }; + } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + for (; g && (g = 0, op[0] && (_ = 0)), _; ) try { + 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; + switch (y = 0, t && (op = [op[0] & 2, t.value]), op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + return _.label++, { value: op[1], done: !1 }; + case 5: + _.label++, y = op[1], op = [0]; + continue; + case 7: + op = _.ops.pop(), _.trys.pop(); + continue; + default: + if (t = _.trys, !(t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1], t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2], _.ops.push(op); + break; + } + t[2] && _.ops.pop(), _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } catch (e) { + op = [6, e], y = 0; + } finally { + f = t = 0; + } + if (op[0] & 5) throw op[1]; + return { value: op[0] ? op[1] : void 0, done: !0 }; + } + }, __read$1 = function(o, n2) { + var m = typeof Symbol == "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r2, ar = [], e; + try { + for (; (n2 === void 0 || n2-- > 0) && !(r2 = i.next()).done; ) ar.push(r2.value); + } catch (error) { + e = { error }; + } finally { + try { + r2 && !r2.done && (m = i.return) && m.call(i); + } finally { + if (e) throw e.error; + } + } + return ar; + }, __spreadArray$1 = function(to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) + (ar || !(i in from)) && (ar || (ar = Array.prototype.slice.call(from, 0, i)), ar[i] = from[i]); + return to.concat(ar || Array.prototype.slice.call(from)); + }, __values = function(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: function() { + return o && i >= o.length && (o = void 0), { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }, HeapAsync = ( + /** @class */ + function() { + function HeapAsync2(compare) { + compare === void 0 && (compare = HeapAsync2.minComparator); + var _this = this; + this.compare = compare, this.heapArray = [], this._limit = 0, this.offer = this.add, this.element = this.peek, this.poll = this.pop, this._invertedCompare = function(a, b) { + return _this.compare(a, b).then(function(res) { + return -1 * res; + }); + }; + } + return HeapAsync2.getChildrenIndexOf = function(idx) { + return [idx * 2 + 1, idx * 2 + 2]; + }, HeapAsync2.getParentIndexOf = function(idx) { + if (idx <= 0) + return -1; + var whichChildren = idx % 2 ? 1 : 2; + return Math.floor((idx - whichChildren) / 2); + }, HeapAsync2.getSiblingIndexOf = function(idx) { + if (idx <= 0) + return -1; + var whichChildren = idx % 2 ? 1 : -1; + return idx + whichChildren; + }, HeapAsync2.minComparator = function(a, b) { + return __awaiter(this, void 0, void 0, function() { + return __generator$1(this, function(_a) { + return a > b ? [2, 1] : a < b ? [2, -1] : [2, 0]; + }); + }); + }, HeapAsync2.maxComparator = function(a, b) { + return __awaiter(this, void 0, void 0, function() { + return __generator$1(this, function(_a) { + return b > a ? [2, 1] : b < a ? [2, -1] : [2, 0]; + }); + }); + }, HeapAsync2.minComparatorNumber = function(a, b) { + return __awaiter(this, void 0, void 0, function() { + return __generator$1(this, function(_a) { + return [2, a - b]; + }); + }); + }, HeapAsync2.maxComparatorNumber = function(a, b) { + return __awaiter(this, void 0, void 0, function() { + return __generator$1(this, function(_a) { + return [2, b - a]; + }); + }); + }, HeapAsync2.defaultIsEqual = function(a, b) { + return __awaiter(this, void 0, void 0, function() { + return __generator$1(this, function(_a) { + return [2, a === b]; + }); + }); + }, HeapAsync2.print = function(heap) { + function deep(i2) { + var pi = HeapAsync2.getParentIndexOf(i2); + return Math.floor(Math.log2(pi + 1)); + } + function repeat(str, times) { + for (var out = ""; times > 0; --times) + out += str; + return out; + } + for (var node = 0, lines = [], maxLines = deep(heap.length - 1) + 2, maxLength = 0; node < heap.length; ) { + var i = deep(node) + 1; + node === 0 && (i = 0); + var nodeText = String(heap.get(node)); + nodeText.length > maxLength && (maxLength = nodeText.length), lines[i] = lines[i] || [], lines[i].push(nodeText), node += 1; + } + return lines.map(function(line, i2) { + var times = Math.pow(2, maxLines - i2) - 1; + return repeat(" ", Math.floor(times / 2) * maxLength) + line.map(function(el) { + var half = (maxLength - el.length) / 2; + return repeat(" ", Math.ceil(half)) + el + repeat(" ", Math.floor(half)); + }).join(repeat(" ", times * maxLength)); + }).join(` +`); + }, HeapAsync2.heapify = function(arr, compare) { + return __awaiter(this, void 0, void 0, function() { + var heap; + return __generator$1(this, function(_a) { + switch (_a.label) { + case 0: + return heap = new HeapAsync2(compare), heap.heapArray = arr, [4, heap.init()]; + case 1: + return _a.sent(), [2, heap]; + } + }); + }); + }, HeapAsync2.heappop = function(heapArr, compare) { + var heap = new HeapAsync2(compare); + return heap.heapArray = heapArr, heap.pop(); + }, HeapAsync2.heappush = function(heapArr, item, compare) { + return __awaiter(this, void 0, void 0, function() { + var heap; + return __generator$1(this, function(_a) { + switch (_a.label) { + case 0: + return heap = new HeapAsync2(compare), heap.heapArray = heapArr, [4, heap.push(item)]; + case 1: + return _a.sent(), [ + 2 + /*return*/ + ]; + } + }); + }); + }, HeapAsync2.heappushpop = function(heapArr, item, compare) { + var heap = new HeapAsync2(compare); + return heap.heapArray = heapArr, heap.pushpop(item); + }, HeapAsync2.heapreplace = function(heapArr, item, compare) { + var heap = new HeapAsync2(compare); + return heap.heapArray = heapArr, heap.replace(item); + }, HeapAsync2.heaptop = function(heapArr, n2, compare) { + n2 === void 0 && (n2 = 1); + var heap = new HeapAsync2(compare); + return heap.heapArray = heapArr, heap.top(n2); + }, HeapAsync2.heapbottom = function(heapArr, n2, compare) { + n2 === void 0 && (n2 = 1); + var heap = new HeapAsync2(compare); + return heap.heapArray = heapArr, heap.bottom(n2); + }, HeapAsync2.nlargest = function(n2, iterable, compare) { + return __awaiter(this, void 0, void 0, function() { + var heap; + return __generator$1(this, function(_a) { + switch (_a.label) { + case 0: + return heap = new HeapAsync2(compare), heap.heapArray = __spreadArray$1([], __read$1(iterable), !1), [4, heap.init()]; + case 1: + return _a.sent(), [2, heap.top(n2)]; + } + }); + }); + }, HeapAsync2.nsmallest = function(n2, iterable, compare) { + return __awaiter(this, void 0, void 0, function() { + var heap; + return __generator$1(this, function(_a) { + switch (_a.label) { + case 0: + return heap = new HeapAsync2(compare), heap.heapArray = __spreadArray$1([], __read$1(iterable), !1), [4, heap.init()]; + case 1: + return _a.sent(), [2, heap.bottom(n2)]; + } + }); + }); + }, HeapAsync2.prototype.add = function(element) { + return __awaiter(this, void 0, void 0, function() { + return __generator$1(this, function(_a) { + switch (_a.label) { + case 0: + return [4, this._sortNodeUp(this.heapArray.push(element) - 1)]; + case 1: + return _a.sent(), this._applyLimit(), [2, !0]; + } + }); + }); + }, HeapAsync2.prototype.addAll = function(elements) { + return __awaiter(this, void 0, void 0, function() { + var i, l, _a; + return __generator$1(this, function(_b) { + switch (_b.label) { + case 0: + i = this.length, (_a = this.heapArray).push.apply(_a, __spreadArray$1([], __read$1(elements), !1)), l = this.length, _b.label = 1; + case 1: + return i < l ? [4, this._sortNodeUp(i)] : [3, 4]; + case 2: + _b.sent(), _b.label = 3; + case 3: + return ++i, [3, 1]; + case 4: + return this._applyLimit(), [2, !0]; + } + }); + }); + }, HeapAsync2.prototype.bottom = function(n2) { + return n2 === void 0 && (n2 = 1), __awaiter(this, void 0, void 0, function() { + return __generator$1(this, function(_a) { + return this.heapArray.length === 0 || n2 <= 0 ? [2, []] : this.heapArray.length === 1 ? [2, [this.heapArray[0]]] : n2 >= this.heapArray.length ? [2, __spreadArray$1([], __read$1(this.heapArray), !1)] : [2, this._bottomN_push(~~n2)]; + }); + }); + }, HeapAsync2.prototype.check = function() { + return __awaiter(this, void 0, void 0, function() { + var j, el, children, children_1, children_1_1, ch, e_1_1, e_1, _a; + return __generator$1(this, function(_b) { + switch (_b.label) { + case 0: + j = 0, _b.label = 1; + case 1: + if (!(j < this.heapArray.length)) return [3, 10]; + el = this.heapArray[j], children = this.getChildrenOf(j), _b.label = 2; + case 2: + _b.trys.push([2, 7, 8, 9]), children_1 = (e_1 = void 0, __values(children)), children_1_1 = children_1.next(), _b.label = 3; + case 3: + return children_1_1.done ? [3, 6] : (ch = children_1_1.value, [4, this.compare(el, ch)]); + case 4: + if (_b.sent() > 0) + return [2, el]; + _b.label = 5; + case 5: + return children_1_1 = children_1.next(), [3, 3]; + case 6: + return [3, 9]; + case 7: + return e_1_1 = _b.sent(), e_1 = { error: e_1_1 }, [3, 9]; + case 8: + try { + children_1_1 && !children_1_1.done && (_a = children_1.return) && _a.call(children_1); + } finally { + if (e_1) throw e_1.error; + } + return [ + 7 + /*endfinally*/ + ]; + case 9: + return ++j, [3, 1]; + case 10: + return [ + 2 + /*return*/ + ]; + } + }); + }); + }, HeapAsync2.prototype.clear = function() { + this.heapArray = []; + }, HeapAsync2.prototype.clone = function() { + var cloned = new HeapAsync2(this.comparator()); + return cloned.heapArray = this.toArray(), cloned._limit = this._limit, cloned; + }, HeapAsync2.prototype.comparator = function() { + return this.compare; + }, HeapAsync2.prototype.contains = function(o, fn) { + return fn === void 0 && (fn = HeapAsync2.defaultIsEqual), __awaiter(this, void 0, void 0, function() { + var _a, _b, el, e_2_1, e_2, _c; + return __generator$1(this, function(_d) { + switch (_d.label) { + case 0: + _d.trys.push([0, 5, 6, 7]), _a = __values(this.heapArray), _b = _a.next(), _d.label = 1; + case 1: + return _b.done ? [3, 4] : (el = _b.value, [4, fn(el, o)]); + case 2: + if (_d.sent()) + return [2, !0]; + _d.label = 3; + case 3: + return _b = _a.next(), [3, 1]; + case 4: + return [3, 7]; + case 5: + return e_2_1 = _d.sent(), e_2 = { error: e_2_1 }, [3, 7]; + case 6: + try { + _b && !_b.done && (_c = _a.return) && _c.call(_a); + } finally { + if (e_2) throw e_2.error; + } + return [ + 7 + /*endfinally*/ + ]; + case 7: + return [2, !1]; + } + }); + }); + }, HeapAsync2.prototype.init = function(array) { + return __awaiter(this, void 0, void 0, function() { + var i; + return __generator$1(this, function(_a) { + switch (_a.label) { + case 0: + array && (this.heapArray = __spreadArray$1([], __read$1(array), !1)), i = Math.floor(this.heapArray.length), _a.label = 1; + case 1: + return i >= 0 ? [4, this._sortNodeDown(i)] : [3, 4]; + case 2: + _a.sent(), _a.label = 3; + case 3: + return --i, [3, 1]; + case 4: + return this._applyLimit(), [ + 2 + /*return*/ + ]; + } + }); + }); + }, HeapAsync2.prototype.isEmpty = function() { + return this.length === 0; + }, HeapAsync2.prototype.leafs = function() { + if (this.heapArray.length === 0) + return []; + var pi = HeapAsync2.getParentIndexOf(this.heapArray.length - 1); + return this.heapArray.slice(pi + 1); + }, Object.defineProperty(HeapAsync2.prototype, "length", { + /** + * Length of the heap. + * @return {Number} + */ + get: function() { + return this.heapArray.length; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(HeapAsync2.prototype, "limit", { + /** + * Get length limit of the heap. + * @return {Number} + */ + get: function() { + return this._limit; + }, + /** + * Set length limit of the heap. + * @return {Number} + */ + set: function(_l) { + this._limit = ~~_l, this._applyLimit(); + }, + enumerable: !1, + configurable: !0 + }), HeapAsync2.prototype.peek = function() { + return this.heapArray[0]; + }, HeapAsync2.prototype.pop = function() { + return __awaiter(this, void 0, void 0, function() { + var last; + return __generator$1(this, function(_a) { + return last = this.heapArray.pop(), this.length > 0 && last !== void 0 ? [2, this.replace(last)] : [2, last]; + }); + }); + }, HeapAsync2.prototype.push = function() { + for (var elements = [], _i = 0; _i < arguments.length; _i++) + elements[_i] = arguments[_i]; + return __awaiter(this, void 0, void 0, function() { + return __generator$1(this, function(_a) { + return elements.length < 1 ? [2, !1] : elements.length === 1 ? [2, this.add(elements[0])] : [2, this.addAll(elements)]; + }); + }); + }, HeapAsync2.prototype.pushpop = function(element) { + return __awaiter(this, void 0, void 0, function() { + var _a; + return __generator$1(this, function(_b) { + switch (_b.label) { + case 0: + return [4, this.compare(this.heapArray[0], element)]; + case 1: + return _b.sent() < 0 ? (_a = __read$1([this.heapArray[0], element], 2), element = _a[0], this.heapArray[0] = _a[1], [4, this._sortNodeDown(0)]) : [3, 3]; + case 2: + _b.sent(), _b.label = 3; + case 3: + return [2, element]; + } + }); + }); + }, HeapAsync2.prototype.remove = function(o, fn) { + return fn === void 0 && (fn = HeapAsync2.defaultIsEqual), __awaiter(this, void 0, void 0, function() { + var idx, i; + return __generator$1(this, function(_a) { + switch (_a.label) { + case 0: + return this.length > 0 ? o !== void 0 ? [3, 2] : [4, this.pop()] : [3, 13]; + case 1: + return _a.sent(), [2, !0]; + case 2: + idx = -1, i = 0, _a.label = 3; + case 3: + return i < this.heapArray.length ? [4, fn(this.heapArray[i], o)] : [3, 6]; + case 4: + if (_a.sent()) + return idx = i, [3, 6]; + _a.label = 5; + case 5: + return ++i, [3, 3]; + case 6: + return idx >= 0 ? idx !== 0 ? [3, 8] : [4, this.pop()] : [3, 13]; + case 7: + return _a.sent(), [3, 12]; + case 8: + return idx !== this.length - 1 ? [3, 9] : (this.heapArray.pop(), [3, 12]); + case 9: + return this.heapArray.splice(idx, 1, this.heapArray.pop()), [4, this._sortNodeUp(idx)]; + case 10: + return _a.sent(), [4, this._sortNodeDown(idx)]; + case 11: + _a.sent(), _a.label = 12; + case 12: + return [2, !0]; + case 13: + return [2, !1]; + } + }); + }); + }, HeapAsync2.prototype.replace = function(element) { + return __awaiter(this, void 0, void 0, function() { + var peek; + return __generator$1(this, function(_a) { + switch (_a.label) { + case 0: + return peek = this.heapArray[0], this.heapArray[0] = element, [4, this._sortNodeDown(0)]; + case 1: + return _a.sent(), [2, peek]; + } + }); + }); + }, HeapAsync2.prototype.size = function() { + return this.length; + }, HeapAsync2.prototype.top = function(n2) { + return n2 === void 0 && (n2 = 1), __awaiter(this, void 0, void 0, function() { + return __generator$1(this, function(_a) { + return this.heapArray.length === 0 || n2 <= 0 ? [2, []] : this.heapArray.length === 1 || n2 === 1 ? [2, [this.heapArray[0]]] : n2 >= this.heapArray.length ? [2, __spreadArray$1([], __read$1(this.heapArray), !1)] : [2, this._topN_push(~~n2)]; + }); + }); + }, HeapAsync2.prototype.toArray = function() { + return __spreadArray$1([], __read$1(this.heapArray), !1); + }, HeapAsync2.prototype.toString = function() { + return this.heapArray.toString(); + }, HeapAsync2.prototype.get = function(i) { + return this.heapArray[i]; + }, HeapAsync2.prototype.getChildrenOf = function(idx) { + var _this = this; + return HeapAsync2.getChildrenIndexOf(idx).map(function(i) { + return _this.heapArray[i]; + }).filter(function(e) { + return e !== void 0; + }); + }, HeapAsync2.prototype.getParentOf = function(idx) { + var pi = HeapAsync2.getParentIndexOf(idx); + return this.heapArray[pi]; + }, HeapAsync2.prototype[Symbol.iterator] = function() { + return __generator$1(this, function(_a) { + switch (_a.label) { + case 0: + return this.length ? [4, this.pop()] : [3, 2]; + case 1: + return _a.sent(), [3, 0]; + case 2: + return [ + 2 + /*return*/ + ]; + } + }); + }, HeapAsync2.prototype.iterator = function() { + return this; + }, HeapAsync2.prototype._applyLimit = function() { + if (this._limit && this._limit < this.heapArray.length) + for (var rm = this.heapArray.length - this._limit; rm; ) + this.heapArray.pop(), --rm; + }, HeapAsync2.prototype._bottomN_push = function(n2) { + return __awaiter(this, void 0, void 0, function() { + var bottomHeap, startAt, parentStartAt, indices, i, arr, i; + return __generator$1(this, function(_a) { + switch (_a.label) { + case 0: + return bottomHeap = new HeapAsync2(this.compare), bottomHeap.limit = n2, bottomHeap.heapArray = this.heapArray.slice(-n2), [4, bottomHeap.init()]; + case 1: + for (_a.sent(), startAt = this.heapArray.length - 1 - n2, parentStartAt = HeapAsync2.getParentIndexOf(startAt), indices = [], i = startAt; i > parentStartAt; --i) + indices.push(i); + arr = this.heapArray, _a.label = 2; + case 2: + return indices.length ? (i = indices.shift(), [4, this.compare(arr[i], bottomHeap.peek())]) : [3, 6]; + case 3: + return _a.sent() > 0 ? [4, bottomHeap.replace(arr[i])] : [3, 5]; + case 4: + _a.sent(), i % 2 && indices.push(HeapAsync2.getParentIndexOf(i)), _a.label = 5; + case 5: + return [3, 2]; + case 6: + return [2, bottomHeap.toArray()]; + } + }); + }); + }, HeapAsync2.prototype._moveNode = function(j, k) { + var _a; + _a = __read$1([this.heapArray[k], this.heapArray[j]], 2), this.heapArray[j] = _a[0], this.heapArray[k] = _a[1]; + }, HeapAsync2.prototype._sortNodeDown = function(i) { + return __awaiter(this, void 0, void 0, function() { + var moveIt, self2, getPotentialParent, childrenIdx, bestChildIndex, j, bestChild, _a, _this = this; + return __generator$1(this, function(_b) { + switch (_b.label) { + case 0: + moveIt = i < this.heapArray.length - 1, self2 = this.heapArray[i], getPotentialParent = function(best, j2) { + return __awaiter(_this, void 0, void 0, function() { + var _a2; + return __generator$1(this, function(_b2) { + switch (_b2.label) { + case 0: + return _a2 = this.heapArray.length > j2, _a2 ? [4, this.compare(this.heapArray[j2], this.heapArray[best])] : [3, 2]; + case 1: + _a2 = _b2.sent() < 0, _b2.label = 2; + case 2: + return _a2 && (best = j2), [2, best]; + } + }); + }); + }, _b.label = 1; + case 1: + if (!moveIt) return [3, 8]; + childrenIdx = HeapAsync2.getChildrenIndexOf(i), bestChildIndex = childrenIdx[0], j = 1, _b.label = 2; + case 2: + return j < childrenIdx.length ? [4, getPotentialParent(bestChildIndex, childrenIdx[j])] : [3, 5]; + case 3: + bestChildIndex = _b.sent(), _b.label = 4; + case 4: + return ++j, [3, 2]; + case 5: + return bestChild = this.heapArray[bestChildIndex], _a = typeof bestChild < "u", _a ? [4, this.compare(self2, bestChild)] : [3, 7]; + case 6: + _a = _b.sent() > 0, _b.label = 7; + case 7: + return _a ? (this._moveNode(i, bestChildIndex), i = bestChildIndex) : moveIt = !1, [3, 1]; + case 8: + return [ + 2 + /*return*/ + ]; + } + }); + }); + }, HeapAsync2.prototype._sortNodeUp = function(i) { + return __awaiter(this, void 0, void 0, function() { + var moveIt, pi, _a; + return __generator$1(this, function(_b) { + switch (_b.label) { + case 0: + moveIt = i > 0, _b.label = 1; + case 1: + return moveIt ? (pi = HeapAsync2.getParentIndexOf(i), _a = pi >= 0, _a ? [4, this.compare(this.heapArray[pi], this.heapArray[i])] : [3, 3]) : [3, 4]; + case 2: + _a = _b.sent() > 0, _b.label = 3; + case 3: + return _a ? (this._moveNode(i, pi), i = pi) : moveIt = !1, [3, 1]; + case 4: + return [ + 2 + /*return*/ + ]; + } + }); + }); + }, HeapAsync2.prototype._topN_push = function(n2) { + return __awaiter(this, void 0, void 0, function() { + var topHeap, indices, arr, i; + return __generator$1(this, function(_a) { + switch (_a.label) { + case 0: + topHeap = new HeapAsync2(this._invertedCompare), topHeap.limit = n2, indices = [0], arr = this.heapArray, _a.label = 1; + case 1: + return indices.length ? (i = indices.shift(), i < arr.length ? topHeap.length < n2 ? [4, topHeap.push(arr[i])] : [3, 3] : [3, 6]) : [3, 7]; + case 2: + return _a.sent(), indices.push.apply(indices, __spreadArray$1([], __read$1(HeapAsync2.getChildrenIndexOf(i)), !1)), [3, 6]; + case 3: + return [4, this.compare(arr[i], topHeap.peek())]; + case 4: + return _a.sent() < 0 ? [4, topHeap.replace(arr[i])] : [3, 6]; + case 5: + _a.sent(), indices.push.apply(indices, __spreadArray$1([], __read$1(HeapAsync2.getChildrenIndexOf(i)), !1)), _a.label = 6; + case 6: + return [3, 1]; + case 7: + return [2, topHeap.toArray()]; + } + }); + }); + }, HeapAsync2.prototype._topN_fill = function(n2) { + return __awaiter(this, void 0, void 0, function() { + var heapArray, topHeap, branch, indices, i, i; + return __generator$1(this, function(_a) { + switch (_a.label) { + case 0: + return heapArray = this.heapArray, topHeap = new HeapAsync2(this._invertedCompare), topHeap.limit = n2, topHeap.heapArray = heapArray.slice(0, n2), [4, topHeap.init()]; + case 1: + for (_a.sent(), branch = HeapAsync2.getParentIndexOf(n2 - 1) + 1, indices = [], i = branch; i < n2; ++i) + indices.push.apply(indices, __spreadArray$1([], __read$1(HeapAsync2.getChildrenIndexOf(i).filter(function(l) { + return l < heapArray.length; + })), !1)); + (n2 - 1) % 2 && indices.push(n2), _a.label = 2; + case 2: + return indices.length ? (i = indices.shift(), i < heapArray.length ? [4, this.compare(heapArray[i], topHeap.peek())] : [3, 5]) : [3, 6]; + case 3: + return _a.sent() < 0 ? [4, topHeap.replace(heapArray[i])] : [3, 5]; + case 4: + _a.sent(), indices.push.apply(indices, __spreadArray$1([], __read$1(HeapAsync2.getChildrenIndexOf(i)), !1)), _a.label = 5; + case 5: + return [3, 2]; + case 6: + return [2, topHeap.toArray()]; + } + }); + }); + }, HeapAsync2.prototype._topN_heap = function(n2) { + return __awaiter(this, void 0, void 0, function() { + var topHeap, result, i, _a, _b; + return __generator$1(this, function(_c) { + switch (_c.label) { + case 0: + topHeap = this.clone(), result = [], i = 0, _c.label = 1; + case 1: + return i < n2 ? (_b = (_a = result).push, [4, topHeap.pop()]) : [3, 4]; + case 2: + _b.apply(_a, [_c.sent()]), _c.label = 3; + case 3: + return ++i, [3, 1]; + case 4: + return [2, result]; + } + }); + }); + }, HeapAsync2.prototype._topIdxOf = function(list) { + return __awaiter(this, void 0, void 0, function() { + var idx, top, i, comp; + return __generator$1(this, function(_a) { + switch (_a.label) { + case 0: + if (!list.length) + return [2, -1]; + idx = 0, top = list[idx], i = 1, _a.label = 1; + case 1: + return i < list.length ? [4, this.compare(list[i], top)] : [3, 4]; + case 2: + comp = _a.sent(), comp < 0 && (idx = i, top = list[i]), _a.label = 3; + case 3: + return ++i, [3, 1]; + case 4: + return [2, idx]; + } + }); + }); + }, HeapAsync2.prototype._topOf = function() { + for (var list = [], _i = 0; _i < arguments.length; _i++) + list[_i] = arguments[_i]; + return __awaiter(this, void 0, void 0, function() { + var heap; + return __generator$1(this, function(_a) { + switch (_a.label) { + case 0: + return heap = new HeapAsync2(this.compare), [4, heap.init(list)]; + case 1: + return _a.sent(), [2, heap.peek()]; + } + }); + }); + }, HeapAsync2; + }() + ), __generator = function(thisArg, body) { + var _ = { label: 0, sent: function() { + if (t[0] & 1) throw t[1]; + return t[1]; + }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), throw: verb(1), return: verb(2) }, typeof Symbol == "function" && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n2) { + return function(v) { + return step([n2, v]); + }; + } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + for (; g && (g = 0, op[0] && (_ = 0)), _; ) try { + 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; + switch (y = 0, t && (op = [op[0] & 2, t.value]), op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + return _.label++, { value: op[1], done: !1 }; + case 5: + _.label++, y = op[1], op = [0]; + continue; + case 7: + op = _.ops.pop(), _.trys.pop(); + continue; + default: + if (t = _.trys, !(t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1], t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2], _.ops.push(op); + break; + } + t[2] && _.ops.pop(), _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } catch (e) { + op = [6, e], y = 0; + } finally { + f = t = 0; + } + if (op[0] & 5) throw op[1]; + return { value: op[0] ? op[1] : void 0, done: !0 }; + } + }, __read = function(o, n2) { + var m = typeof Symbol == "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r2, ar = [], e; + try { + for (; (n2 === void 0 || n2-- > 0) && !(r2 = i.next()).done; ) ar.push(r2.value); + } catch (error) { + e = { error }; + } finally { + try { + r2 && !r2.done && (m = i.return) && m.call(i); + } finally { + if (e) throw e.error; + } + } + return ar; + }, __spreadArray = function(to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) + (ar || !(i in from)) && (ar || (ar = Array.prototype.slice.call(from, 0, i)), ar[i] = from[i]); + return to.concat(ar || Array.prototype.slice.call(from)); + }, toInt = function(n2) { + return ~~n2; + }, Heap2 = ( + /** @class */ + function() { + function Heap3(compare) { + compare === void 0 && (compare = Heap3.minComparator); + var _this = this; + this.compare = compare, this.heapArray = [], this._limit = 0, this.offer = this.add, this.element = this.peek, this.poll = this.pop, this.removeAll = this.clear, this._invertedCompare = function(a, b) { + return -1 * _this.compare(a, b); + }; + } + return Heap3.getChildrenIndexOf = function(idx) { + return [idx * 2 + 1, idx * 2 + 2]; + }, Heap3.getParentIndexOf = function(idx) { + if (idx <= 0) + return -1; + var whichChildren = idx % 2 ? 1 : 2; + return Math.floor((idx - whichChildren) / 2); + }, Heap3.getSiblingIndexOf = function(idx) { + if (idx <= 0) + return -1; + var whichChildren = idx % 2 ? 1 : -1; + return idx + whichChildren; + }, Heap3.minComparator = function(a, b) { + return a > b ? 1 : a < b ? -1 : 0; + }, Heap3.maxComparator = function(a, b) { + return b > a ? 1 : b < a ? -1 : 0; + }, Heap3.minComparatorNumber = function(a, b) { + return a - b; + }, Heap3.maxComparatorNumber = function(a, b) { + return b - a; + }, Heap3.defaultIsEqual = function(a, b) { + return a === b; + }, Heap3.print = function(heap) { + function deep(i2) { + var pi = Heap3.getParentIndexOf(i2); + return Math.floor(Math.log2(pi + 1)); + } + function repeat(str, times) { + for (var out = ""; times > 0; --times) + out += str; + return out; + } + for (var node = 0, lines = [], maxLines = deep(heap.length - 1) + 2, maxLength = 0; node < heap.length; ) { + var i = deep(node) + 1; + node === 0 && (i = 0); + var nodeText = String(heap.get(node)); + nodeText.length > maxLength && (maxLength = nodeText.length), lines[i] = lines[i] || [], lines[i].push(nodeText), node += 1; + } + return lines.map(function(line, i2) { + var times = Math.pow(2, maxLines - i2) - 1; + return repeat(" ", Math.floor(times / 2) * maxLength) + line.map(function(el) { + var half = (maxLength - el.length) / 2; + return repeat(" ", Math.ceil(half)) + el + repeat(" ", Math.floor(half)); + }).join(repeat(" ", times * maxLength)); + }).join(` +`); + }, Heap3.heapify = function(arr, compare) { + var heap = new Heap3(compare); + return heap.heapArray = arr, heap.init(), heap; + }, Heap3.heappop = function(heapArr, compare) { + var heap = new Heap3(compare); + return heap.heapArray = heapArr, heap.pop(); + }, Heap3.heappush = function(heapArr, item, compare) { + var heap = new Heap3(compare); + heap.heapArray = heapArr, heap.push(item); + }, Heap3.heappushpop = function(heapArr, item, compare) { + var heap = new Heap3(compare); + return heap.heapArray = heapArr, heap.pushpop(item); + }, Heap3.heapreplace = function(heapArr, item, compare) { + var heap = new Heap3(compare); + return heap.heapArray = heapArr, heap.replace(item); + }, Heap3.heaptop = function(heapArr, n2, compare) { + n2 === void 0 && (n2 = 1); + var heap = new Heap3(compare); + return heap.heapArray = heapArr, heap.top(n2); + }, Heap3.heapbottom = function(heapArr, n2, compare) { + n2 === void 0 && (n2 = 1); + var heap = new Heap3(compare); + return heap.heapArray = heapArr, heap.bottom(n2); + }, Heap3.nlargest = function(n2, iterable, compare) { + var heap = new Heap3(compare); + return heap.heapArray = __spreadArray([], __read(iterable), !1), heap.init(), heap.top(n2); + }, Heap3.nsmallest = function(n2, iterable, compare) { + var heap = new Heap3(compare); + return heap.heapArray = __spreadArray([], __read(iterable), !1), heap.init(), heap.bottom(n2); + }, Heap3.prototype.add = function(element) { + return this._sortNodeUp(this.heapArray.push(element) - 1), this._applyLimit(), !0; + }, Heap3.prototype.addAll = function(elements) { + var _a, i = this.length; + (_a = this.heapArray).push.apply(_a, __spreadArray([], __read(elements), !1)); + for (var l = this.length; i < l; ++i) + this._sortNodeUp(i); + return this._applyLimit(), !0; + }, Heap3.prototype.bottom = function(n2) { + return n2 === void 0 && (n2 = 1), this.heapArray.length === 0 || n2 <= 0 ? [] : this.heapArray.length === 1 ? [this.heapArray[0]] : n2 >= this.heapArray.length ? __spreadArray([], __read(this.heapArray), !1) : this._bottomN_push(~~n2); + }, Heap3.prototype.check = function() { + var _this = this; + return this.heapArray.find(function(el, j) { + return !!_this.getChildrenOf(j).find(function(ch) { + return _this.compare(el, ch) > 0; + }); + }); + }, Heap3.prototype.clear = function() { + this.heapArray = []; + }, Heap3.prototype.clone = function() { + var cloned = new Heap3(this.comparator()); + return cloned.heapArray = this.toArray(), cloned._limit = this._limit, cloned; + }, Heap3.prototype.comparator = function() { + return this.compare; + }, Heap3.prototype.contains = function(o, callbackFn) { + return callbackFn === void 0 && (callbackFn = Heap3.defaultIsEqual), this.indexOf(o, callbackFn) !== -1; + }, Heap3.prototype.init = function(array) { + array && (this.heapArray = __spreadArray([], __read(array), !1)); + for (var i = Math.floor(this.heapArray.length); i >= 0; --i) + this._sortNodeDown(i); + this._applyLimit(); + }, Heap3.prototype.isEmpty = function() { + return this.length === 0; + }, Heap3.prototype.indexOf = function(element, callbackFn) { + if (callbackFn === void 0 && (callbackFn = Heap3.defaultIsEqual), this.heapArray.length === 0) + return -1; + for (var indexes = [], currentIndex = 0; currentIndex < this.heapArray.length; ) { + var currentElement = this.heapArray[currentIndex]; + if (callbackFn(currentElement, element)) + return currentIndex; + this.compare(currentElement, element) <= 0 && indexes.push.apply(indexes, __spreadArray([], __read(Heap3.getChildrenIndexOf(currentIndex)), !1)), currentIndex = indexes.shift() || this.heapArray.length; + } + return -1; + }, Heap3.prototype.indexOfEvery = function(element, callbackFn) { + if (callbackFn === void 0 && (callbackFn = Heap3.defaultIsEqual), this.heapArray.length === 0) + return []; + for (var indexes = [], foundIndexes = [], currentIndex = 0; currentIndex < this.heapArray.length; ) { + var currentElement = this.heapArray[currentIndex]; + callbackFn(currentElement, element) ? (foundIndexes.push(currentIndex), indexes.push.apply(indexes, __spreadArray([], __read(Heap3.getChildrenIndexOf(currentIndex)), !1))) : this.compare(currentElement, element) <= 0 && indexes.push.apply(indexes, __spreadArray([], __read(Heap3.getChildrenIndexOf(currentIndex)), !1)), currentIndex = indexes.shift() || this.heapArray.length; + } + return foundIndexes; + }, Heap3.prototype.leafs = function() { + if (this.heapArray.length === 0) + return []; + var pi = Heap3.getParentIndexOf(this.heapArray.length - 1); + return this.heapArray.slice(pi + 1); + }, Object.defineProperty(Heap3.prototype, "length", { + /** + * Length of the heap. Aliases: {@link size}. + * @return {Number} + * @see size + */ + get: function() { + return this.heapArray.length; + }, + enumerable: !1, + configurable: !0 + }), Object.defineProperty(Heap3.prototype, "limit", { + /** + * Get length limit of the heap. + * Use {@link setLimit} or {@link limit} to set the limit. + * @return {Number} + * @see setLimit + */ + get: function() { + return this._limit; + }, + /** + * Set length limit of the heap. Same as using {@link setLimit}. + * @description If the heap is longer than the limit, the needed amount of leafs are removed. + * @param {Number} _l Limit, defaults to 0 (no limit). Negative, Infinity, or NaN values set the limit to 0. + * @see setLimit + */ + set: function(_l) { + _l < 0 || isNaN(_l) ? this._limit = 0 : this._limit = ~~_l, this._applyLimit(); + }, + enumerable: !1, + configurable: !0 + }), Heap3.prototype.setLimit = function(_l) { + return this.limit = _l, _l < 0 || isNaN(_l) ? NaN : this._limit; + }, Heap3.prototype.peek = function() { + return this.heapArray[0]; + }, Heap3.prototype.pop = function() { + var last = this.heapArray.pop(); + return this.length > 0 && last !== void 0 ? this.replace(last) : last; + }, Heap3.prototype.push = function() { + for (var elements = [], _i = 0; _i < arguments.length; _i++) + elements[_i] = arguments[_i]; + return elements.length < 1 ? !1 : elements.length === 1 ? this.add(elements[0]) : this.addAll(elements); + }, Heap3.prototype.pushpop = function(element) { + var _a; + return this.compare(this.heapArray[0], element) < 0 && (_a = __read([this.heapArray[0], element], 2), element = _a[0], this.heapArray[0] = _a[1], this._sortNodeDown(0)), element; + }, Heap3.prototype.remove = function(o, callbackFn) { + if (callbackFn === void 0 && (callbackFn = Heap3.defaultIsEqual), this.length > 0) { + if (o === void 0) + return this.pop(), !0; + var idx = this.indexOf(o, callbackFn); + if (idx >= 0) + return idx === 0 ? this.pop() : idx === this.length - 1 ? this.heapArray.pop() : (this.heapArray.splice(idx, 1, this.heapArray.pop()), this._sortNodeUp(idx), this._sortNodeDown(idx)), !0; + } + return !1; + }, Heap3.prototype.replace = function(element) { + var peek = this.heapArray[0]; + return this.heapArray[0] = element, this._sortNodeDown(0), peek; + }, Heap3.prototype.size = function() { + return this.length; + }, Heap3.prototype.top = function(n2) { + return n2 === void 0 && (n2 = 1), this.heapArray.length === 0 || n2 <= 0 ? [] : this.heapArray.length === 1 || n2 === 1 ? [this.heapArray[0]] : n2 >= this.heapArray.length ? __spreadArray([], __read(this.heapArray), !1) : this._topN_push(~~n2); + }, Heap3.prototype.toArray = function() { + return __spreadArray([], __read(this.heapArray), !1); + }, Heap3.prototype.toString = function() { + return this.heapArray.toString(); + }, Heap3.prototype.get = function(i) { + return this.heapArray[i]; + }, Heap3.prototype.getChildrenOf = function(idx) { + var _this = this; + return Heap3.getChildrenIndexOf(idx).map(function(i) { + return _this.heapArray[i]; + }).filter(function(e) { + return e !== void 0; + }); + }, Heap3.prototype.getParentOf = function(idx) { + var pi = Heap3.getParentIndexOf(idx); + return this.heapArray[pi]; + }, Heap3.prototype[Symbol.iterator] = function() { + return __generator(this, function(_a) { + switch (_a.label) { + case 0: + return this.length ? [4, this.pop()] : [3, 2]; + case 1: + return _a.sent(), [3, 0]; + case 2: + return [ + 2 + /*return*/ + ]; + } + }); + }, Heap3.prototype.iterator = function() { + return this.toArray(); + }, Heap3.prototype._applyLimit = function() { + if (this._limit > 0 && this._limit < this.heapArray.length) + for (var rm = this.heapArray.length - this._limit; rm; ) + this.heapArray.pop(), --rm; + }, Heap3.prototype._bottomN_push = function(n2) { + var bottomHeap = new Heap3(this.compare); + bottomHeap.limit = n2, bottomHeap.heapArray = this.heapArray.slice(-n2), bottomHeap.init(); + for (var startAt = this.heapArray.length - 1 - n2, parentStartAt = Heap3.getParentIndexOf(startAt), indices = [], i = startAt; i > parentStartAt; --i) + indices.push(i); + for (var arr = this.heapArray; indices.length; ) { + var i = indices.shift(); + this.compare(arr[i], bottomHeap.peek()) > 0 && (bottomHeap.replace(arr[i]), i % 2 && indices.push(Heap3.getParentIndexOf(i))); + } + return bottomHeap.toArray(); + }, Heap3.prototype._moveNode = function(j, k) { + var _a; + _a = __read([this.heapArray[k], this.heapArray[j]], 2), this.heapArray[j] = _a[0], this.heapArray[k] = _a[1]; + }, Heap3.prototype._sortNodeDown = function(i) { + for (var _this = this, moveIt = i < this.heapArray.length - 1, self2 = this.heapArray[i], getPotentialParent = function(best, j) { + return _this.heapArray.length > j && _this.compare(_this.heapArray[j], _this.heapArray[best]) < 0 && (best = j), best; + }; moveIt; ) { + var childrenIdx = Heap3.getChildrenIndexOf(i), bestChildIndex = childrenIdx.reduce(getPotentialParent, childrenIdx[0]), bestChild = this.heapArray[bestChildIndex]; + typeof bestChild < "u" && this.compare(self2, bestChild) > 0 ? (this._moveNode(i, bestChildIndex), i = bestChildIndex) : moveIt = !1; + } + }, Heap3.prototype._sortNodeUp = function(i) { + for (var moveIt = i > 0; moveIt; ) { + var pi = Heap3.getParentIndexOf(i); + pi >= 0 && this.compare(this.heapArray[pi], this.heapArray[i]) > 0 ? (this._moveNode(i, pi), i = pi) : moveIt = !1; + } + }, Heap3.prototype._topN_push = function(n2) { + var topHeap = new Heap3(this._invertedCompare); + topHeap.limit = n2; + for (var indices = [0], arr = this.heapArray; indices.length; ) { + var i = indices.shift(); + i < arr.length && (topHeap.length < n2 ? (topHeap.push(arr[i]), indices.push.apply(indices, __spreadArray([], __read(Heap3.getChildrenIndexOf(i)), !1))) : this.compare(arr[i], topHeap.peek()) < 0 && (topHeap.replace(arr[i]), indices.push.apply(indices, __spreadArray([], __read(Heap3.getChildrenIndexOf(i)), !1)))); + } + return topHeap.toArray(); + }, Heap3.prototype._topN_fill = function(n2) { + var heapArray = this.heapArray, topHeap = new Heap3(this._invertedCompare); + topHeap.limit = n2, topHeap.heapArray = heapArray.slice(0, n2), topHeap.init(); + for (var branch = Heap3.getParentIndexOf(n2 - 1) + 1, indices = [], i = branch; i < n2; ++i) + indices.push.apply(indices, __spreadArray([], __read(Heap3.getChildrenIndexOf(i).filter(function(l) { + return l < heapArray.length; + })), !1)); + for ((n2 - 1) % 2 && indices.push(n2); indices.length; ) { + var i = indices.shift(); + i < heapArray.length && this.compare(heapArray[i], topHeap.peek()) < 0 && (topHeap.replace(heapArray[i]), indices.push.apply(indices, __spreadArray([], __read(Heap3.getChildrenIndexOf(i)), !1))); + } + return topHeap.toArray(); + }, Heap3.prototype._topN_heap = function(n2) { + for (var topHeap = this.clone(), result = [], i = 0; i < n2; ++i) + result.push(topHeap.pop()); + return result; + }, Heap3.prototype._topIdxOf = function(list) { + if (!list.length) + return -1; + for (var idx = 0, top = list[idx], i = 1; i < list.length; ++i) { + var comp = this.compare(list[i], top); + comp < 0 && (idx = i, top = list[i]); + } + return idx; + }, Heap3.prototype._topOf = function() { + for (var list = [], _i = 0; _i < arguments.length; _i++) + list[_i] = arguments[_i]; + var heap = new Heap3(this.compare); + return heap.init(list), heap.peek(); + }, Heap3; + }() + ); + exports2.Heap = Heap2, exports2.HeapAsync = HeapAsync, exports2.default = Heap2, exports2.toInt = toInt, Object.defineProperty(exports2, "__esModule", { value: !0 }); + }); + } +}); + +// ../workflows-shared/src/binding.ts +import { RpcTarget, WorkerEntrypoint } from "cloudflare:workers"; + +// ../workflows-shared/src/instance.ts +var INSTANCE_METADATA = "INSTANCE_METADATA"; +function instanceStatusName(status) { + switch (status) { + case 0 /* Queued */: + return "queued"; + case 1 /* Running */: + return "running"; + case 2 /* Paused */: + return "paused"; + case 3 /* Errored */: + return "errored"; + case 4 /* Terminated */: + return "terminated"; + case 5 /* Complete */: + return "complete"; + default: + return "unknown"; + } +} + +// ../workflows-shared/src/binding.ts +var WorkflowBinding = class extends WorkerEntrypoint { + async create({ + id = crypto.randomUUID(), + params = {} + } = {}) { + let stubId = this.env.ENGINE.idFromName(id), stub = this.env.ENGINE.get(stubId); + stub.init( + 0, + // accountId: number, + {}, + // workflow: DatabaseWorkflow, + {}, + // version: DatabaseVersion, + { id }, + // instance: DatabaseInstance, + { + timestamp: /* @__PURE__ */ new Date(), + payload: params, + instanceId: id + } + ); + let handle = new WorkflowHandle(id, stub); + return { + id, + pause: handle.pause.bind(handle), + resume: handle.resume.bind(handle), + terminate: handle.terminate.bind(handle), + restart: handle.restart.bind(handle), + status: handle.status.bind(handle), + sendEvent: handle.sendEvent.bind(handle) + }; + } + async get(id) { + let engineStubId = this.env.ENGINE.idFromName(id), engineStub = this.env.ENGINE.get(engineStubId), handle = new WorkflowHandle(id, engineStub); + try { + await handle.status(); + } catch { + throw new Error("instance.not_found"); + } + return { + id, + pause: handle.pause.bind(handle), + resume: handle.resume.bind(handle), + terminate: handle.terminate.bind(handle), + restart: handle.restart.bind(handle), + status: handle.status.bind(handle), + sendEvent: handle.sendEvent.bind(handle) + }; + } + async createBatch(batch) { + if (batch.length === 0) + throw new Error( + "WorkflowError: batchCreate should have at least 1 instance" + ); + return await Promise.all(batch.map((val) => this.create(val))); + } +}, WorkflowHandle = class extends RpcTarget { + constructor(id, stub) { + super(); + this.id = id; + this.stub = stub; + } + async pause() { + throw new Error("Not implemented yet"); + } + async resume() { + throw new Error("Not implemented yet"); + } + async terminate() { + throw new Error("Not implemented yet"); + } + async restart() { + throw new Error("Not implemented yet"); + } + async status() { + let status = await this.stub.getStatus(0, this.id), { logs } = await this.stub.readLogs(), workflowSuccessEvent = logs.filter((log) => log.event === 2 /* WORKFLOW_SUCCESS */).at(0), stepOutputs = logs.filter( + (log) => log.event === 6 /* STEP_SUCCESS */ || log.event === 15 /* WAIT_COMPLETE */ + ).map( + (log) => log.event === 6 /* STEP_SUCCESS */ ? log.metadata.result : log.metadata.payload + ), workflowOutput = workflowSuccessEvent !== void 0 ? workflowSuccessEvent.metadata.result : null; + return { + status: instanceStatusName(status), + __LOCAL_DEV_STEP_OUTPUTS: stepOutputs, + // @ts-expect-error types are wrong, will remove this expect-error once I fix them + output: workflowOutput + }; + } + async sendEvent(args) { + await this.stub.receiveEvent({ + payload: args.payload, + type: args.type, + timestamp: /* @__PURE__ */ new Date() + }); + } +}; + +// ../workflows-shared/src/engine.ts +import { DurableObject } from "cloudflare:workers"; + +// ../workflows-shared/src/context.ts +import { RpcTarget as RpcTarget2 } from "cloudflare:workers"; + +// ../../node_modules/.pnpm/itty-time@1.0.6/node_modules/itty-time/index.mjs +var n = { year: 315576e5, month: 2592e6, week: 6048e5, day: 864e5, hour: 36e5, minute: 6e4, second: 1e3, m: 1 }, r = (e) => { + if (+e) return +e; + let [, t, r2] = e.match(/^([^ ]+) +(\w\w*?)s?$/) || []; + return +t * (n[r2] || 1); +}; + +// ../workflows-shared/src/lib/cache.ts +async function computeHash(value) { + let msgUint8 = new TextEncoder().encode(value), hashBuffer = await crypto.subtle.digest("SHA-1", msgUint8); + return Array.from(new Uint8Array(hashBuffer)).map((b) => b.toString(16).padStart(2, "0")).join(""); +} + +// ../workflows-shared/src/lib/errors.ts +var WorkflowTimeoutError = class extends Error { + name = "WorkflowTimeoutError"; +}, WorkflowInternalError = class extends Error { + name = "WorkflowInternalError"; +}, WorkflowFatalError = class extends Error { + name = "WorkflowFatalError"; + toJSON() { + return { + name: this.name, + message: this.message + }; + } +}; + +// ../workflows-shared/src/lib/retries.ts +function calcRetryDuration(config, stepState) { + let { attemptedCount: attemptCount } = stepState, { retries } = config, delay = r(retries.delay); + switch (retries.backoff) { + case "exponential": + return delay * Math.pow(2, attemptCount - 1); + case "linear": + return delay * attemptCount; + case "constant": + default: + return delay; + } +} + +// ../workflows-shared/src/lib/validators.ts +var CONTROL_CHAR_REGEX = new RegExp("[\0-]"); +function validateStepName(string) { + return string.length > 256 ? !1 : !CONTROL_CHAR_REGEX.test(string); +} + +// ../workflows-shared/src/context.ts +var defaultConfig = { + retries: { + limit: 5, + delay: 1e3, + backoff: "constant" + }, + timeout: "15 minutes" +}, Context = class extends RpcTarget2 { + #engine; + #state; + #counters = /* @__PURE__ */ new Map(); + constructor(engine, state) { + super(), this.#engine = engine, this.#state = state; + } + #getCount(name) { + let val = this.#counters.get(name) ?? 0; + return val++, this.#counters.set(name, val), val; + } + async do(name, configOrCallback, callback) { + let closure, stepConfig; + if (callback ? (closure = callback, stepConfig = configOrCallback) : (closure = configOrCallback, stepConfig = {}), !validateStepName(name)) { + let error = new WorkflowFatalError( + `Step name "${name}" exceeds max length (${256} chars) or invalid characters found` + ); + throw error.isUserError = !0, error; + } + let config = { + ...defaultConfig, + ...stepConfig, + retries: { + ...defaultConfig.retries, + ...stepConfig.retries + } + }, hash = await computeHash(name), count = this.#getCount("run-" + name), cacheKey = `${hash}-${count}`, valueKey = `${cacheKey}-value`, configKey = `${cacheKey}-config`, errorKey = `${cacheKey}-error`, stepNameWithCounter = `${name}-${count}`, stepStateKey = `${cacheKey}-metadata`, maybeMap = await this.#state.storage.get([valueKey, configKey]), maybeResult = maybeMap.get(valueKey); + if (maybeResult) + return maybeResult.value; + let maybeError = maybeMap.get( + errorKey + ); + if (maybeError) + throw maybeError.isUserError = !0, maybeError; + maybeMap.has(configKey) ? config = maybeMap.get(configKey) : await this.#state.storage.put(configKey, config); + let attemptLogs = this.#engine.readLogsFromStep(cacheKey).filter( + (val) => [ + 11 /* ATTEMPT_SUCCESS */, + 12 /* ATTEMPT_FAILURE */, + 10 /* ATTEMPT_START */ + ].includes(val.event) + ); + if (attemptLogs.length > 0 && attemptLogs.at(-1)?.event === 10 /* ATTEMPT_START */) { + let stepState = await this.#state.storage.get( + stepStateKey + ) ?? { + attemptedCount: 1 + }, priorityQueueHash = `${cacheKey}-${stepState.attemptedCount}`, timeoutEntryPQ = this.#engine.priorityQueue.getFirst( + (a) => a.hash === priorityQueueHash && a.type === "timeout" + ); + timeoutEntryPQ !== void 0 && this.#engine.priorityQueue.remove(timeoutEntryPQ), this.#engine.writeLog( + 12 /* ATTEMPT_FAILURE */, + cacheKey, + stepNameWithCounter, + { + attempt: stepState.attemptedCount, + error: { + name: "WorkflowInternalError", + message: "Attempt failed due to internal workflows error" + } + } + ), await this.#state.storage.put(stepStateKey, stepState); + } + let doWrapper = async (doWrapperClosure) => { + let stepState = await this.#state.storage.get( + stepStateKey + ) ?? { + attemptedCount: 0 + }; + if (await this.#engine.timeoutHandler.acquire(this.#engine), stepState.attemptedCount == 0) + this.#engine.writeLog( + 5 /* STEP_START */, + cacheKey, + stepNameWithCounter, + { + config + } + ); + else { + let priorityQueueHash = `${cacheKey}-${stepState.attemptedCount}`, retryEntryPQ = this.#engine.priorityQueue.getFirst( + (a) => a.hash === priorityQueueHash && a.type === "retry" + ); + retryEntryPQ !== void 0 && (await this.#engine.timeoutHandler.release(this.#engine), await scheduler.wait(retryEntryPQ.targetTimestamp - Date.now()), await this.#engine.timeoutHandler.acquire(this.#engine), this.#engine.priorityQueue.remove({ + hash: priorityQueueHash, + type: "retry" + })); + } + let result, instanceMetadata = await this.#state.storage.get(INSTANCE_METADATA); + if (!instanceMetadata) + throw new Error("instanceMetadata is undefined"); + let { accountId, instance } = instanceMetadata; + try { + let timeoutPromise = async () => { + let priorityQueueHash2 = `${cacheKey}-${stepState.attemptedCount}`, timeout = r(config.timeout); + throw await this.#engine.priorityQueue.add({ + hash: priorityQueueHash2, + targetTimestamp: Date.now() + timeout, + type: "timeout" + }), await scheduler.wait(timeout), await this.#engine.priorityQueue.remove({ + hash: priorityQueueHash2, + type: "timeout" + }), new WorkflowTimeoutError( + `Execution timed out after ${timeout}ms` + ); + }; + this.#engine.writeLog( + 10 /* ATTEMPT_START */, + cacheKey, + stepNameWithCounter, + { + attempt: stepState.attemptedCount + 1 + } + ), stepState.attemptedCount++, await this.#state.storage.put(stepStateKey, stepState); + let priorityQueueHash = `${cacheKey}-${stepState.attemptedCount}`; + result = await Promise.race([doWrapperClosure(), timeoutPromise()]), await this.#engine.priorityQueue.remove({ + hash: priorityQueueHash, + type: "timeout" + }); + try { + await this.#state.storage.put(valueKey, { value: result }); + } catch (e) { + if (e instanceof Error && e.name === "DataCloneError") + this.#engine.writeLog( + 12 /* ATTEMPT_FAILURE */, + cacheKey, + stepNameWithCounter, + { + attempt: stepState.attemptedCount, + error: new WorkflowFatalError( + `Value returned from step "${name}" is not serialisable` + ) + } + ), this.#engine.writeLog( + 7 /* STEP_FAILURE */, + cacheKey, + stepNameWithCounter, + {} + ), this.#engine.writeLog(3 /* WORKFLOW_FAILURE */, null, null, { + error: new WorkflowFatalError( + `The execution of the Workflow instance was terminated, as the step "${name}" returned a value which is not serialisable` + ) + }), await this.#engine.setStatus( + accountId, + instance.id, + 3 /* Errored */ + ), await this.#engine.timeoutHandler.release(this.#engine), await this.#engine.abort("Value is not serialisable"); + else + throw new WorkflowInternalError( + `Storage failure for ${valueKey}: ${e} ` + ); + return; + } + this.#engine.writeLog( + 11 /* ATTEMPT_SUCCESS */, + cacheKey, + stepNameWithCounter, + { + attempt: stepState.attemptedCount + } + ); + } catch (e) { + let error = e; + if (this.#engine.priorityQueue.remove({ + hash: `${cacheKey}-${stepState.attemptedCount}`, + type: "timeout" + }), e instanceof Error && (error.name === "NonRetryableError" || error.message.startsWith("NonRetryableError:"))) + throw this.#engine.writeLog( + 12 /* ATTEMPT_FAILURE */, + cacheKey, + stepNameWithCounter, + { + attempt: stepState.attemptedCount, + error: new WorkflowFatalError( + `Step threw a NonRetryableError with message "${e.message}"` + ) + } + ), this.#engine.writeLog( + 7 /* STEP_FAILURE */, + cacheKey, + stepNameWithCounter, + {} + ), error; + if (this.#engine.writeLog( + 12 /* ATTEMPT_FAILURE */, + cacheKey, + stepNameWithCounter, + { + attempt: stepState.attemptedCount, + error: { + name: error.name, + message: error.message + // TODO (WOR-79): Stacks are all incorrect over RPC and need work + // stack: error.stack, + } + } + ), await this.#state.storage.put(stepStateKey, stepState), stepState.attemptedCount <= config.retries.limit) { + let durationMs = calcRetryDuration(config, stepState), priorityQueueHash = `${cacheKey}-${stepState.attemptedCount}`; + return await this.#engine.priorityQueue.add({ + hash: priorityQueueHash, + targetTimestamp: Date.now() + durationMs, + type: "retry" + }), await this.#engine.timeoutHandler.release(this.#engine), await scheduler.wait(durationMs), this.#engine.priorityQueue.remove({ + hash: priorityQueueHash, + type: "retry" + }), doWrapper(doWrapperClosure); + } else + throw await this.#engine.timeoutHandler.release(this.#engine), this.#engine.writeLog( + 7 /* STEP_FAILURE */, + cacheKey, + stepNameWithCounter, + {} + ), await this.#state.storage.put(errorKey, error), error; + } + return this.#engine.writeLog( + 6 /* STEP_SUCCESS */, + cacheKey, + stepNameWithCounter, + { + // TODO (WOR-86): Add limits, figure out serialization + result + } + ), await this.#engine.timeoutHandler.release(this.#engine), result; + }; + return doWrapper(closure); + } + async sleep(name, duration) { + typeof duration == "string" && (duration = r(duration)); + let hash = await computeHash(name + duration.toString()), count = this.#getCount("sleep-" + name + duration.toString()), cacheKey = `${hash}-${count}`, sleepNameWithCounter = `${name}-${count}`, sleepKey = `${cacheKey}-value`, sleepLogWrittenKey = `${cacheKey}-log-written`; + if (await this.#state.storage.get(sleepKey) != null) { + let entryPQ = this.#engine.priorityQueue.getFirst( + (a) => a.hash === cacheKey && a.type === "sleep" + ); + entryPQ !== void 0 && (await scheduler.wait(entryPQ.targetTimestamp - Date.now()), this.#engine.priorityQueue.remove({ hash: cacheKey, type: "sleep" })), await this.#state.storage.get(sleepLogWrittenKey) == null && (this.#engine.writeLog( + 9 /* SLEEP_COMPLETE */, + cacheKey, + sleepNameWithCounter, + {} + ), await this.#state.storage.put(sleepLogWrittenKey, !0)); + return; + } + if (this.#engine.writeLog( + 8 /* SLEEP_START */, + cacheKey, + sleepNameWithCounter, + { + durationMs: duration + } + ), !await this.#state.storage.get(INSTANCE_METADATA)) + throw new Error("instanceMetadata is undefined"); + await this.#state.storage.put(sleepKey, !0), await this.#engine.priorityQueue.add({ + hash: cacheKey, + targetTimestamp: Date.now() + duration, + type: "sleep" + }), await scheduler.wait(duration), this.#engine.writeLog( + 9 /* SLEEP_COMPLETE */, + cacheKey, + sleepNameWithCounter, + {} + ), await this.#state.storage.put(sleepLogWrittenKey, !0), this.#engine.priorityQueue.remove({ hash: cacheKey, type: "sleep" }); + } + async sleepUntil(name, timestamp) { + timestamp instanceof Date && (timestamp = timestamp.valueOf()); + let now = Date.now(); + if (timestamp < now) + throw new Error( + "You can't sleep until a time in the past, time-traveler" + ); + return this.sleep(name, timestamp - now); + } + async waitForEvent(name, options) { + options.timeout || (options.timeout = "24 hours"); + let count = this.#getCount("waitForEvent-" + name), waitForEventNameWithCounter = `${name}-${count}`, cacheKey = `${await computeHash(waitForEventNameWithCounter)}-${count}`, waitForEventKey = `${cacheKey}-value`, errorKey = `${cacheKey}-error`, pendingWaiterRegistered = `${cacheKey}-pending`, timeoutError = new WorkflowTimeoutError( + `Execution timed out after ${r(options.timeout)}ms` + ), maybeResult = await this.#state.storage.get(waitForEventKey); + if (maybeResult) + return await this.#state.storage.get(waitForEventKey) == null && this.#engine.writeLog( + 15 /* WAIT_COMPLETE */, + cacheKey, + waitForEventNameWithCounter, + maybeResult + ), maybeResult; + let maybeError = await this.#state.storage.get(errorKey); + if (maybeError) + throw maybeError.isUserError = !0, maybeError; + await this.#state.storage.get( + pendingWaiterRegistered + ) || (this.#engine.writeLog( + 14 /* WAIT_START */, + cacheKey, + waitForEventNameWithCounter, + { + event: options.type + } + ), await this.#state.storage.put(pendingWaiterRegistered, !0)); + let timeoutEntryPQ = this.#engine.priorityQueue.getFirst( + (a) => a.hash === cacheKey && a.type === "timeout" + ); + if (timeoutEntryPQ === void 0 && this.#engine.priorityQueue !== void 0 && this.#engine.priorityQueue.checkIfExistedInPast({ + hash: cacheKey, + type: "timeout" + }) || timeoutEntryPQ !== void 0 && timeoutEntryPQ.targetTimestamp < Date.now()) + throw this.#engine.writeLog( + 16 /* WAIT_TIMED_OUT */, + cacheKey, + waitForEventNameWithCounter, + { + name: timeoutError.name, + message: timeoutError.message + } + ), await this.#state.storage.put(errorKey, timeoutError), timeoutError; + let timeoutPromise = async (timeoutToWait, addToPQ) => { + let priorityQueueHash = cacheKey; + addToPQ && await this.#engine.priorityQueue.add({ + hash: priorityQueueHash, + targetTimestamp: Date.now() + timeoutToWait, + type: "timeout" + }), await scheduler.wait(timeoutToWait), this.#engine.priorityQueue.remove({ + hash: priorityQueueHash, + type: "timeout" + }); + let error = timeoutError; + throw error.isUserError = !0, error; + }, eventPromise = new Promise((resolve) => { + let eventTypeQueue = this.#engine.eventMap.get(options.type); + if (eventTypeQueue) { + let event = eventTypeQueue.shift(); + if (event) + return this.#engine.eventMap.set(options.type, eventTypeQueue), resolve(event); + } + let callbacks = this.#engine.waiters.get(options.type) ?? []; + callbacks.push(resolve), this.#engine.waiters.set(options.type, callbacks); + }); + return await Promise.race([ + eventPromise, + timeoutEntryPQ !== void 0 ? timeoutPromise(timeoutEntryPQ.targetTimestamp - Date.now(), !1) : timeoutPromise(r(options.timeout), !0) + ]).then(async (event) => (console.log(event), this.#engine.writeLog( + 15 /* WAIT_COMPLETE */, + cacheKey, + waitForEventNameWithCounter, + event + ), await this.#state.storage.put(waitForEventKey, event), event)).catch(async (error) => { + throw this.#engine.writeLog( + 16 /* WAIT_TIMED_OUT */, + cacheKey, + waitForEventNameWithCounter, + error + ), await this.#state.storage.put(errorKey, error), error; + }); + } +}; + +// ../workflows-shared/src/lib/gracePeriodSemaphore.ts +var ENGINE_TIMEOUT = r("5 minutes"), latestGracePeriodTimestamp, GracePeriodSemaphore = class { + #counter = 0; + callback; + timeoutMs; + constructor(callback, timeoutMs) { + this.callback = callback, this.timeoutMs = timeoutMs; + } + // acquire takes engine to be the same as release + async acquire(_engine) { + this.#counter == 0 && (latestGracePeriodTimestamp = void 0), this.#counter += 1; + } + async release(engine) { + this.#counter = Math.max(this.#counter - 1, 0), this.#counter == 0 && this.callback(engine, this.timeoutMs); + } + isRunningStep() { + return this.#counter > 0; + } +}, startGracePeriod = async (engine, timeoutMs) => { + (async () => { + let thisTimestamp = (/* @__PURE__ */ new Date()).valueOf(); + if (!(latestGracePeriodTimestamp === void 0 || latestGracePeriodTimestamp < thisTimestamp)) + throw new Error( + "Can't start grace period since there is already an active one started on " + latestGracePeriodTimestamp + ); + latestGracePeriodTimestamp = thisTimestamp, await scheduler.wait(timeoutMs), !(thisTimestamp !== latestGracePeriodTimestamp || engine.timeoutHandler.isRunningStep()) && (await engine.priorityQueue?.handleNextAlarm(), await engine.abort("Grace period complete")); + })(); +}; + +// ../workflows-shared/src/lib/timePriorityQueue.ts +var import_heap_js = __toESM(require_heap_js_umd()), wakerPriorityEntryComparator = (a, b) => a.targetTimestamp - b.targetTimestamp; +var TimePriorityQueue = class { + #heap = new import_heap_js.default(wakerPriorityEntryComparator); + // #env: Env; + #ctx; + #instanceMetadata; + constructor(ctx, instanceMetadata) { + this.#ctx = ctx, this.#instanceMetadata = instanceMetadata, this.#heap.init(this.getEntries()); + } + popPastEntries() { + if (this.#heap.length === 0) + return; + let res = [], currentTimestamp = (/* @__PURE__ */ new Date()).valueOf(); + for (; ; ) { + let element = this.#heap.peek(); + if (element === void 0 || element.targetTimestamp > currentTimestamp) + break; + res.push(element), this.#heap.pop(); + } + return this.#ctx.storage.transactionSync(() => { + for (let entry of res) + this.removeEntryDB(entry); + }), res; + } + /** + * `add` is ran using a transaction so it's race condition free, if it's ran atomically + * @param entry + */ + async add(entry) { + await this.#ctx.storage.transaction(async () => { + this.#heap.add(entry), this.addEntryDB(entry); + }); + } + /** + * `remove` is ran using a transaction so it's race condition free, if it's ran atomically + * @param entry + */ + remove(entry) { + this.#ctx.storage.transactionSync(() => { + this.removeFirst((e) => e.hash === entry.hash && e.type === entry.type); + }); + } + popTypeAll(entryType) { + this.#ctx.storage.transactionSync(() => { + this.filter((e) => e.type !== entryType); + }); + } + // Idempotent, perhaps name should suggest so + async handleNextAlarm() { + this.#heap.peek(); + } + getFirst(callbackFn) { + return structuredClone(this.#heap.toArray().find(callbackFn)); + } + removeFirst(callbackFn) { + let elements = this.#heap.toArray(), index = elements.findIndex(callbackFn); + if (index === -1) + return; + let removedEntry = elements.splice(index, 1)[0]; + this.removeEntryDB(removedEntry), this.#heap = new import_heap_js.default(wakerPriorityEntryComparator), this.#heap.init(elements); + } + filter(callbackFn) { + let filteredElements = this.#heap.toArray().filter(callbackFn), removedElements = this.#heap.toArray().filter((a) => !callbackFn(a)); + this.#ctx.storage.transactionSync(() => { + for (let entry of removedElements) + this.removeEntryDB(entry); + }), this.#heap = new import_heap_js.default(wakerPriorityEntryComparator), this.#heap.init(filteredElements); + } + length() { + return this.#heap.length; + } + getEntries() { + let entries = [ + ...this.#ctx.storage.sql.exec("SELECT * FROM priority_queue ORDER BY id") + ], activeEntries = []; + return entries.forEach((val) => { + let entryType = toWakerPriorityType(val.entryType); + if (val.action == 0) { + let index = activeEntries.findIndex( + (activeVal) => val.hash == activeVal.hash && entryType == activeVal.type + ); + index !== -1 && activeEntries.splice(index, 1); + } else + activeEntries.findIndex( + (activeVal) => val.hash == activeVal.hash && entryType == activeVal.type + ) === -1 && activeEntries.push({ + hash: val.hash, + targetTimestamp: val.target_timestamp, + type: entryType + }); + }), activeEntries; + } + removeEntryDB(entry) { + this.#ctx.storage.sql.exec( + ` + INSERT INTO priority_queue (target_timestamp, action, entryType, hash) + VALUES (?, ?, ? ,?) + `, + entry.targetTimestamp, + 0 /* FALSE */, + fromWakerPriorityType(entry.type), + entry.hash + ); + } + checkIfExistedInPast(entry) { + return this.#ctx.storage.sql.exec( + "SELECT * FROM priority_queue WHERE entryType = ? AND hash = ? AND action = ?", + fromWakerPriorityType(entry.type), + entry.hash, + 0 + ).toArray().length >= 1; + } + addEntryDB(entry) { + this.#ctx.storage.sql.exec( + ` + INSERT INTO priority_queue (target_timestamp, action, entryType, hash) + VALUES (?, ?, ? ,?) + `, + entry.targetTimestamp, + 1 /* TRUE */, + fromWakerPriorityType(entry.type), + entry.hash + ); + } +}, toWakerPriorityType = (entryType) => { + switch (entryType) { + case 0 /* RETRY */: + return "retry"; + case 1 /* SLEEP */: + return "sleep"; + case 2 /* TIMEOUT */: + return "timeout"; + } +}, fromWakerPriorityType = (entryType) => { + switch (entryType) { + case "retry": + return 0 /* RETRY */; + case "sleep": + return 1 /* SLEEP */; + case "timeout": + return 2 /* TIMEOUT */; + default: + throw new Error(`WakerPriorityType "${entryType}" has not been handled`); + } +}; + +// ../workflows-shared/src/engine.ts +var ENGINE_STATUS_KEY = "ENGINE_STATUS", EVENT_MAP_PREFIX = "EVENT_MAP", Engine = class extends DurableObject { + logs = []; + isRunning = !1; + accountId; + instanceId; + workflowName; + timeoutHandler; + priorityQueue; + waiters = /* @__PURE__ */ new Map(); + eventMap = /* @__PURE__ */ new Map(); + constructor(state, env) { + super(state, env), this.ctx.blockConcurrencyWhile(async () => { + this.ctx.storage.transactionSync(() => { + try { + this.ctx.storage.sql.exec(` + CREATE TABLE IF NOT EXISTS priority_queue ( + id INTEGER PRIMARY KEY NOT NULL, + created_on TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + target_timestamp INTEGER NOT NULL, + action INTEGER NOT NULL, -- should only be 0 or 1 (1 for added, 0 for deleted), + entryType INTEGER NOT NULL, + hash TEXT NOT NULL, + CHECK (action IN (0, 1)), -- guararentee that action can only be 0 or 1 + UNIQUE (action, entryType, hash) + ); + CREATE TABLE IF NOT EXISTS states ( + id INTEGER PRIMARY KEY NOT NULL, + groupKey TEXT, + target TEXT, + metadata TEXT, + event INTEGER NOT NULL + ) + `); + } catch (e) { + throw console.error(e), e; + } + }); + }), this.timeoutHandler = new GracePeriodSemaphore( + startGracePeriod, + ENGINE_TIMEOUT + ); + } + writeLog(event, group, target = null, metadata) { + this.ctx.storage.sql.exec( + "INSERT INTO states (event, groupKey, target, metadata) VALUES (?, ?, ?, ?)", + event, + group, + target, + JSON.stringify(metadata) + ); + } + readLogsFromStep(_cacheKey) { + return []; + } + readLogs() { + return { + logs: [ + ...this.ctx.storage.sql.exec("SELECT event, groupKey, target, metadata FROM states") + ].map((log) => ({ + ...log, + metadata: JSON.parse(log.metadata), + group: log.groupKey + })) + }; + } + async getStatus(_accountId, _instanceId) { + if (this.accountId === void 0) + throw new Error("stub not initialized"); + let res = await this.ctx.storage.get(ENGINE_STATUS_KEY); + return res === void 0 ? 0 /* Queued */ : res; + } + async setStatus(accountId, instanceId, status) { + await this.ctx.storage.put(ENGINE_STATUS_KEY, status); + } + async abort(_reason) { + } + async storeEventMap() { + await this.ctx.blockConcurrencyWhile(async () => { + for (let [key, value] of this.eventMap.entries()) + for (let eventIdx in value) + await this.ctx.storage.put( + `${EVENT_MAP_PREFIX} +${key} +${eventIdx}`, + value[eventIdx] + ); + }); + } + async restoreEventMap() { + await this.ctx.blockConcurrencyWhile(async () => { + let entries = await this.ctx.storage.list({ + prefix: EVENT_MAP_PREFIX + }); + for (let [key, value] of entries) { + let [_, eventType, _idx] = key.split(` +`), eventList = this.eventMap.get(eventType) ?? []; + eventList.push(value), this.eventMap.set(eventType, eventList); + } + }); + } + async receiveEvent(event) { + let eventTypeQueue = this.eventMap.get(event.type) ?? []; + if (eventTypeQueue.push(event), await this.storeEventMap(), this.eventMap.set(event.type, eventTypeQueue), this.isRunning) { + let callbacks = this.waiters.get(event.type); + if (callbacks) { + let callback = callbacks[0]; + if (callback) { + callback(event), callbacks.shift(), this.waiters.set(event.type, callbacks), eventTypeQueue = this.eventMap.get(event.type) ?? [], eventTypeQueue.shift(), this.eventMap.set(event.type, eventTypeQueue); + return; + } + } + } else { + let metadata = await this.ctx.storage.get(INSTANCE_METADATA); + if (metadata === void 0) + throw new Error("Engine was never started"); + this.init( + metadata.accountId, + metadata.workflow, + metadata.version, + metadata.instance, + metadata.event + ); + } + } + async userTriggeredTerminate() { + } + async init(accountId, workflow, version, instance, event) { + if (this.priorityQueue === void 0 && (this.priorityQueue = new TimePriorityQueue( + this.ctx, + // this.env, + { + accountId, + workflow, + version, + instance, + event + } + )), this.priorityQueue.popPastEntries(), await this.priorityQueue.handleNextAlarm(), this.isRunning) + return; + this.accountId = accountId, this.instanceId = instance.id, this.workflowName = workflow.name; + let status = await this.getStatus(accountId, instance.id); + if ([ + 3 /* Errored */, + // TODO (WOR-85): Remove this once upgrade story is done + 4 /* Terminated */, + 5 /* Complete */ + ].includes(status)) + return; + if (await this.ctx.storage.get(INSTANCE_METADATA) == null) { + let instanceMetadata = { + accountId, + workflow, + version, + instance, + event + }; + await this.ctx.storage.put(INSTANCE_METADATA, instanceMetadata), this.writeLog(0 /* WORKFLOW_QUEUED */, null, null, { + params: event.payload, + versionId: version.id, + trigger: { + source: 0 /* API */ + } + }), this.writeLog(1 /* WORKFLOW_START */, null, null, {}); + } + await this.restoreEventMap(); + let stubStep = new Context(this, this.ctx), workflowRunningHandler = async () => { + await this.ctx.storage.transaction(async () => { + await this.setStatus(accountId, instance.id, 1 /* Running */); + }); + }; + this.isRunning = !0, workflowRunningHandler(); + try { + let result = await this.env.USER_WORKFLOW.run(event, stubStep); + this.writeLog(2 /* WORKFLOW_SUCCESS */, null, null, { + result + }), await this.ctx.storage.transaction(async () => { + await this.setStatus(accountId, instance.id, 5 /* Complete */); + }), this.isRunning = !1; + } catch (err) { + let error; + if (err instanceof Error) { + if (err.name === "NonRetryableError" || err.message.startsWith("NonRetryableError")) { + this.writeLog(3 /* WORKFLOW_FAILURE */, null, null, { + error: new WorkflowFatalError( + "The execution of the Workflow instance was terminated, as a step threw an NonRetryableError and it was not handled" + ) + }), await this.setStatus(accountId, instance.id, 3 /* Errored */), await this.abort("A step threw a NonRetryableError"), this.isRunning = !1; + return; + } + error = { + message: err.message, + name: err.name + }; + } else + error = { + name: "Error", + message: err + }; + this.writeLog(3 /* WORKFLOW_FAILURE */, null, null, { + error + }), await this.ctx.storage.transaction(async () => { + await this.setStatus(accountId, instance.id, 3 /* Errored */); + }), this.isRunning = !1; + } + return { + id: instance.id + }; + } +}; +export { + Engine, + WorkflowBinding +}; +//# sourceMappingURL=binding.worker.js.map diff --git a/node_modules/miniflare/dist/src/workers/workflows/binding.worker.js.map b/node_modules/miniflare/dist/src/workers/workflows/binding.worker.js.map new file mode 100644 index 0000000..3befa4d --- /dev/null +++ b/node_modules/miniflare/dist/src/workers/workflows/binding.worker.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../../../../../../node_modules/.pnpm/heap-js@2.5.0/node_modules/heap-js/dist/heap-js.umd.js", "../../../../../workflows-shared/src/binding.ts", "../../../../../workflows-shared/src/instance.ts", "../../../../../workflows-shared/src/engine.ts", "../../../../../workflows-shared/src/context.ts", "../../../../../../node_modules/.pnpm/itty-time@1.0.6/node_modules/src/src/lib/units.ts", "../../../../../../node_modules/.pnpm/itty-time@1.0.6/node_modules/src/src/ms.ts", "../../../../../../node_modules/.pnpm/itty-time@1.0.6/node_modules/src/src/datePlus.ts", "../../../../../../node_modules/.pnpm/itty-time@1.0.6/node_modules/src/src/duration.ts", "../../../../../../node_modules/.pnpm/itty-time@1.0.6/node_modules/src/src/seconds.ts", "../../../../../workflows-shared/src/lib/cache.ts", "../../../../../workflows-shared/src/lib/errors.ts", "../../../../../workflows-shared/src/lib/retries.ts", "../../../../../workflows-shared/src/lib/validators.ts", "../../../../../workflows-shared/src/lib/gracePeriodSemaphore.ts", "../../../../../workflows-shared/src/lib/timePriorityQueue.ts"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA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AY,IACZ,uBAAuB;AAC5B,QAAI;AAEH,UAAM,SAAS,MADA,KAAK,IAAI,cACI,IAAI,OAAO,QAAQ;AAC/C,WAAK,mCAAyC,MAAM,MAAM;AAAA,QACzD;AAAA,MACD,CAAC,GAGD,MAAM,KAAK,IAAI,QAAQ,YAAY,YAAY;AAC9C,cAAM,KAAK,UAAU,WAAW,SAAS,oBAA2B;AAAA,MACrE,CAAC,GACD,KAAK,YAAY;AAAA,IAClB,SAAS,KAAK;AACb,UAAI;AACJ,UAAI,eAAe,OAAO;AACzB,YACC,IAAI,SAAS,uBACb,IAAI,QAAQ,WAAW,mBAAmB,GACzC;AACD,eAAK,mCAAyC,MAAM,MAAM;AAAA,YACzD,OAAO,IAAI;AAAA,cACV;AAAA,YACD;AAAA,UACD,CAAC,GAED,MAAM,KAAK,UAAU,WAAW,SAAS,mBAA0B,GACnE,MAAM,KAAK,MAAM,kCAAkC,GACnD,KAAK,YAAY;AACjB;AAAA,QACD;AACA,gBAAQ;AAAA,UACP,SAAS,IAAI;AAAA,UACb,MAAM,IAAI;AAAA,QACX;AAAA,MACD;AACC,gBAAQ;AAAA,UACP,MAAM;AAAA,UACN,SAAS;AAAA,QACV;AAGD,WAAK,mCAAyC,MAAM,MAAM;AAAA,QACzD;AAAA,MACD,CAAC,GAGD,MAAM,KAAK,IAAI,QAAQ,YAAY,YAAY;AAC9C,cAAM,KAAK,UAAU,WAAW,SAAS,mBAA0B;AAAA,MACpE,CAAC,GACD,KAAK,YAAY;AAAA,IAClB;AAEA,WAAO;AAAA,MACN,IAAI,SAAS;AAAA,IACd;AAAA,EACD;AACD;", + "names": ["exports", "n", "r", "HeapAsync", "i", "self", "j", "_a", "_b", "Heap", "RpcTarget", "units", "year", "day", "month", "week", "hour", "minute", "second", "m", "ms", "duration", "value", "unit", "match", "RpcTarget", "priorityQueueHash", "Heap"] +} diff --git a/node_modules/miniflare/package.json b/node_modules/miniflare/package.json new file mode 100644 index 0000000..85c3122 --- /dev/null +++ b/node_modules/miniflare/package.json @@ -0,0 +1,112 @@ +{ + "name": "miniflare", + "version": "4.20250508.3", + "description": "Fun, full-featured, fully-local simulator for Cloudflare Workers", + "keywords": [ + "cloudflare", + "workers", + "worker", + "local", + "cloudworker" + ], + "homepage": "https://github.com/cloudflare/workers-sdk/tree/main/packages/miniflare#readme", + "bugs": { + "url": "https://github.com/cloudflare/workers-sdk/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/cloudflare/workers-sdk.git", + "directory": "packages/miniflare" + }, + "license": "MIT", + "author": "MrBBot ", + "main": "./dist/src/index.js", + "types": "./dist/src/index.d.ts", + "bin": { + "miniflare": "bootstrap.js" + }, + "files": [ + "dist/src", + "bootstrap.js" + ], + "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", + "sharp": "^0.33.5", + "stoppable": "1.1.0", + "undici": "^5.28.5", + "workerd": "1.20250508.0", + "ws": "8.18.0", + "youch": "3.3.4", + "zod": "3.22.3" + }, + "devDependencies": { + "@ava/typescript": "^4.1.0", + "@cloudflare/workers-types": "^4.20250508.0", + "@microsoft/api-extractor": "7.49.1", + "@types/debug": "^4.1.7", + "@types/estree": "^1.0.0", + "@types/glob-to-regexp": "^0.4.1", + "@types/http-cache-semantics": "^4.0.1", + "@types/mime": "^3.0.4", + "@types/node": "^20.17.32", + "@types/stoppable": "^1.1.1", + "@types/which": "^2.0.1", + "@types/ws": "^8.5.7", + "@typescript-eslint/eslint-plugin": "^6.9.0", + "@typescript-eslint/parser": "^6.9.0", + "ava": "^6.0.1", + "capnp-es": "^0.0.7", + "concurrently": "^8.2.2", + "devalue": "^4.3.0", + "devtools-protocol": "^0.0.1182435", + "esbuild": "0.25.4", + "eslint": "^8.57.1", + "eslint-config-prettier": "^9.0.0", + "eslint-plugin-es": "^4.1.0", + "eslint-plugin-prettier": "^5.0.1", + "expect-type": "^0.15.0", + "get-port": "^7.1.0", + "heap-js": "^2.5.0", + "http-cache-semantics": "^4.1.0", + "kleur": "^4.1.5", + "mime": "^3.0.0", + "postal-mime": "^2.4.3", + "pretty-bytes": "^6.0.0", + "rimraf": "^6.0.1", + "source-map": "^0.6.1", + "ts-dedent": "^2.2.0", + "typescript": "^5.7.2", + "which": "^2.0.2", + "@cloudflare/kv-asset-handler": "0.4.0", + "@cloudflare/workers-shared": "0.17.5", + "@cloudflare/workflows-shared": "0.3.3" + }, + "engines": { + "node": ">=18.0.0" + }, + "volta": { + "extends": "../../package.json" + }, + "publishConfig": { + "access": "public" + }, + "workers-sdk": { + "prerelease": true + }, + "scripts": { + "build": "node scripts/build.mjs && pnpm run types:build", + "capnp:workerd": "node scripts/build-capnp.mjs", + "check:lint": "eslint --max-warnings=0 \"{src,test}/**/*.ts\" \"scripts/**/*.{js,mjs}\" \"types/**/*.ts\"", + "check:type": "tsc", + "clean": "rimraf ./dist ./dist-types", + "dev": "concurrently -n esbuild,typechk,typewrk -c yellow,blue,blue.dim \"node scripts/build.mjs watch\" \"node scripts/types.mjs tsconfig.json watch\" \"node scripts/types.mjs src/workers/tsconfig.json watch\"", + "lint:fix": "pnpm run check:lint --fix", + "test": "ava && rimraf ./.tmp", + "test:ci": "pnpm run test", + "types:build": "node scripts/types.mjs tsconfig.json && node scripts/types.mjs src/workers/tsconfig.json" + } +} \ No newline at end of file diff --git a/node_modules/mustache/CHANGELOG.md b/node_modules/mustache/CHANGELOG.md new file mode 100644 index 0000000..b1f72d0 --- /dev/null +++ b/node_modules/mustache/CHANGELOG.md @@ -0,0 +1,618 @@ +# Change Log + +All notable changes to this project will be documented in this file. +This project adheres to [Semantic Versioning](http://semver.org/). + +## [4.2.0] / 28 March 2021 + +### Added + +* [#773]: Add package.json `exports` field, by [@manzt]. + +## [4.1.0] / 6 December 2020 + +### Added + +* [#764]: `render()` now recognizes a config object argument, by [@pineapplemachine]. + +### Fixed + +* [#764]: Ask custom `escape` functions to escape all types of values (including `number`s), by [@pineapplemachine]. + +## [4.0.1] / 15 March 2020 + +### Fixed + + * [#739]: Fix custom delimiters in nested partials, by [@aielo]. + +## [4.0.0] / 16 January 2020 + +Majority of using projects don't have to worry by this being a new major version. + +**TLDR;** if your project manipulates `Writer.prototype.parse | Writer.cache` directly or uses `.to_html()`, you probably have to change that code. + +This release allows the internal template cache to be customised, either by disabling it completely +or provide a custom strategy deciding how the cache should behave when mustache.js parses templates. + +```js +const mustache = require('mustache'); + +// disable caching +Mustache.templateCache = undefined; + +// or use a built-in Map in modern environments +Mustache.templateCache = new Map(); +``` + +Projects that wanted to customise the caching behaviour in earlier versions of mustache.js were forced to +override internal method responsible for parsing templates; `Writer.prototype.parse`. In short, that was unfortunate +because there is more than caching happening in that method. + +We've improved that now by introducing a first class API that only affects template caching. + +The default template cache behaves as before and is still compatible with older JavaScript environments. +For those who wants to provide a custom more sopisiticated caching strategy, one can do that with an object that adheres to the following requirements: + +```ts +{ + set(cacheKey: string, value: string): void + get(cacheKey: string): string | undefined + clear(): void +} +``` + +### Added + +* [#731]: Allow template caching to be customised, by [@AndrewLeedham]. + +### Removed + +* [#735]: Remove `.to_html()`, by [@phillipj]. + +## [3.2.1] / 30 December 2019 + +### Fixed + + * [#733]: Allow the CLI to use JavaScript views when the project has ES6 modules enabled, by [@eobrain]. + +## [3.2.0] / 18 December 2019 + +### Added + +* [#728]: Expose ECMAScript Module in addition to UMD (CommonJS, AMD & global scope), by [@phillipj] and [@zekth]. + +### Using mustache.js as an ES module + +To stay backwards compatible with already using projects, the default exposed module format is still UMD. +That means projects using mustache.js as an CommonJS, AMD or global scope module, from npm or directly from github.com +can keep on doing that for now. + +For those projects who would rather want to use mustache.js as an ES module, the `mustache/mustache.mjs` file has to +be `import`ed directly. + +Below are some usage scenarios for different runtimes. + +#### Modern browser with ES module support + +```html + + +``` + +#### [Node.js](https://nodejs.org) (>= v13.2.0 or using --experimental-modules flag) + +```js +// index.mjs +import mustache from 'mustache/mustache.mjs' + +console.log(mustache.render('Hello {{name}}!', { name: 'Santa' })) +// Hello Santa! +``` + +ES Module support for Node.js will be improved in the future when [Conditional Exports](https://nodejs.org/api/esm.html#esm_conditional_exports) +is enabled by default rather than being behind an experimental flag. + +More info in [Node.js ECMAScript Modules docs](https://nodejs.org/api/esm.html). + +#### [Deno](https://deno.land/) + +```js +// index.ts +import mustache from 'https://unpkg.com/mustache@3.2.0/mustache.mjs' + +console.log(mustache.render('Hello {{name}}!', { name: 'Santa' })) +// Hello Santa! +``` + +## [3.1.0] / 13 September 2019 + +### Added + + * [#717]: Added support .js files as views in command line tool, by [@JEStaubach]. + +### Fixed + + * [#716]: Bugfix for indentation of inline partials, by [@yotammadem]. + +## [3.0.3] / 27 August 2019 + +### Added + + * [#713]: Add test cases for custom functions in partials, by [@wol-soft]. + +### Fixed + + * [#714]: Bugfix for wrong function output in partials with indentation, by [@phillipj]. + +## [3.0.2] / 21 August 2019 + +### Fixed + + * [#705]: Fix indentation of partials, by [@kevindew] and [@yotammadem]. + +### Dev + + * [#701]: Fix test failure for Node 10 and above, by [@andersk]. + * [#704]: Lint all test files just like the source files, by [@phillipj]. + * Start experimenting & comparing GitHub Actions vs Travis CI, by [@phillipj]. + +## [3.0.1] / 11 November 2018 + + * [#679]: Fix partials not rendering tokens when using custom tags, by [@stackchain]. + +## [3.0.0] / 16 September 2018 + +We are very happy to announce a new major version of mustache.js. We want to be very careful not to break projects +out in the wild, and adhering to [Semantic Versioning](http://semver.org/) we have therefore cut this new major version. + +The changes introduced will likely not require any actions for most using projects. The things to look out for that +might cause unexpected rendering results are described in the migration guide below. + +A big shout out and thanks to [@raymond-lam] for this release! Without his contributions with code and issue triaging, +this release would never have happened. + +### Major + +* [#618]: Allow rendering properties of primitive types that are not objects, by [@raymond-lam]. +* [#643]: `Writer.prototype.parse` to cache by tags in addition to template string, by [@raymond-lam]. +* [#664]: Fix `Writer.prototype.parse` cache, by [@seminaoki]. + +### Minor + +* [#673]: Add `tags` parameter to `Mustache.render()`, by [@raymond-lam]. + +### Migrating from mustache.js v2.x to v3.x + +#### Rendering properties of primitive types + +We have ensured properties of primitive types can be rendered at all times. That means `Array.length`, `String.length` +and similar. A corner case where this could cause unexpected output follows: + +View: +``` +{ + stooges: [ + { name: "Moe" }, + { name: "Larry" }, + { name: "Curly" } + ] +} +``` + +Template: +``` +{{#stooges}} + {{name}}: {{name.length}} characters +{{/stooges}} +``` + +Output with v3.0: +``` + Moe: 3 characters + Larry: 5 characters + Curly: 5 characters +``` + +Output with v2.x: +``` + Moe: characters + Larry: characters + Curly: characters +``` + +#### Caching for templates with custom delimiters + +We have improved the templates cache to ensure custom delimiters are taken into consideration for the cache. +This improvement might cause unexpected rendering behaviour for using projects actively using the custom delimiters functionality. + +Previously it was possible to use `Mustache.parse()` as a means to set global custom delimiters. If custom +delimiters were provided as an argument, it would affect all following calls to `Mustache.render()`. +Consider the following: + +```js +const template = "[[item.title]] [[item.value]]"; +mustache.parse(template, ["[[", "]]"]); + +console.log( + mustache.render(template, { + item: { + title: "TEST", + value: 1 + } + }) +); + +>> TEST 1 +``` + +The above illustrates the fact that `Mustache.parse()` made mustache.js cache the template without considering +the custom delimiters provided. This is no longer true. + +We no longer encourage using `Mustache.parse()` for this purpose, but have rather added a fourth argument to +`Mustache.render()` letting you provide custom delimiters when rendering. + +If you still need the pre-parse the template and use custom delimiters at the same time, ensure to provide +the custom delimiters as argument to `Mustache.render()` as well. + +## [2.3.2] / 17 August 2018 + +This release is made to revert changes introduced in [2.3.1] that caused unexpected behaviour for several users. + +### Minor + + * [#670]: Rollback template cache causing unexpected behaviour, by [@raymond-lam]. + +## [2.3.1] / 7 August 2018 + +### Minor + + * [#643]: `Writer.prototype.parse` to cache by tags in addition to template string, by [@raymond-lam]. + * [#664]: Fix `Writer.prototype.parse` cache, by [@seminaoki]. + +### Dev + + * [#666]: Install release tools with npm rather than pre-commit hook & `Rakefile`, by [@phillipj]. + * [#667], [#668]: Stabilize browser test suite, by [@phillipj]. + +### Docs + + * [#644]: Document global Mustache.escape overriding capacity, by [@paultopia]. + * [#657]: Correct `Mustache.parse()` return type documentation, by [@bbrooks]. + +## [2.3.0] / 8 November 2016 + +### Minor + + * [#540]: Add optional `output` argument to mustache CLI, by [@wizawu]. + * [#597]: Add compatibility with amdclean, by [@mightyplow]. + +### Dev + + * [#553]: Assert `null` lookup when rendering an unescaped value, by [@dasilvacontin]. + * [#580], [#610]: Ignore eslint for greenkeeper updates, by [@phillipj]. + * [#560]: Fix CLI tests for Windows, by [@kookookchoozeus]. + * Run browser tests w/node v4, by [@phillipj]. + +### Docs + + * [#542]: Add API documentation to README, by [@tomekwi]. + * [#546]: Add missing syntax highlighting to README code blocks, by [@pra85]. + * [#569]: Update Ctemplate links in README, by [@mortonfox]. + * [#592]: Change "loadUser" to "loadUser()" in README, by [@Flaque]. + * [#593]: Adding doctype to HTML code example in README, by [@calvinf]. + +### Dependencies + + * eslint -> 2.2.0. Breaking changes fix by [@phillipj]. [#548] + * eslint -> 2.5.1. + * mocha -> 3.0.2. + * zuul -> 3.11.0. + +## [2.2.1] / 13 December 2015 + +### Fixes + + * Improve HTML escaping, by [@phillipj]. + * Fix inconsistency in defining global mustache object, by [@simast]. + * Fix switch-case indent error, by [@norfish]. + * Unpin chai and eslint versions, by [@dasilvacontin]. + * Update README.md with proper grammar, by [@EvanLovely]. + * Update mjackson username in README, by [@mjackson]. + * Remove syntax highlighting in README code sample, by [@imagentleman]. + * Fix typo in README, by [@Xcrucifier]. + * Fix link typo in README, by [@keirog]. + +## [2.2.0] / 15 October 2015 + +### Added + + * Add Partials support to CLI, by [@palkan]. + +### Changed + + * Move install instructions to README's top, by [@mateusortiz] + * Improved devhook install output, by [@ShashankaNataraj]. + * Clarifies and improves language in documentation, by [@jfmercer]. + * Linting CLI tool, by [@phillipj]. + * npm 2.x and node v4 on Travis, by [@phillipj]. + +### Fixes + + * Fix README spelling error to "aforementioned", by [@djchie]. + * Equal error message test in .render() for server and browser, by [@phillipj]. + +### Dependencies + + * chai -> 3.3.0 + * eslint -> 1.6.0 + +## [2.1.3] / 23 July 2015 + +### Added + + * Throw error when providing .render() with invalid template type, by [@phillipj]. + * Documents use of string literals containing double quotes, by [@jfmercer]. + +### Changed + + * Move mustache gif to githubusercontent, by [@Andersos]. + +### Fixed + + * Update UMD Shim to be resilient to HTMLElement global pollution, by [@mikesherov]. + +## [2.1.2] / 17 June 2015 + +### Added + + * Mustache global definition ([#466]) by [@yousefcisco]. + +## [2.1.1] / 11 June 2015 + +### Added + + * State that we use semver on the change log, by [@dasilvacontin]. + * Added version links to change log, by [@dasilvacontin]. + +### Fixed + + * Bugfix for using values from view's context prototype, by [@phillipj]. + * Improve test with undefined/null lookup hit using dot notation, by [@dasilvacontin]. + * Bugfix for null/undefined lookup hit when using dot notation, by [@phillipj]. + * Remove moot `version` property from bower.json, by [@kkirsche]. + * bower.json doesn't require a version bump via hook, by [@dasilvacontin]. + + +## [2.1.0] / 5 June 2015 + + * Added license attribute to package.json, by [@pgilad]. + * Minor changes to make mustache.js compatible with both WSH and ASP, by [@nagaozen]. + * Improve CLI view parsing error, by [@phillipj]. + * Bugfix for view context cache, by [@phillipj]. + +## [2.0.0] / 27 Mar 2015 + + * Fixed lookup not stopping upon finding `undefined` or `null` values, by [@dasilvacontin]. + * Refactored pre-commit hook, by [@dasilvacontin]. + +## [1.2.0] / 24 Mar 2015 + + * Added -v option to CLI, by [@phillipj]. + * Bugfix for rendering Number when it serves as the Context, by [@phillipj]. + * Specified files in package.json for a cleaner install, by [@phillipj]. + +## [1.1.0] / 18 Feb 2015 + + * Refactor Writer.renderTokens() for better readability, by [@phillipj]. + * Cleanup tests section in readme, by [@phillipj]. + * Added JSHint to tests/CI, by [@phillipj]. + * Added node v0.12 on travis, by [@phillipj]. + * Created command line tool, by [@phillipj]. + * Added *falsy* to Inverted Sections description in README, by [@kristijanmatic]. + +## [1.0.0] / 20 Dec 2014 + + * Inline tag compilation, by [@mjackson]. + * Fixed AMD registration, volo package.json entry, by [@jrburke]. + * Added spm support, by [@afc163]. + * Only access properties of objects on Context.lookup, by [@cmbuckley]. + +## [0.8.2] / 17 Mar 2014 + + * Supporting Bower through a bower.json file. + +## [0.8.1] / 3 Jan 2014 + + * Fix usage of partial templates. + +## [0.8.0] / 2 Dec 2013 + + * Remove compile* writer functions, use mustache.parse instead. Smaller API. + * Throw an error when rendering a template that contains higher-order sections and + the original template is not provided. + * Remove low-level Context.make function. + * Better code readability and inline documentation. + * Stop caching templates by name. + +## [0.7.3] / 5 Nov 2013 + + * Don't require the original template to be passed to the rendering function + when using compiled templates. This is still required when using higher-order + functions in order to be able to extract the portion of the template + that was contained by that section. Fixes [#262]. + * Performance improvements. + +## [0.7.2] / 27 Dec 2012 + + * Fixed a rendering bug ([#274]) when using nested higher-order sections. + * Better error reporting on failed parse. + * Converted tests to use mocha instead of vows. + +## [0.7.1] / 6 Dec 2012 + + * Handle empty templates gracefully. Fixes [#265], [#267], and [#270]. + * Cache partials by template, not by name. Fixes [#257]. + * Added Mustache.compileTokens to compile the output of Mustache.parse. Fixes + [#258]. + +## [0.7.0] / 10 Sep 2012 + + * Rename Renderer => Writer. + * Allow partials to be loaded dynamically using a callback (thanks + [@TiddoLangerak] for the suggestion). + * Fixed a bug with higher-order sections that prevented them from being + passed the raw text of the section from the original template. + * More concise token format. Tokens also include start/end indices in the + original template. + * High-level API is consistent with the Writer API. + * Allow partials to be passed to the pre-compiled function (thanks + [@fallenice]). + * Don't use eval (thanks [@cweider]). + +## [0.6.0] / 31 Aug 2012 + + * Use JavaScript's definition of falsy when determining whether to render an + inverted section or not. Issue [#186]. + * Use Mustache.escape to escape values inside {{}}. This function may be + reassigned to alter the default escaping behavior. Issue [#244]. + * Fixed a bug that clashed with QUnit (thanks [@kannix]). + * Added volo support (thanks [@guybedford]). + +[4.1.0]: https://github.com/janl/mustache.js/compare/v4.0.1...v4.1.0 +[4.0.1]: https://github.com/janl/mustache.js/compare/v4.0.0...v4.0.1 +[4.0.0]: https://github.com/janl/mustache.js/compare/v3.2.1...v4.0.0 +[3.2.1]: https://github.com/janl/mustache.js/compare/v3.2.0...v3.2.1 +[3.2.0]: https://github.com/janl/mustache.js/compare/v3.1.0...v3.2.0 +[3.1.0]: https://github.com/janl/mustache.js/compare/v3.0.3...v3.1.0 +[3.0.3]: https://github.com/janl/mustache.js/compare/v3.0.2...v3.0.3 +[3.0.2]: https://github.com/janl/mustache.js/compare/v3.0.1...v3.0.2 +[3.0.1]: https://github.com/janl/mustache.js/compare/v3.0.0...v3.0.1 +[3.0.0]: https://github.com/janl/mustache.js/compare/v2.3.2...v3.0.0 +[2.3.2]: https://github.com/janl/mustache.js/compare/v2.3.1...v2.3.2 +[2.3.1]: https://github.com/janl/mustache.js/compare/v2.3.0...v2.3.1 +[2.3.0]: https://github.com/janl/mustache.js/compare/v2.2.1...v2.3.0 +[2.2.1]: https://github.com/janl/mustache.js/compare/v2.2.0...v2.2.1 +[2.2.0]: https://github.com/janl/mustache.js/compare/v2.1.3...v2.2.0 +[2.1.3]: https://github.com/janl/mustache.js/compare/v2.1.2...v2.1.3 +[2.1.2]: https://github.com/janl/mustache.js/compare/v2.1.1...v2.1.2 +[2.1.1]: https://github.com/janl/mustache.js/compare/v2.1.0...v2.1.1 +[2.1.0]: https://github.com/janl/mustache.js/compare/v2.0.0...v2.1.0 +[2.0.0]: https://github.com/janl/mustache.js/compare/v1.2.0...v2.0.0 +[1.2.0]: https://github.com/janl/mustache.js/compare/v1.1.0...v1.2.0 +[1.1.0]: https://github.com/janl/mustache.js/compare/v1.0.0...v1.1.0 +[1.0.0]: https://github.com/janl/mustache.js/compare/0.8.2...v1.0.0 +[0.8.2]: https://github.com/janl/mustache.js/compare/0.8.1...0.8.2 +[0.8.1]: https://github.com/janl/mustache.js/compare/0.8.0...0.8.1 +[0.8.0]: https://github.com/janl/mustache.js/compare/0.7.3...0.8.0 +[0.7.3]: https://github.com/janl/mustache.js/compare/0.7.2...0.7.3 +[0.7.2]: https://github.com/janl/mustache.js/compare/0.7.1...0.7.2 +[0.7.1]: https://github.com/janl/mustache.js/compare/0.7.0...0.7.1 +[0.7.0]: https://github.com/janl/mustache.js/compare/0.6.0...0.7.0 +[0.6.0]: https://github.com/janl/mustache.js/compare/0.5.2...0.6.0 + +[#186]: https://github.com/janl/mustache.js/issues/186 +[#244]: https://github.com/janl/mustache.js/issues/244 +[#257]: https://github.com/janl/mustache.js/issues/257 +[#258]: https://github.com/janl/mustache.js/issues/258 +[#262]: https://github.com/janl/mustache.js/issues/262 +[#265]: https://github.com/janl/mustache.js/issues/265 +[#267]: https://github.com/janl/mustache.js/issues/267 +[#270]: https://github.com/janl/mustache.js/issues/270 +[#274]: https://github.com/janl/mustache.js/issues/274 +[#466]: https://github.com/janl/mustache.js/issues/466 +[#540]: https://github.com/janl/mustache.js/issues/540 +[#542]: https://github.com/janl/mustache.js/issues/542 +[#546]: https://github.com/janl/mustache.js/issues/546 +[#548]: https://github.com/janl/mustache.js/issues/548 +[#553]: https://github.com/janl/mustache.js/issues/553 +[#560]: https://github.com/janl/mustache.js/issues/560 +[#569]: https://github.com/janl/mustache.js/issues/569 +[#580]: https://github.com/janl/mustache.js/issues/580 +[#592]: https://github.com/janl/mustache.js/issues/592 +[#593]: https://github.com/janl/mustache.js/issues/593 +[#597]: https://github.com/janl/mustache.js/issues/597 +[#610]: https://github.com/janl/mustache.js/issues/610 +[#643]: https://github.com/janl/mustache.js/issues/643 +[#644]: https://github.com/janl/mustache.js/issues/644 +[#657]: https://github.com/janl/mustache.js/issues/657 +[#664]: https://github.com/janl/mustache.js/issues/664 +[#666]: https://github.com/janl/mustache.js/issues/666 +[#667]: https://github.com/janl/mustache.js/issues/667 +[#668]: https://github.com/janl/mustache.js/issues/668 +[#670]: https://github.com/janl/mustache.js/issues/670 +[#618]: https://github.com/janl/mustache.js/issues/618 +[#673]: https://github.com/janl/mustache.js/issues/673 +[#679]: https://github.com/janl/mustache.js/issues/679 +[#701]: https://github.com/janl/mustache.js/issues/701 +[#704]: https://github.com/janl/mustache.js/issues/704 +[#705]: https://github.com/janl/mustache.js/issues/705 +[#713]: https://github.com/janl/mustache.js/issues/713 +[#714]: https://github.com/janl/mustache.js/issues/714 +[#716]: https://github.com/janl/mustache.js/issues/716 +[#717]: https://github.com/janl/mustache.js/issues/717 +[#728]: https://github.com/janl/mustache.js/issues/728 +[#733]: https://github.com/janl/mustache.js/issues/733 +[#731]: https://github.com/janl/mustache.js/issues/731 +[#735]: https://github.com/janl/mustache.js/issues/735 +[#739]: https://github.com/janl/mustache.js/issues/739 +[#764]: https://github.com/janl/mustache.js/issues/764 +[#773]: https://github.com/janl/mustache.js/issues/773 + +[@afc163]: https://github.com/afc163 +[@aielo]: https://github.com/aielo +[@andersk]: https://github.com/andersk +[@Andersos]: https://github.com/Andersos +[@AndrewLeedham]: https://github.com/AndrewLeedham +[@bbrooks]: https://github.com/bbrooks +[@calvinf]: https://github.com/calvinf +[@cmbuckley]: https://github.com/cmbuckley +[@cweider]: https://github.com/cweider +[@dasilvacontin]: https://github.com/dasilvacontin +[@djchie]: https://github.com/djchie +[@eobrain]: https://github.com/eobrain +[@EvanLovely]: https://github.com/EvanLovely +[@fallenice]: https://github.com/fallenice +[@Flaque]: https://github.com/Flaque +[@guybedford]: https://github.com/guybedford +[@imagentleman]: https://github.com/imagentleman +[@JEStaubach]: https://github.com/JEStaubach +[@jfmercer]: https://github.com/jfmercer +[@jrburke]: https://github.com/jrburke +[@kannix]: https://github.com/kannix +[@keirog]: https://github.com/keirog +[@kkirsche]: https://github.com/kkirsche +[@kookookchoozeus]: https://github.com/kookookchoozeus +[@kristijanmatic]: https://github.com/kristijanmatic +[@kevindew]: https://github.com/kevindew +[@manzt]: https://github.com/manzt +[@mateusortiz]: https://github.com/mateusortiz +[@mightyplow]: https://github.com/mightyplow +[@mikesherov]: https://github.com/mikesherov +[@mjackson]: https://github.com/mjackson +[@mortonfox]: https://github.com/mortonfox +[@nagaozen]: https://github.com/nagaozen +[@norfish]: https://github.com/norfish +[@palkan]: https://github.com/palkan +[@paultopia]: https://github.com/paultopia +[@pgilad]: https://github.com/pgilad +[@phillipj]: https://github.com/phillipj +[@pineapplemachine]: https://github.com/pineapplemachine +[@pra85]: https://github.com/pra85 +[@raymond-lam]: https://github.com/raymond-lam +[@seminaoki]: https://github.com/seminaoki +[@ShashankaNataraj]: https://github.com/ShashankaNataraj +[@simast]: https://github.com/simast +[@stackchain]: https://github.com/stackchain +[@TiddoLangerak]: https://github.com/TiddoLangerak +[@tomekwi]: https://github.com/tomekwi +[@wizawu]: https://github.com/wizawu +[@wol-soft]: https://github.com/wol-soft +[@Xcrucifier]: https://github.com/Xcrucifier +[@yotammadem]: https://github.com/yotammadem +[@yousefcisco]: https://github.com/yousefcisco +[@zekth]: https://github.com/zekth diff --git a/node_modules/mustache/LICENSE b/node_modules/mustache/LICENSE new file mode 100644 index 0000000..4df7d1a --- /dev/null +++ b/node_modules/mustache/LICENSE @@ -0,0 +1,11 @@ +The MIT License + +Copyright (c) 2009 Chris Wanstrath (Ruby) +Copyright (c) 2010-2014 Jan Lehnardt (JavaScript) +Copyright (c) 2010-2015 The mustache.js community + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/mustache/README.md b/node_modules/mustache/README.md new file mode 100644 index 0000000..127dfe1 --- /dev/null +++ b/node_modules/mustache/README.md @@ -0,0 +1,621 @@ +# mustache.js - Logic-less {{mustache}} templates with JavaScript + +> What could be more logical awesome than no logic at all? + +[![Build Status](https://travis-ci.org/janl/mustache.js.svg?branch=master)](https://travis-ci.org/janl/mustache.js) + +[mustache.js](http://github.com/janl/mustache.js) is a zero-dependency implementation of the [mustache](http://mustache.github.com/) template system in JavaScript. + +[Mustache](http://mustache.github.com/) is a logic-less template syntax. It can be used for HTML, config files, source code - anything. It works by expanding tags in a template using values provided in a hash or object. + +We call it "logic-less" because there are no if statements, else clauses, or for loops. Instead there are only tags. Some tags are replaced with a value, some nothing, and others a series of values. + +For a language-agnostic overview of mustache's template syntax, see the `mustache(5)` [manpage](http://mustache.github.com/mustache.5.html). + +## Where to use mustache.js? + +You can use mustache.js to render mustache templates anywhere you can use JavaScript. This includes web browsers, server-side environments such as [Node.js](http://nodejs.org/), and [CouchDB](http://couchdb.apache.org/) views. + +mustache.js ships with support for the [CommonJS](http://www.commonjs.org/) module API, the [Asynchronous Module Definition](https://github.com/amdjs/amdjs-api/wiki/AMD) API (AMD) and [ECMAScript modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules). + +In addition to being a package to be used programmatically, you can use it as a [command line tool](#command-line-tool). + +And this will be your templates after you use Mustache: + +!['stache](https://cloud.githubusercontent.com/assets/288977/8779228/a3cf700e-2f02-11e5-869a-300312fb7a00.gif) + +## Install + +You can get Mustache via [npm](http://npmjs.com). + +```bash +$ npm install mustache --save +``` + +## Usage + +Below is a quick example how to use mustache.js: + +```js +var view = { + title: "Joe", + calc: function () { + return 2 + 4; + } +}; + +var output = Mustache.render("{{title}} spends {{calc}}", view); +``` + +In this example, the `Mustache.render` function takes two parameters: 1) the [mustache](http://mustache.github.com/) template and 2) a `view` object that contains the data and code needed to render the template. + +## Templates + +A [mustache](http://mustache.github.com/) template is a string that contains any number of mustache tags. Tags are indicated by the double mustaches that surround them. `{{person}}` is a tag, as is `{{#person}}`. In both examples we refer to `person` as the tag's key. There are several types of tags available in mustache.js, described below. + +There are several techniques that can be used to load templates and hand them to mustache.js, here are two of them: + +#### Include Templates + +If you need a template for a dynamic part in a static website, you can consider including the template in the static HTML file to avoid loading templates separately. Here's a small example: + +```js +// file: render.js + +function renderHello() { + var template = document.getElementById('template').innerHTML; + var rendered = Mustache.render(template, { name: 'Luke' }); + document.getElementById('target').innerHTML = rendered; +} +``` + +```html + + +
Loading...
+ + + + + + +``` + +#### Load External Templates + +If your templates reside in individual files, you can load them asynchronously and render them when they arrive. Another example using [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch): + +```js +function renderHello() { + fetch('template.mustache') + .then((response) => response.text()) + .then((template) => { + var rendered = Mustache.render(template, { name: 'Luke' }); + document.getElementById('target').innerHTML = rendered; + }); +} +``` + +### Variables + +The most basic tag type is a simple variable. A `{{name}}` tag renders the value of the `name` key in the current context. If there is no such key, nothing is rendered. + +All variables are HTML-escaped by default. If you want to render unescaped HTML, use the triple mustache: `{{{name}}}`. You can also use `&` to unescape a variable. + +If you'd like to change HTML-escaping behavior globally (for example, to template non-HTML formats), you can override Mustache's escape function. For example, to disable all escaping: `Mustache.escape = function(text) {return text;};`. + +If you want `{{name}}` _not_ to be interpreted as a mustache tag, but rather to appear exactly as `{{name}}` in the output, you must change and then restore the default delimiter. See the [Custom Delimiters](#custom-delimiters) section for more information. + +View: + +```json +{ + "name": "Chris", + "company": "GitHub" +} +``` + +Template: + +``` +* {{name}} +* {{age}} +* {{company}} +* {{{company}}} +* {{&company}} +{{=<% %>=}} +* {{company}} +<%={{ }}=%> +``` + +Output: + +```html +* Chris +* +* <b>GitHub</b> +* GitHub +* GitHub +* {{company}} +``` + +JavaScript's dot notation may be used to access keys that are properties of objects in a view. + +View: + +```json +{ + "name": { + "first": "Michael", + "last": "Jackson" + }, + "age": "RIP" +} +``` + +Template: + +```html +* {{name.first}} {{name.last}} +* {{age}} +``` + +Output: + +```html +* Michael Jackson +* RIP +``` + +### Sections + +Sections render blocks of text zero or more times, depending on the value of the key in the current context. + +A section begins with a pound and ends with a slash. That is, `{{#person}}` begins a `person` section, while `{{/person}}` ends it. The text between the two tags is referred to as that section's "block". + +The behavior of the section is determined by the value of the key. + +#### False Values or Empty Lists + +If the `person` key does not exist, or exists and has a value of `null`, `undefined`, `false`, `0`, or `NaN`, or is an empty string or an empty list, the block will not be rendered. + +View: + +```json +{ + "person": false +} +``` + +Template: + +```html +Shown. +{{#person}} +Never shown! +{{/person}} +``` + +Output: + +```html +Shown. +``` + +#### Non-Empty Lists + +If the `person` key exists and is not `null`, `undefined`, or `false`, and is not an empty list the block will be rendered one or more times. + +When the value is a list, the block is rendered once for each item in the list. The context of the block is set to the current item in the list for each iteration. In this way we can loop over collections. + +View: + +```json +{ + "stooges": [ + { "name": "Moe" }, + { "name": "Larry" }, + { "name": "Curly" } + ] +} +``` + +Template: + +```html +{{#stooges}} +{{name}} +{{/stooges}} +``` + +Output: + +```html +Moe +Larry +Curly +``` + +When looping over an array of strings, a `.` can be used to refer to the current item in the list. + +View: + +```json +{ + "musketeers": ["Athos", "Aramis", "Porthos", "D'Artagnan"] +} +``` + +Template: + +```html +{{#musketeers}} +* {{.}} +{{/musketeers}} +``` + +Output: + +```html +* Athos +* Aramis +* Porthos +* D'Artagnan +``` + +If the value of a section variable is a function, it will be called in the context of the current item in the list on each iteration. + +View: + +```js +{ + "beatles": [ + { "firstName": "John", "lastName": "Lennon" }, + { "firstName": "Paul", "lastName": "McCartney" }, + { "firstName": "George", "lastName": "Harrison" }, + { "firstName": "Ringo", "lastName": "Starr" } + ], + "name": function () { + return this.firstName + " " + this.lastName; + } +} +``` + +Template: + +```html +{{#beatles}} +* {{name}} +{{/beatles}} +``` + +Output: + +```html +* John Lennon +* Paul McCartney +* George Harrison +* Ringo Starr +``` + +#### Functions + +If the value of a section key is a function, it is called with the section's literal block of text, un-rendered, as its first argument. The second argument is a special rendering function that uses the current view as its view argument. It is called in the context of the current view object. + +View: + +```js +{ + "name": "Tater", + "bold": function () { + return function (text, render) { + return "" + render(text) + ""; + } + } +} +``` + +Template: + +```html +{{#bold}}Hi {{name}}.{{/bold}} +``` + +Output: + +```html +Hi Tater. +``` + +### Inverted Sections + +An inverted section opens with `{{^section}}` instead of `{{#section}}`. The block of an inverted section is rendered only if the value of that section's tag is `null`, `undefined`, `false`, *falsy* or an empty list. + +View: + +```json +{ + "repos": [] +} +``` + +Template: + +```html +{{#repos}}{{name}}{{/repos}} +{{^repos}}No repos :({{/repos}} +``` + +Output: + +```html +No repos :( +``` + +### Comments + +Comments begin with a bang and are ignored. The following template: + +```html +

Today{{! ignore me }}.

+``` + +Will render as follows: + +```html +

Today.

+``` + +Comments may contain newlines. + +### Partials + +Partials begin with a greater than sign, like {{> box}}. + +Partials are rendered at runtime (as opposed to compile time), so recursive partials are possible. Just avoid infinite loops. + +They also inherit the calling context. Whereas in ERB you may have this: + +```html+erb +<%= partial :next_more, :start => start, :size => size %> +``` + +Mustache requires only this: + +```html +{{> next_more}} +``` + +Why? Because the `next_more.mustache` file will inherit the `size` and `start` variables from the calling context. In this way you may want to think of partials as includes, imports, template expansion, nested templates, or subtemplates, even though those aren't literally the case here. + + +For example, this template and partial: + + base.mustache: +

Names

+ {{#names}} + {{> user}} + {{/names}} + + user.mustache: + {{name}} + +Can be thought of as a single, expanded template: + +```html +

Names

+{{#names}} + {{name}} +{{/names}} +``` + +In mustache.js an object of partials may be passed as the third argument to `Mustache.render`. The object should be keyed by the name of the partial, and its value should be the partial text. + +```js +Mustache.render(template, view, { + user: userTemplate +}); +``` + +### Custom Delimiters + +Custom delimiters can be used in place of `{{` and `}}` by setting the new values in JavaScript or in templates. + +#### Setting in JavaScript + +The `Mustache.tags` property holds an array consisting of the opening and closing tag values. Set custom values by passing a new array of tags to `render()`, which gets honored over the default values, or by overriding the `Mustache.tags` property itself: + +```js +var customTags = [ '<%', '%>' ]; +``` + +##### Pass Value into Render Method +```js +Mustache.render(template, view, {}, customTags); +``` + +##### Override Tags Property +```js +Mustache.tags = customTags; +// Subsequent parse() and render() calls will use customTags +``` + +#### Setting in Templates + +Set Delimiter tags start with an equals sign and change the tag delimiters from `{{` and `}}` to custom strings. + +Consider the following contrived example: + +```html+erb +* {{ default_tags }} +{{=<% %>=}} +* <% erb_style_tags %> +<%={{ }}=%> +* {{ default_tags_again }} +``` + +Here we have a list with three items. The first item uses the default tag style, the second uses ERB style as defined by the Set Delimiter tag, and the third returns to the default style after yet another Set Delimiter declaration. + +According to [ctemplates](https://htmlpreview.github.io/?https://raw.githubusercontent.com/OlafvdSpek/ctemplate/master/doc/howto.html), this "is useful for languages like TeX, where double-braces may occur in the text and are awkward to use for markup." + +Custom delimiters may not contain whitespace or the equals sign. + +## Pre-parsing and Caching Templates + +By default, when mustache.js first parses a template it keeps the full parsed token tree in a cache. The next time it sees that same template it skips the parsing step and renders the template much more quickly. If you'd like, you can do this ahead of time using `mustache.parse`. + +```js +Mustache.parse(template); + +// Then, sometime later. +Mustache.render(template, view); +``` + +## Command line tool + +mustache.js is shipped with a Node.js based command line tool. It might be installed as a global tool on your computer to render a mustache template of some kind + +```bash +$ npm install -g mustache + +$ mustache dataView.json myTemplate.mustache > output.html +``` + +also supports stdin. + +```bash +$ cat dataView.json | mustache - myTemplate.mustache > output.html +``` + +or as a package.json `devDependency` in a build process maybe? + +```bash +$ npm install mustache --save-dev +``` + +```json +{ + "scripts": { + "build": "mustache dataView.json myTemplate.mustache > public/output.html" + } +} +``` +```bash +$ npm run build +``` + +The command line tool is basically a wrapper around `Mustache.render` so you get all the features. + +If your templates use partials you should pass paths to partials using `-p` flag: + +```bash +$ mustache -p path/to/partial1.mustache -p path/to/partial2.mustache dataView.json myTemplate.mustache +``` + +## Plugins for JavaScript Libraries + +mustache.js may be built specifically for several different client libraries, including the following: + + - [jQuery](http://jquery.com/) + - [MooTools](http://mootools.net/) + - [Dojo](http://www.dojotoolkit.org/) + - [YUI](http://developer.yahoo.com/yui/) + - [qooxdoo](http://qooxdoo.org/) + +These may be built using [Rake](http://rake.rubyforge.org/) and one of the following commands: +```bash +$ rake jquery +$ rake mootools +$ rake dojo +$ rake yui3 +$ rake qooxdoo +``` + +## TypeScript + +Since the source code of this package is written in JavaScript, we follow the [TypeScript publishing docs](https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html) preferred approach +by having type definitions available via [@types/mustache](https://www.npmjs.com/package/@types/mustache). + +## Testing + +In order to run the tests you'll need to install [Node.js](http://nodejs.org/). + +You also need to install the sub module containing [Mustache specifications](http://github.com/mustache/spec) in the project root. +```bash +$ git submodule init +$ git submodule update +``` +Install dependencies. +```bash +$ npm install +``` +Then run the tests. +```bash +$ npm test +``` +The test suite consists of both unit and integration tests. If a template isn't rendering correctly for you, you can make a test for it by doing the following: + + 1. Create a template file named `mytest.mustache` in the `test/_files` + directory. Replace `mytest` with the name of your test. + 2. Create a corresponding view file named `mytest.js` in the same directory. + This file should contain a JavaScript object literal enclosed in + parentheses. See any of the other view files for an example. + 3. Create a file with the expected output in `mytest.txt` in the same + directory. + +Then, you can run the test with: +```bash +$ TEST=mytest npm run test-render +``` + +### Browser tests + +Browser tests are not included in `npm test` as they run for too long, although they are ran automatically on Travis when merged into master. Run browser tests locally in any browser: +```bash +$ npm run test-browser-local +``` +then point your browser to `http://localhost:8080/__zuul` + +## Who uses mustache.js? + +An updated list of mustache.js users is kept [on the Github wiki](https://github.com/janl/mustache.js/wiki/Beard-Competition). Add yourself or your company if you use mustache.js! + +## Contributing + +mustache.js is a mature project, but it continues to actively invite maintainers. You can help out a high-profile project that is used in a lot of places on the web. No big commitment required, if all you do is review a single [Pull Request](https://github.com/janl/mustache.js/pulls), you are a maintainer. And a hero. + +### Your First Contribution + +- review a [Pull Request](https://github.com/janl/mustache.js/pulls) +- fix an [Issue](https://github.com/janl/mustache.js/issues) +- update the [documentation](https://github.com/janl/mustache.js#usage) +- make a website +- write a tutorial + +## Thanks + +mustache.js wouldn't kick ass if it weren't for these fine souls: + + * Chris Wanstrath / defunkt + * Alexander Lang / langalex + * Sebastian Cohnen / tisba + * J Chris Anderson / jchris + * Tom Robinson / tlrobinson + * Aaron Quint / quirkey + * Douglas Crockford + * Nikita Vasilyev / NV + * Elise Wood / glytch + * Damien Mathieu / dmathieu + * Jakub Kuźma / qoobaa + * Will Leinweber / will + * dpree + * Jason Smith / jhs + * Aaron Gibralter / agibralter + * Ross Boucher / boucher + * Matt Sanford / mzsanford + * Ben Cherry / bcherry + * Michael Jackson / mjackson + * Phillip Johnsen / phillipj + * David da Silva Contín / dasilvacontin diff --git a/node_modules/mustache/bin/mustache b/node_modules/mustache/bin/mustache new file mode 100755 index 0000000..6db073f --- /dev/null +++ b/node_modules/mustache/bin/mustache @@ -0,0 +1,150 @@ +#!/usr/bin/env node + +var fs = require('fs'), + path = require('path'); + +var Mustache = require('..'); +var pkg = require('../package'); +var partials = {}; + +var partialsPaths = []; +var partialArgIndex = -1; + +while ((partialArgIndex = process.argv.indexOf('-p')) > -1) { + partialsPaths.push(process.argv.splice(partialArgIndex, 2)[1]); +} + +var viewArg = process.argv[2]; +var templateArg = process.argv[3]; +var outputArg = process.argv[4]; + +if (hasVersionArg()) { + return console.log(pkg.version); +} + +if (!templateArg || !viewArg) { + console.error('Syntax: mustache